-
Notifications
You must be signed in to change notification settings - Fork 176
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
error installing LWT 4.0.1 on Ubuntu 18.04 with musl enabled ocaml compiler via opam #599
Comments
cc @rgrinberg, @diml have you ever seen this? I would assume that this is a Jbuilder internal problem, or else a confusing error message, as we never ask for the |
Hmm, I'm guessing that As a workaround, you can disable dynlink ( How is musl+static patched? Do they not let you produce shared objects at all? |
Not sure if the question regarding how musl+static was patched, was addressed to me... just in case my OPAM musl+static compiler configuration file
|
@gruenewa Have you had success before with a +static switch? @rgrinberg is Jbuilder/Dune tested on those? |
@aantron Yes, most of my projects are fine using the +static+flambda switch with jbuilder/dune. And there are no problems installing many opam packages. Lwt is the first package where I am observing this issue. |
@gruenewa Could you post |
the _build/log is ...
It contains just these 4 lines. |
@gruenewa could you run the last command in the log but passing |
Sorry, my mistake. After
gives
|
Running the last line with
gives the following output on my terminal
The exit code of the command is 0. No other output is printed. |
Thanks, however it's really the call to ocamlmklib that I'm interested in :) On my machine it produces the following output:
I'd like to see whether it calls |
Could you also post the output of |
If l call
it prints to console:
There seems not to be an invokation of |
I am using ocamlc provided by
|
@diml looks like it passes I wonder what's the best way to support to this in jbuild. Clearly, we don't want people to change their build scripts to work in environments without shared objects - so the |
This would be a good usecase to support though, since it leads to completely statically linked binaries that have no shared dependencies (very useful for cloud-esk environments and out of CI/CD pipelines). I don't have any good recommendations on how to detect a lack of shared libraries apart from a configure test to check the output of a known-good ocamlmklib though... |
It seems that we can look in the Makefile.config installed by ocaml:
@gruenewa can you try this command as well to be sure the variable is set to |
@diml Yes, the variable is set to
|
I having the same problem on Arch Linux but using |
Actually... I'm having this problem with lwt 4.1.0
|
@diml, @rgrinberg, sorry to harass. Perhaps a Dune issue should be created for this? |
Yeah, this should be an issue I guess, but it's not really clear what's the best way to fix this yet. One thing that's clear is that the current way of doing things isn't going to work however. Making dune infer that .so targets are available by reading |
Opened ocaml/dune#1051 for this. |
This should be resolved in ocaml/dune#1165, presumably to be released soon, so closing the issue here. Thanks @diml and @rgrinberg for looking at it :) |
Looks like the fix was just released as part of Dune 1.2.0. Thanks to the Dune team! |
I am using opam with compiler switch 4.06.1+musl+gcc+static+flambda on Ubuntu 18.04. (The compiler switch is based on the 4.06.1+musl+static+flambda compiler switch by replacing musl-clang with musl-gcc since musl-clang is not available for Ubuntu)
When installing lwt I get the following error:
Running jbuid for LWT gives ...
Looking further I see that there is a statically linked library
liblwt_unix_stubs.a
which probably shouldhave been used instead:
/.opam/4.06.1+musl+gcc+static+flambda/build/lwt.4.0.1$ find -name "*lwt_unix_stubs*" ./_build/default/src/unix/liblwt_unix_stubs.a ./_build/default/src/unix/lwt_unix_stubs.o ./_build/default/src/unix/lwt_unix_stubs.c ./src/unix/lwt_unix_stubs.c
Any, ideas? Thank you!
The text was updated successfully, but these errors were encountered: