Skip to content

Commit 3614f09

Browse files
authored
Fix aarch64 musl TH code that uses C++ (#2412)
* Fix aarch64 musl TH code that uses C++ * There is still an issue with cross compiling (not C++ related) * There is still an issue with cross compiling (not C++ related)
1 parent 9e635db commit 3614f09

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

builder/comp-builder.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ let
338338
}
339339
// lib.optionalAttrs stdenv.hostPlatform.isMusl {
340340
# This fixes musl compilation of TH code that depends on C++ (for instance TH code that uses the double-conversion package)
341-
LD_LIBRARY_PATH="${pkgs.buildPackages.gcc-unwrapped.lib}/x86_64-unknown-linux-musl/lib";
341+
LD_LIBRARY_PATH="${pkgs.buildPackages.gcc-unwrapped.lib}/${stdenv.hostPlatform.config}/lib";
342342
}
343343
// lib.optionalAttrs dontUpdateAutotoolsGnuConfigScripts {
344344
inherit dontUpdateAutotoolsGnuConfigScripts;

test/cabal.project.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repository head.hackage.ghc.haskell.org
2929
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
3030
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
3131
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
32-
--sha256: sha256-3icOgmtUh9WxDFfmmSHgTKhlfWJ6Yb5jYGYBcnK7d0A=
32+
--sha256: sha256-ywti4TWiuFGJtnHaMMPhk3Ms2hXfsXMC1LMcWnI9K6I=
3333

3434
repository ghcjs-overlay
3535
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b

test/th-dlls/default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ let
2020

2121
in recurseIntoAttrs {
2222
meta.disabled = stdenv.hostPlatform.isGhcjs
23-
# On aarch64 this test also breaks form musl builds (including cross compiles on x86_64-linux)
24-
|| (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl)
23+
# On aarch64 this test breaks form musl cross compiles on x86_64-linux
24+
# Error is:
25+
# iserv-proxy-interpreter: internal error: 0x0 address for .LANCHOR1 + 0 of type 562
26+
# in tmp/nix/store/kgprix3jn2w320flxpf7yr29f7dczykr-libsodium-aarch64-unknown-linux-musl-1.0.18/lib/libsodium.a
27+
# (#103:librdrand_la-randombytes_internal_random.o) for relocation 4 in section 1 of kind: 0
28+
|| (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl && !stdenv.buildPlatform.isAarch64)
2529
# Not sure why this is failing with a seg fault
2630
|| (builtins.elem compiler-nix-name ["ghc9102" "ghc9102llvm"] && stdenv.hostPlatform.isAndroid && stdenv.hostPlatform.isAarch32)
2731
# unhandled ELF relocation(Rel) type 10

0 commit comments

Comments
 (0)