Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to build metapp.0.4.4 #13

Open
benbellick opened this issue Apr 4, 2024 · 3 comments
Open

Failure to build metapp.0.4.4 #13

benbellick opened this issue Apr 4, 2024 · 3 comments

Comments

@benbellick
Copy link

Hi, thanks for this package (and the million other awesome packages you've made).

I seem to encounter a sporadic error both locally and on CI/CD with a project that uses metapp. Really it uses override which depends on metapp.

System Info:

  • OCaml Version: 4.12.1
  • OS: MacOS 14.0
  • Chip: M2 Max
⬇ retrieved metapp.0.4.4  (cached)
[ERROR] The compilation of metapp.0.4.4 failed at "dune build -p metapp -j 11
        @install".

#=== ERROR while compiling metapp.0.4.4 =======================================#
# context     2.1.5 | macos/arm64 |  | https://opam.ocaml.org#901bbe31
# path        ~/work/imandra-venue-py/_opam/.opam-switch/build/metapp.0.4.4
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p metapp -j 11 @install
# exit-code   1
# env-file    ~/.opam/log/metapp-64548-b7b73a.env
# output-file ~/.opam/log/metapp-64548-b7b73a.out
### output ###
# [...]
# 3 |   (preprocess (pps metapp.ppx))
#                   ^^^^^^^^^^^^^^^^
# (cd _build/default && .ppx/e7c203cacf1cd3bb02e6242329effa31/ppx.exe --cookie 'library-name="metapp"' -o metapp/metapp.pp.ml --impl metapp/metapp.ml -corrected-suffix .ppx-corrected -diff-cmd - -dump-ast)
# findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /Users/benjaminbellick/work/imandra-venue-py/_opam/lib/ocaml, /Users/benjaminbellick/work/imandra-venue-py/_opam/lib/ocaml/compiler-libs
# File "_none_", line 1:
# Warning 58 [no-cmx-file]: no cmx file was found in path for module Metapp_api, and its interface was not compiled with -opaque
# File "_none_", line 1:
# Warning 58 [no-cmx-file]: no cmx file was found in path for module Metapp_preutils, and its interface was not compiled with -opaque
# File "_none_", line 1:
# Warning 58 [no-cmx-file]: no cmx file was found in path for module Metapp_version_info, and its interface was not compiled with -opaque
# ld: warning: -undefined suppress is deprecated
# ld: warning: -undefined suppress is deprecated



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
┌─ The following actions failed
│ λ build metapp 0.4.4
└─
╶─ No changes have been performed
# Run eval $(opam env) to update the current shell environment
make: *** [opam-install-deps] Error 31
@felsocim
Copy link

Hello,

Unfortunately, I encountered seemingly the same problem (see error log below) when building metapp on a Linux machine (using OCaml 4.14), as a dependency of clangml.

When looking for a possible cause on the internet, I came across this build log. It makes me think this is not an isolated problem specific to a given machine configuration.

Any ideas?

File "metapp/dune", line 3, characters 14-30:
3 |   (preprocess (pps metapp.ppx))
                  ^^^^^^^^^^^^^^^^
(cd _build/default && .ppx/e7c203cacf1cd3bb02e6242329effa31/ppx.exe --cookie 'library-name="metapp"' -o metapp/metapp.pp.mli --intf metapp/metapp.mli -corrected-suffix .ppx-corrected -diff-cmd - -dump-ast)
Fatal error: exception Dynlink.Error (Dynlink.Library's_module_initializers_failed "Not_found")
File "metapp/dune", line 3, characters 14-30:
3 |   (preprocess (pps metapp.ppx))
                  ^^^^^^^^^^^^^^^^
(cd _build/default && .ppx/e7c203cacf1cd3bb02e6242329effa31/ppx.exe --cookie 'library-name="metapp"' -o metapp/metapp.pp.ml --impl metapp/metapp.ml -corrected-suffix .ppx-corrected -diff-cmd - -dump-ast)
Fatal error: exception Dynlink.Error (Dynlink.Library's_module_initializers_failed "Not_found")

@felsocim
Copy link

Hello again,

I am still trying to figure it out, but I couldn't find anything helpful on the internet related to the Dynlink.Library's_module_initializers_failed "Not_found" error.

I noticed that the problem in the issue #12 was happening at the same spot in the source code. Following the suggestion made by @jonahbeckford, I tried to build metapp within an environment based on OCaml 4.14.2 rather than 4.14.1, but the same error still persists.

Any suggestions are welcome. Being unable to compile metapp prevents me from using other @thierry-martinez's packages depending on this one.

Have a nice evening!

@felsocim
Copy link

felsocim commented Jun 5, 2024

Hi,

Eventually, I managed to solve the problem. Cotinuous integration logs on check.ci.ocaml.org put me on the track. Details follow.

Short version

In my case, the error on compile time was related to the version of the ppxlib dependency available in my software environment. By default, it was 0.28.0. I had to update it to 0.32.1 to make everything work again. This made me also update the following dependencies: sexplib0 (to version 0.16.0), ppx_inline_test (to version 0.16.1) and ppx_expect (to version 0.16.0).

More details

Actually, I use the GNU Guix package manager to set up my software environment. For those who are in the same situation, it is worth to mention that the final working configuration for me was with the following specification of channels:

(list
 (channel
  (name 'guix)
  (url "https://git.savannah.gnu.org/git/guix.git")
  (commit "425cf1fbe2fff25bda1b5eb948ce01170d23ab6a"))
 (channel
  (name 'guix-extra)
  (url "https://gitlab.inria.fr/mfelsoci/guix-extra.git")
  (branch "master")
  (commit "5b78f0cdb10222ff08e51784634274ecb9b6469d")))

Note that (guix-extra is my own channel where I define the metapp package (not yet available through the official Guix channel) as well as the updated versions of sexplib0, ppx_inline_test and ppx_expect (until I manage to push the updates upstream to the official Guix channel).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants