Closed nh2 closed 3 years ago
CC @avanov @thebrodmann from #90.
Next blocker: util-linux
fails to build against musl
with error:
In file included from misc-utils/kill.c:57:
./include/pidfd-utils.h: In function ‘pidfd_open’:
./include/pidfd-utils.h:20:17: error: ‘SYS_pidfd_open’ undeclared (first use in this function); did you mean ‘pidfd_open’?
20 | return syscall(SYS_pidfd_open, pid, flags);
| ^~~~~~~~~~~~~~
| pidfd_open
Build chain:
util-linux
fails to build againstmusl
with error
Suspicion: It might be
- header-level support for new linux features in 5.3 and 5.4
from https://git.musl-libc.org/cgit/musl/tree/WHATSNEW?h=v1.2.0#n2175, thus probably requiring an upgrade of musl in nixpkgs to 1.2.0
.
probably requiring an upgrade of musl in nixpkgs to
1.2.0
That fixed that.
Current errors on -A working
:
The dejavu-fonts-full
error is:
install -d build/
scripts/generate.pe tmp/DejaVuMathTeXGyre.sfd
Error loading shared library libfontforge.so.4: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libfreetype.so.6: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libxml2.so.2: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libglib-2.0.so.0: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libgio-2.0.so.0: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libuninameslist.so.1: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libreadline.so.6: No such file or directory (needed by scripts/generate.pe)
Error loading shared library libpython3.8.so.1.0: No such file or directory (needed by scripts/generate.pe)
Error relocating scripts/generate.pe: FindOrMakeEncoding: symbol not found
Error relocating scripts/generate.pe: PyFF_Stdin: symbol not found
Error relocating scripts/generate.pe: FindProgDir: symbol not found
Error relocating scripts/generate.pe: doversion: symbol not found
Error relocating scripts/generate.pe: InitSimpleStuff: symbol not found
Error relocating scripts/generate.pe: CheckIsScript: symbol not found
Error relocating scripts/generate.pe: getLocaleDir: symbol not found
Error relocating scripts/generate.pe: custom: symbol not found
Error relocating scripts/generate.pe: default_encoding: symbol not found
make: *** [Makefile:99: build/DejaVuMathTeXGyre.ttf] Error 127
The
dejavu-fonts-full
error is:
This is because the fontforge
binary doesn't execute at all when linked with this musl. ldd
shows the correct paths on that binary, but when started doesn't try to load those. Comparing the version pinned from static-haskell-nix
master
nixpkgs
:
% diff -u <(strace -fy /nix/store/3v0is6v3dh6sg34y136rwny69rynh41v-fontforge-20200314/bin/fontforge 2>&1 | head -n5) <(strace -fy /nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/bin/fontforge 2>&1 | head -n5)
--- /proc/self/fd/11 2020-07-29 03:44:42.071564812 +0200
+++ /proc/self/fd/12 2020-07-29 03:44:42.071564812 +0200
@@ -1,5 +1,5 @@
-execve("/nix/store/3v0is6v3dh6sg34y136rwny69rynh41v-fontforge-20200314/bin/fontforge", ["/nix/store/3v0is6v3dh6sg34y136rw"...], 0x7fff670c79d8 /* 81 vars */) = 0
+execve("/nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/bin/fontforge", ["/nix/store/dcl4vl0dhh3b64rcqrfwx"...], 0x7fffb423d2c8 /* 81 vars */) = 0
-arch_prctl(ARCH_SET_FS, 0x7efc03efdd68) = 0
+arch_prctl(ARCH_SET_FS, 0x7fc963adcd68) = 0
-set_tid_address(0x7efc03efe33c) = 24152
+set_tid_address(0x7fc963add33c) = 24153
-open("/nix/store/adapzmcxx8cs6yd0qxbyjd8m2j815pab-musl-1.2.0/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
-open("/lib/libfontforge.so.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
+open("/nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/lib/libfontforgeexe.so.3", O_RDONLY|O_CLOEXEC) = 3</nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/lib/libfontforgeexe.so.3.0.0>
+fcntl(3</nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/lib/libfontforgeexe.so.3.0.0>, F_SETFD, FD_CLOEXEC) = 0
The new version loads musl-1.2.0/etc/ld-musl-x86_64.path
, I suspect this is related to the dynamic loader not working as expected.
ldd
comparison between my system one and musl 1.2.0's:
CC @dtzWill @matthewbauer @Ericson2314 on this musl problem ^.
Also, should we in nixpkgs patch out this musl line to further ensure impurities cannot happen?
if (!sys_path) sys_path = "/lib:/usr/local/lib:/usr/lib";
Aha, this seems to be a problem:
There is an unsubstituted ${CMAKE_INSTALL_PREFIX}/lib
in the broken fontforge
's RPATH
; I wonder why my system ldd can handle that at all:
Old:
% patchelf --print-rpath /nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/bin/fontforge | tr ':' '\n'
/nix/store/dcl4vl0dhh3b64rcqrfwxczq38na200w-fontforge-20190413/lib
/nix/store/8by85zgjmvkjaf7l8vvj1p5imb85v3v9-gcc-9.2.0-lib/lib/../lib64
/nix/store/4yjg2927dfkwm2cj4fxxrhi2z3hsl4r2-libpng-apng-1.6.37/lib
/nix/store/4szin1ngkqbn9mzqcs1i31dj9znmn03q-freetype-2.10.1/lib
/nix/store/bjghybgz5s2p4lgz063qblin4cd7575l-bzip2-1.0.6.0.1/lib
/nix/store/dw6ylfwq89j8msv6b90ck23xsvbk0cbk-libxml2-2.9.10/lib
/nix/store/rq5f1445pchah07crk3s232rl7a37n9k-woff2-1.0.2-lib/lib
/nix/store/jbf6s0r4l42mmyg7g7vyvppkf35sjkdn-brotli-1.0.7-lib/lib
/nix/store/3kz1gkp3i7wcsvgwigv64zqpcr2y1m7y-zlib-1.2.11/lib
/nix/store/bhdqmpf9lbnw1531grrdsbz7mmgmfb3j-glib-2.62.4/lib
/nix/store/li17272jpifsqi88pp4n9kn0ylqk332g-python3-3.7.6/lib
/nix/store/zci33vy733dgrdns72hw1y01y8zldfg3-readline-6.3p08/lib
/nix/store/6mb1cyj3a0d289srvbphfb3pbrdwyfl1-libungif-4.1.4/lib
/nix/store/7a0mlszgqbp1nr0q4596h6dwj9pw8dh1-libjpeg-turbo-2.0.3/lib
/nix/store/xybcn1idww258qhgi1l7sk17vhm6zqqg-libtiff-4.1.0/lib
/nix/store/38x422ih7aybxkw457xnf5d9mg82a5m0-musl-1.1.24/lib
New:
% patchelf --print-rpath /nix/store/3v0is6v3dh6sg34y136rwny69rynh41v-1 niklas@ares ~/src/haskell/static-haskell-nix-review (git)-[ghc-8.10] % patchelf --print-rpath /nix/store/3v0is6v3dh6sg34y136rwny69rynh41v-fontforge-20200314/bin/fontforge | tr ':' '\n'
${CMAKE_INSTALL_PREFIX}/lib
/nix/store/3v0is6v3dh6sg34y136rwny69rynh41v-fontforge-20200314/lib
/nix/store/6m45i0liq8ni0bhpng49pc62sw30mcpd-readline-6.3p08/lib
/nix/store/7600458g0i247z0m2h7bprb6san46rw1-libuninameslist-20200413/lib
/nix/store/94ldh5da8mf9j16y8vbjmmn0g6bq826y-python3-3.8.3/lib
/nix/store/dc2j68fmxwx0mdcf8iws5wifqpkwi50z-freetype-2.10.2/lib
/nix/store/m37pc0zrn09dcprmpw6fhr122fli1wn3-glib-2.64.4/lib
/nix/store/m3q4v6y3fmf0af2jq74y5sg762f7727s-libxml2-2.9.10/lib
/nix/store/adapzmcxx8cs6yd0qxbyjd8m2j815pab-musl-1.2.0/lib
I found the fix for fontforge
: PR at https://github.com/NixOS/nixpkgs/pull/94126
Next issue: ilmbase
(dependency of many packages) fails with:
/build/source/IlmBase/IexMath/IexMathFpu.cpp: In function ‘void Iex_2_4::FpuControl::restoreControlRegs(const ucontext_t&, bool)’:
/build/source/IlmBase/IexMath/IexMathFpu.cpp:284:38: error: ‘struct _fpstate’ has no member named ‘cw’; did you mean ‘cwd’?
284 | setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal);
| ^~
| cwd
/build/source/IlmBase/IexMath/IexMathFpu.cpp:287:20: error: ‘struct Iex_2_4::FpuControl::_fpstate_64’ has no member named ‘magic’
287 | setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
| ^~~~~
Next issue:
ilmbase
(dependency of many packages) fails with:
Fixing with PR: https://github.com/NixOS/nixpkgs/pull/94205
I also made an upstream PR: https://github.com/AcademySoftwareFoundation/openexr/pull/798
Next error: mesa
fails with a warning:
../src/gallium/state_trackers/nine/nine_debug.c: In function ‘_nine_debug_printf’:
../src/gallium/state_trackers/nine/nine_debug.c:77:13: error: assignment to ‘long unsigned int’ from ‘pthread_t’ {aka ‘struct __pthread *’} makes integer from pointer without a cast [-Werror=int-conversion]
77 | tid = pthread_self();
| ^
cc1: some warnings being treated as errors
Next error:
mesa
fails with a warning:
Fixing with PR: https://github.com/NixOS/nixpkgs/pull/94207
I also made an upstream PR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121
Hey Niklas, a couple of questions:
At present we're just using the compiler from your package set -- is compiling GHC 8.10 itself blocked on some of the challenges you're facing in this PR or is it the larger Haskell package set?
If the former, are there any semi-obvious avenues through which I can help? I'm neither a Musl expert nor a Nix pro but would be happy to give something a go/hammer away at something you know to be an issue.
Cheers as always for all your hard work on this.
@lunaris
- is it the larger Haskell package set?
It's the package set; static-haskell-nix
is based on what nixpkgs
has, which is based on what Stackage LTS has, which does not have GHC 8.10 because the latest 8.10 release is broken on Windows. According to https://github.com/commercialhaskell/stackage/issues/5274#issuecomment-691504426 a new GHC 8.10.3 will soon be released with a fix, and then Stackage LTS will advance.
- are there any semi-obvious avenues through which I can help?
There are two ways that would benefit substantially from contributions:
nixpkgs
, and then to rebase static-haskell-nix
on nixpkgs
master
. That work will consist mainly of making minor PRs to nixpkgs to fix Haskell packages or their system dependencies failing to build.Independent of Stackage LTS, and relevant only to people who want to build stack
-based projects statically, there is the task of making stack2nix
compatible with Stack 2's new API and snapshot format. It's a nice standalone problem because all that stack2nix
does is to consume a stack.yaml
+ .cabal file, and generate a large .nix
file. stack2nix
was originally made by IOHK but then abandoned (they are now using haskell.nix
but that is not yet a good default base for static-haskell-nix
, so I'm maintaining stack2nix
for now. I'd like to build a community of people that can maintain stack2nix
together.
Perhaps @qrilka, @lunaris @monacoremo and @nh2 should make a screen share call at some time on this? Might be an efficient and fun way to do it.
BTW @nh2 regarding IOHK and stack2nix - not sure how official this information is but not so long ago one of their devs shared that they don't want to support Stack anymore so I guess using haskell.nix doesn't look promising anymore :-\
- rebase
static-haskell-nix
onnixpkgs
master
That should be relatively straight forward I think! We're using static-haskell-nix based on nixpkgs master for PostgREST, the only issue that we patch manually is https://github.com/NixOS/nixpkgs/issues/85924
- Perhaps @qrilka, @lunaris @monacoremo and @nh2 should make a screen share call at some time on this? Might be an efficient and fun way to do it.
I would love that! :-)
So I've picked this up again recently, actually with the intention of getting 8.8.4 building, but I think what I'm about to write applies to 8.10.X as well. It seems that 8.6.5's static binary is still not playing nicely in HEAD
. This is despite the ncurses patch being merged. Moreover, if I manually cherry-pick e.g. the commits off @nh2's Nixpkgs (which are basically the same fixes, but I had to try), it still doesn't build. I'm digging into it but here are the logs for anyone who may be able to spot what's going on quickly:
[1 of 1] Compiling Main ( main.hs, main.o )
Linking main ...
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/c79akx3q0w7hk4s4zq9bklf8y94zb4zc-gcc-10.2.0/lib/gcc/x86_64-unknown-linux-musl/10.2.0/crtbegin.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a PIE object
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: main.o: relocation R_X86_64_32S against symbol `stg_bh_upd_frame_info' can not be used when making a PIE object; recompile with -fPIE
....
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(TTY.o): relocation R_X86_64_32S against `.bss.saved_termios' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Signals.o): relocation R_X86_64_32 against `.text.sigtstp_handler' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Select.o): relocation R_X86_64_32S against symbol `stg_END_TSO_QUEUE_closure' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(StgStartup.o): relocation R_X86_64_32S against symbol `stg_enter_info' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Exception.o): relocation R_X86_64_32S against symbol `stg_END_TSO_QUEUE_closure' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Apply.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(StgStdThunks.o): relocation R_X86_64_32S against symbol `stg_upd_frame_info' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(HeapStackCheck.o): relocation R_X86_64_32S against symbol `g0' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Updates.o): relocation R_X86_64_32S against symbol `stg_BLACKHOLE_info' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(PrimOps.o): relocation R_X86_64_32S against symbol `g0' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(StgMiscClosures.o): relocation R_X86_64_32S against symbol `stg_enter_info' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(AutoApply.o): relocation R_X86_64_32 against `.rodata.str' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(ProfHeap.o): relocation R_X86_64_32S against hidden symbol `closure_type_names' can not be used when making a PIE object
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Heap.o): relocation R_X86_64_32S against `.rodata.heap_view_closureSize' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Arena.o): relocation R_X86_64_32 against `.rodata.newArena.str1.1' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(STM.o): relocation R_X86_64_32S against symbol `stg_END_STM_CHUNK_LIST_closure' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(WSDeque.o): relocation R_X86_64_32 against `.rodata.newWSDeque.str1.1' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(CheckUnload.o): relocation R_X86_64_32S against `.rodata.searchHeapBlocks' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Scav.o): relocation R_X86_64_32S against `.rodata.scavenge_stack' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(Compact.o): relocation R_X86_64_32S against `.rodata.thread_stack' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libHSrts.a(MarkWeak.o): relocation R_X86_64_32S against symbol `stg_END_TSO_QUEUE_closure' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libCffi.a(ffi64.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/rts/libCffi.a(ffiw64.o): relocation R_X86_64_32 against hidden symbol `ffi_closure_win64' can not be used when making a PIE object
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/c79akx3q0w7hk4s4zq9bklf8y94zb4zc-gcc-10.2.0/lib/gcc/x86_64-unknown-linux-musl/10.2.0/crtend.o: relocation R_X86_64_32 against `.ctors' can not be used when making a PIE object; recompile with -fPIE
/nix/store/is5anmycg9l1v47lhava5cqjv42hpxvq-binutils-2.35.1/bin/ld: /nix/store/scw9nm1mn28w3356ccifwb7cc17immk6-ghc-8.6.5-binary/lib/ghc-8.6.5/base-4.12.0.0/libHSbase-4.12.0.0.a(iconv.o): warning: relocation against `iconv_open' in read-only section `.text.hs_iconv_open'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/qvl7mxya7p3ggmqcyi1z2vn63fgvscy9-ghc-8.6.5-binary.drv' failed with exit code 1
cannot build derivation '/nix/store/sjcb6pp3cwgcai6p4pacvfw73dqb84kl-ghc-8.8.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/sjcb6pp3cwgcai6p4pacvfw73dqb84kl-ghc-8.8.4.drv' failed
I have a solution upcoming that addresses the above errors:
https://github.com/NixOS/nixpkgs/issues/129247
The problems are now understood and written up, and we just need to get the fixes into nixpkgs.
Nixpkgs PR to fix the musl compilers at: https://github.com/NixOS/nixpkgs/pull/129289
-A workingStackageExecutables
is now building (with some exceptions). That's 332 stattic exes.
I also PR'd https://github.com/NixOS/nixpkgs/pull/129558 for nixpkgs to fix the alsa-*
packages.
@monacoremo postgrest
is now building, and I've added it to the -A
working set.
Interestingly, the static stack
binary built with static-haskell-nix
is more than 2x smaller than the official static stack binary built on Alpine:
77 MB
: stack-2.7.1-linux-x86_64-bin
from https://github.com/commercialhaskell/stack/releases/tag/v2.7.130 MB
stack-2.7.1-linux-x86_64-bin_static-haskell-nix.tar.gz
I don't know why that is yet; both binaries are strip
ped.
I finished making Stack 2 support work (and thus all new Stackage LTSs) with stack2nix
.
This needed only minor updates to @qrilka's work on https://github.com/nh2/stack2nix/pull/1.
Some thing may not work yet related to local source dirs described in stack.yaml
, or when you use github:
or stuff like that. If you hit those, open an issue. In any case, they should be easy to implement in stack2nix
by just generating the corresponding fetch*
invocation (e.g. fetchGit
, fetchFromGitHub
, and so on).
Buildkite CI is fully green, including stack targets: https://buildkite.com/nh2/static-haskell-nix/builds/858
HerculesCI as well, showing output store paths: https://hercules-ci.com/github/nh2/static-haskell-nix/jobs/195
In this PR we can collaborate to add GHC 8.10 compatibility as requested on #90.
For the general approach, see https://github.com/nh2/static-haskell-nix/issues/90#issuecomment-664551616.
TODO
List of upstream PRs made as part of this
fontforge
: https://github.com/NixOS/nixpkgs/pull/94126ilmbase
: https://github.com/NixOS/nixpkgs/pull/94205mesa
: https://github.com/NixOS/nixpkgs/pull/94207