Closed talw closed 3 years ago
check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
This is a GHC-in-nixpkgs problem; googling that in conjuction with nixpkgs
brings up this first result: https://github.com/NixOS/nixpkgs/issues/85924
The fix suggested by @bgamari at https://github.com/NixOS/nixpkgs/issues/85924#issuecomment-640277067 works for me (in https://github.com/nh2/nixpkgs/commit/d7f663fdf4ca183fe48ff2dba06d03e9c19530ed), I'm also using it in #90.
But nobody has PR'd that fix yet.
I think the main holdup with that is testing it and also fixing it for the non-x86_64 GHCs.
If you would like to help with that, start with my patch, also update i686-linux
and aarch64-linux
to the fitting Fedora releases in here, test that all the Haskell packages build, and PR the change against the haskell-updates
nixpkgs branch, CC'ing the participants of https://github.com/NixOS/nixpkgs/issues/85924 and #90 on the PR. You might also want to join @peti's Haskell Twitch stream on Fridays where such PRs are reviewed together.
check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
This is a GHC-in-nixpkgs problem; googling that in conjuction with
nixpkgs
brings up this first result: NixOS/nixpkgs#85924The fix suggested by @bgamari at NixOS/nixpkgs#85924 (comment) works for me (in nh2/nixpkgs@d7f663f), I'm also using it in #90.
But nobody has PR'd that fix yet.
I think the main holdup with that is testing it and also fixing it for the non-x86_64 GHCs.
If you would like to help with that, start with my patch, also update
i686-linux
andaarch64-linux
to the fitting Fedora releases in here, test that all the Haskell packages build, and PR the change against thehaskell-updates
nixpkgs branch, CC'ing the participants of NixOS/nixpkgs#85924 and #90 on the PR. You might also want to join @peti's Haskell Twitch stream on Fridays where such PRs are reviewed together.
Thank you very much! I googled a lot of stuff but did not come across that issue! From this I learn that one should search in nixpkgs' issues as well. Should this issue be closed as a duplicate of NixOS/nixpkgs#85924 ? Although it's an issue in nixpkgs, that makes me realize this issue perhaps belongs there as well.
Also, thanks for the guidance on how to proceed from here in order to fix this upstream!
Should this issue be closed as a duplicate of NixOS/nixpkgs#85924 ?
We can keep it open, I renamed it accordingly.
Also, thanks for the guidance on how to proceed from here in order to fix this upstream!
Sure thing, that's probably the highest-impact work I can do :)
@talw did you find out more about the crtbeginT.o
issue? I am running into this trying to build statically as well (in my case building on top of haskell.nix
, https://github.com/input-output-hk/haskell.nix/issues/914)
@talw did you find out more about the
crtbeginT.o
issue? I am running into this trying to build statically as well (in my case building on top ofhaskell.nix
, input-output-hk/haskell.nix#914)
@nomeata
Yes. I applied the patch by @bgamari as suggested by @nh2 and it fixed the issue. The fix is: https://github.com/NixOS/nixpkgs/issues/85924#issuecomment-640277067
Thanks for applying that fix upstream. It seems I now have a new problem with the bootstrap compiler:
…
Patchelfing /nix/store/iz8azixwl6vzzd87q1p38vlsm3hb21aa-ghc-8.6.5-binary/lib/ghc-8.6.5/bin/hp2ps
Patchelfing /nix/store/iz8azixwl6vzzd87q1p38vlsm3hb21aa-ghc-8.6.5-binary/lib/ghc-8.6.5/bin/ghc-iserv
Patchelfing /nix/store/iz8azixwl6vzzd87q1p38vlsm3hb21aa-ghc-8.6.5-binary/lib/ghc-8.6.5/bin/runghc
Patchelfing /nix/store/iz8azixwl6vzzd87q1p38vlsm3hb21aa-ghc-8.6.5-binary/lib/ghc-8.6.5/ghc-boot-th-8.6.5/libHSghc-boot-th-8.6.5-ghc8.6.5.so
running install tests
/nix/store/6my73ym207a4ds2szcl9wnr1gby10q56-stdenv-linux/setup: line 1318: 7439 Segmentation fault (core dumped) $out/bin/ghc --make main.hs
builder for '/nix/store/00x82zgp94rf4682gzq63d2nlldzvfmb-ghc-8.6.5-binary.drv' failed with exit code 1
Anyone seen that before?
Opened https://github.com/NixOS/nixpkgs/issues/118731 to track that.
Just a shot in the dark, but it might be related to https://gitlab.haskell.org/ghc/ghc/-/issues/17508?!
Indeed every time I've seen a static build fail in the past it has been due to GHC#17508., which is itself due to a very unfortunate ld.gold
bug. That being said, I vaguely remember nixpkgs
having already worked around this by not using ld.gold
in the static GHC build. Can you confirm, @nh2?
@talw did you find out more about the
crtbeginT.o
issue? I am running into this trying to build statically as well (in my case building on top ofhaskell.nix
, input-output-hk/haskell.nix#914)@nomeata
Yes. I applied the patch by @bgamari as suggested by @nh2 and it fixed the issue. The fix is: NixOS/nixpkgs#85924 (comment)
Thanks! I now get similar error messages when trying nix-build -A pkgsMusl.buildPackages.haskell.compiler.ghc8102Binary
on nixpkgs master, namely
Installing library in /nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/ghc-8.10.2
"/nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/bin/ghc-pkg" --force --global-package-db "/nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/package.conf.d" update rts/dist/package.conf.install
/nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/bin/ghc-pkg: /nix/store/s5xpnmnhibl76a47wd65cwrwgjclzrnc-ncurses-6.2/lib/libtinfo.so.6: no version information available (required by /nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/bin/ghc-pkg)
/nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/bin/ghc-pkg: /nix/store/s5xpnmnhibl76a47wd65cwrwgjclzrnc-ncurses-6.2/lib/libtinfo.so.6: no version information available (required by /nix/store/ffa8jpz98vnqyfsl23pqgp5j44c4rl78-ghc-8.10.2-binary/lib/ghc-8.10.2/bin/../terminfo-0.4.1.4/libHSterminfo-0.4.1.4-ghc8.10.2.so)
Inconsistency detected by ld.so: dl-lookup.c: 105: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
make[1]: *** [ghc.mk:973: install_packages] Error 127
make: *** [Makefile:51: install] Error 2
builder for '/nix/store/hnn4qhzk85vy5rhpi77zfcsykfaz6mmh-ghc-8.10.2-binary.drv' failed with exit code 2
but it seems that the patch by bgamari that you linked to is already applied there.
We can close this issue once the latter is merged.
Closing as I merged the fix: https://github.com/NixOS/nixpkgs/pull/129289
You will still need to wait a bit until it hits master
; subscribe to https://github.com/NixOS/nixpkgs/issues/129247 for that.
First of all, a big thanks for all the work on this big project!
I am trying to build a project statically with GHC 8.8.3 and I get the following error:
The involved files are:
default.nix:
proj.nix
:nix/pkgs-rev.json
:nix/static-haskell-rev.json
:I tried many other permutations of options for
configureFlags
, as well as adding stuff to the cabal file likeld-options: -static
andcc-options: -static
.While, this is not enough to reproduce the problem yourselves, If I could receive as much as a clue as to a possible direction I should head towards, or a thing I should try, I will do it and reply with the results, so feel free to suggest anything!
Why is GHC 8.6.5 involved in the building of this? Is this related to the version mismatch? I tried stating a build with
compiler = "ghc865"
It gave an error about a dependencytime
not found at the correct version forrebase
, so I jailbroken it and continued building but again, once the last module for the project finishes compiling I get an error about that crtbeginT.o but this time the message is different:Anyone got a static build working with GHC 8.8.x?