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

core_kernel__.cmx is not installed in beta18 #567

Closed
ivg opened this issue Mar 1, 2018 · 7 comments
Closed

core_kernel__.cmx is not installed in beta18 #567

ivg opened this issue Mar 1, 2018 · 7 comments

Comments

@ivg
Copy link
Member

ivg commented Mar 1, 2018

As a result code that even doesn't use jbuilder but depends on core_kernel and that worked for the past couple of years now fails to compile with the following message:

+ /home/ivg/.opam/bap-testing/bin/ocamlfind ocamlopt -linkpkg -g -linkpkg -predicates used_config -predicates used_bap-build -pp 'ppx-jane -dump-ast -inline-test-drop' -predicates ppx_driver -package ppx_jane -package core_kernel -package ocamlbuild -package findlib -package compiler-libs -I lib/bap_config -I lib/bap_build -I tools lib/bap_config/config.cmxa lib/bap_build/bap-build.cmxa tools/bapbuild.cmx -o tools/bapbuild.native
-build.cmxa tools/bapbuild.cmx -o tools/bapbuild.native
# File "_none_", line 1:
# Error: No implementations provided for the following modules:
#          Core_kernel__ referenced from lib/bap_build/bap-build.cmxa(Bap_build)

It works fine with jbuilder beta16 and beta17 (and probably with all previous versions) but doesn't work with beta18. This is reproducible for the following versions of the OCaml compiler: 4.03, 4.04, 4.05

It looks like that the problem is that the core_kernel__.cmx file is no longer installed with jbuild.1.0-beta18:

ls ~/.opam/jbuilder16/lib/core_kernel/core_kernel__.*
/home/ivg/.opam/dev/lib/core_kernel/core_kernel__.cmi
/home/ivg/.opam/dev/lib/core_kernel/core_kernel__.cmx
/home/ivg/.opam/dev/lib/core_kernel/core_kernel__.cmt 
/home/ivg/.opam/dev/lib/core_kernel/core_kernel__.ml-gen

$ ls ~/.opam/jbuilder18/lib/core_kernel/core_kernel__.*
/home/ivg/.opam/bap-testing/lib/core_kernel/core_kernel__.cmi  
/home/ivg/.opam/bap-testing/lib/core_kernel/core_kernel__.mli-gen
/home/ivg/.opam/bap-testing/lib/core_kernel/core_kernel__.cmti

P.S. This code is from BAP

@ivg ivg changed the title No Core_kernel___ in Core_kernel after beta18 core_kernel__.cmx is not installed in beta18 (and probably beta17) Mar 1, 2018
@ivg ivg changed the title core_kernel__.cmx is not installed in beta18 (and probably beta17) core_kernel__.cmx is not installed in beta18 Mar 1, 2018
ivg added a commit to BinaryAnalysisPlatform/opam-repository that referenced this issue Mar 1, 2018
this version builds broken core_kernel, for more info see
ocaml/dune#567
@ghost ghost closed this as completed in 2e7f881 Mar 1, 2018
@ghost
Copy link

ghost commented Mar 1, 2018

Ok, we stopped installing it as we thought it wasn't necessary but it seems that it sometimes is in the end. I suppose it must be when not building with -no-alias-deps.

@ghost
Copy link

ghost commented Mar 1, 2018

Sorry for the troubles

@ivg
Copy link
Member Author

ivg commented Mar 1, 2018

Thanks for a super rapid response :)

@rgrinberg
Copy link
Member

Wonder how our revdeps missed this. cc @jpdeplaix.

@ivg we'll make a release soon.

@kit-ty-kate
Copy link
Member

@rgrinberg probably because we do not test dependencies recursively, only package that depends directly on the new/changed package.
Also we only test the latest version available of each packages, not the older versions but this is not the case on the ARM64 CI. However the ARM64 CI does not have as much computing power as the x86_64 one and it was stalling at the time.

@ivg
Copy link
Member Author

ivg commented Mar 2, 2018

Wonder how our revdeps missed this.

Because we do not depend on jbuilder directly, we're depending on a library that is dependent on it. In this case it was core_kernel. The problem was that jbuilder produced an incorrect library that references a module but doesn't provide it, as Core_kernel__ is in the list of interfaces imported by core_kernel.cmxa, but the cmx file is not present.

Ok, we stopped installing it as we thought it wasn't necessary but it seems that it sometimes is in the end. I suppose it must be when not building with -no-alias-deps.

It also might depend on -linkpkg option of ocamlfind and -linkall option of ocamlopt. I think a good smoke test would be to verify that there is a cmx file for each imported interface.

Since jbuilder produces libraries as artifacts, I think it would be a good idea to test not only direct dependencies, but also those packages that are dependent on produced libraries. (that probably will mean the whole opam repo).

@ghost
Copy link

ghost commented Mar 3, 2018

BTW, the problem was that we were using a mli only module for Core_kernel__, so the issue might arise with any library that uses mli only modules. This is a problem that would need to be fixed in the compiler.

It's unlikely that -linkpkg has an effect here, all it does is cause ocamlfind to pass the .cma/.cmxa files to the compiler. -linkall might have however.

yomimono added a commit to yomimono/mirage that referenced this issue Mar 14, 2018
see ocaml/dune#567 , which explains the issue
with jbuilder 1.0+beta18 in more detail.  This broke cohttp along with
some other common Mirage ecosystem packages, and it's (IMO) easiest just
to conflict with it, since it appears the release will remain in
opam-repository.
SaswatPadhi added a commit to SaswatPadhi/LoopInvGen that referenced this issue Mar 14, 2018
Switched to jbuilder now :)
ghost pushed a commit that referenced this issue Mar 14, 2018
The alias module needs an implementation for non-jbuilder users.
ghost pushed a commit that referenced this issue Mar 14, 2018
The alias module needs an implementation for non-jbuilder users.
qnighy added a commit to qnighy/SATySFi that referenced this issue Mar 15, 2018
This commit removes part of version pinnings introduced by bd737ab and
f8189a8, because jbuilder 1.0+beta18.1 includes a fix of ocaml/dune#567.
nekketsuuu added a commit to nekketsuuu/SATySFi that referenced this issue Jun 10, 2018
This issue was closed.
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

3 participants