-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
pkgsMusl.ocamlPackages.ocaml: -r and -pie may not be used together #124476
Comments
Bisecting points to 4e9dc46 by @utsl42. Nathan, do you have a hunch?
|
Cargoculting what I saw in the GHC code, trying this right now: diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix
index d9853dd642a..ccf56140cf3 100644
--- a/pkgs/development/compilers/ocaml/generic.nix
+++ b/pkgs/development/compilers/ocaml/generic.nix
@@ -58,6 +58,9 @@ stdenv.mkDerivation (args // {
++ optional spaceTimeSupport (flags "--enable-spacetime" "-spacetime")
;
+ hardeningDisable = stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+
buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
buildInputs = optional (!lib.versionAtLeast version "4.07") ncurses
++ optionals useX11 [ libX11 xorgproto ]; |
Seems to work, fix in #124498 |
There appear to be multiple linker bugs affecting at least Rust and GHC with Musl . Both bfd or gold had issues, gold seems a little worse. I would suggest trying lld, it may fix it. |
to see what breaks, and also to get NixOS/nixpkgs@5a923e5 which may allow us to use `rustc` from `nixpkgs` again (see #2519) Issues encountered: * [x] in nixpks, various `cargoSHA256` were wrong. (NixOS/nixpkgs#123522, NixOS/nixpkgs#123348, NixOS/nixpkgs#123349) * [x] Ocaml built with musl, used for static builds, is currently broken. Reported at NixOS/nixpkgs#124476. Found a possible fix, submitted at NixOS/nixpkgs#124498 and currently included in this branch. * [x] New ocamlformat version * [x] Running new formatter on these files * [x] The RTS fails to build or link the C files (`stddef.h` missing) This stuff was very hairy before, and that doesn’t get better :-( If I use the wrapped `wasm32-unknown-wasi-clang`, the build makes some progress, but then fails with https://bugs.llvm.org/show_bug.cgi?id=43393 (as it used to before, and then somehow we fixed that) In the end, surgically adding an include to `CLANG_FLAGS` works, it seems. * [x] Some upgraded tool produces new `names` subsections, presumably from this Wasm proposal: https://github.com/WebAssembly/extended-name-section/blob/master/proposals/extended-name-section/Overview.md Worked around by jumping over them, but otherwise ignoring them. Should be refined. * [x] Haskell code ought to be adjusted to latest GHC * [x] Bump the `niv` that we install into the shell (also because of Haskell changes) * [x] The darwin rebuild of `rustc` and `git` keeps timing out on hydra.
lld with gcc is currently not supported and I think last time I tried we can't build OCaml and all its dependencies with clang+lld fully yet… |
The second commit of #135619 ("match leading/trailing arguments") should fix this |
That's great news! |
Fixed by #135619 |
It used to be possible to build
ocaml
(it is possible on 20.09), but these days it fails with:I’ll try to bisect it…
The text was updated successfully, but these errors were encountered: