Skip to content
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

libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE when building dependency mmark-ext #1095

Open
augyg opened this issue Sep 20, 2024 · 5 comments

Comments

@augyg
Copy link
Contributor

augyg commented Sep 20, 2024

I am trying to use mmark and mmark-ext in a project to add some static site features for Obelisk however I came across this issue:

dist/build/Text/MMark/Extension/Comment.o, dist/build/Text/MMark/Extension/Comment.dyn_o ) > [ 2 of 12] Compiling Text.MMark.Extension.FontAwesome ( Text/MMark/Extension/FontAwesome.hs, dist/build/Text/MMark/Extension/FontAwesome.o, dist/build/Text/MMark/Extension/FontAwesome.dyn_o ) > > <no location info>: error: > <command line>: /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE > [ 3 of 12] Compiling Text.MMark.Extension.Footnotes ( Text/MMark/Extension/Footnotes.hs, dist/build/Text/MMark/Extension/Footnotes.o, dist/build/Text/MMark/Extension/Footnotes.dyn_o ) > > <no location info>: error: > <command line>: /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE

I have a repo to reproduce here

https://github.com/augyg/reproduce-glibc

https://github.com/NixOS/nixpkgs/issues/170897
https://github.com/NixOS/nixpkgs/issues/169332#issuecomment-1106552971

image

This problem doesn't happen when using ob run but does when using nix-build -A exe or ob hoogle

The version of mmark-ext-0.2.1.5 is typically built with ghc 9.6.5 but Ive forked and changed the cabal file+etcetera so that it should work with ghc 8.10.7 and this is included as a thunk in the repo to minimally reproduce, and this is what allowed ob run to work but alas build and hoogle still fail

I have failed to reproduce this outside of Obelisk

Channels: nixos https://nixos.org/channels/nixos-24.05

@dfordivam
Copy link
Contributor

@augyg I have hit a similar issue, but with "cabal build" and not nix-build. In my case clearing up the .cabal dir in my home fixed the issue. Also I ran the nix-build -A exe on your repo, but did not hit this issue. It failed while compiling frontend.

@augyg
Copy link
Contributor Author

augyg commented Sep 20, 2024

@dfordivam ahh sorry I cut out too much so the static failed

I just pushed a new commit that fails on nix-build -A exe for the same reason

I've also tried clearing my .cabal/ folder in case that helped but it hasn't. If there is equivalent persistent state, which appears to be the problem in the cited nixpkgs issues then I'm not sure how to find it

@dfordivam
Copy link
Contributor

I am not sure why this would be happening, but the ghc during compilation of TH is using a separate libc, than the exe it generated (here ./Setup)


./Setup build
Preprocessing library for mmark-ext-0.2.1.5..
Building library for mmark-ext-0.2.1.5..
[ 8 of 12] Compiling Text.MMark.Extension.FontAwesome ( Text/MMark/Extension/FontAwesome.hs, dist/build/Text/MMark/Extension/FontAwesome.o, dist/build/Text/MMark/Extension/FontAwesome.dyn_o )

<no location info>: error:
    <command line>: /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
[ 9 of 12] Compiling Text.MMark.Extension.Footnotes ( Text/MMark/Extension/Footnotes.hs, dist/build/Text/MMark/Extension/Footnotes.o, dist/build/Text/MMark/Extension/Footnotes.dyn_o )

<no location info>: error:
    <command line>: /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
[10 of 12] Compiling Text.MMark.Extension.Kbd ( Text/MMark/Extension/Kbd.hs, dist/build/Text/MMark/Extension/Kbd.o, dist/build/Text/MMark/Extension/Kbd.dyn_o )

<no location info>: error:
    <command line>: /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
[11 of 12] Compiling Text.MMark.Extension.ObfuscateEmail ( Text/MMark/Extension/ObfuscateEmail.hs, dist/build/Text/MMark/Extension/ObfuscateEmail.o, dist/build/Text/MMark/Extension/ObfuscateEmail.dyn_o )

<no location info>: error:
    <command line>: /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE

[nix-shell:/tmp/tmp.7FQZjPhZY9/mmark-ext/mmark-ext/mmark-ext]$ ldd ./Setup 
        linux-vdso.so.1 (0x00007f44cf073000)
        libgmp.so.10 => /nix/store/i96w3nijv65d78zx4bqma48ww51fx8is-gmp-with-cxx-6.2.1/lib/libgmp.so.10 (0x00007f44cefcc000)
        libc.so.6 => /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libc.so.6 (0x00007f44cedc2000)
        libm.so.6 => /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libm.so.6 (0x00007f44cece2000)
        librt.so.1 => /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/librt.so.1 (0x00007f44cecdd000)
        libdl.so.2 => /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/libdl.so.2 (0x00007f44cecd6000)
        libffi.so.8 => /nix/store/6fncvg61gwjh1j7syy0nyki2j6xxf2ql-libffi-3.4.2/lib/libffi.so.8 (0x00007f44cecc9000)
        /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib/ld-linux-x86-64.so.2 => /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007f44cf075000)

@dfordivam
Copy link
Contributor

I gave another look and found the issue, the ghc-syntax-highlighter_0_0_6 in using ghc-lib-parser-8.10.7.20210828, which in turn uses glibc-2.33, incompatible with other libs. You should try to get all packages built with one nixpkgs

Loading package ghc-lib-parser-8.10.7.20210828 ... *** Deleting temp files:      

ldd /nix/store/k2ykhr4av2h95v6731pn77f176x3ff3s-ghc-lib-parser-8.10.7.20210828/lib/ghc-8.10.7/x86_64-linux-ghc-8.10.7/libHSghc-lib-parser-8.10.7.20210828-3JfzLiWBJmaFBCCXq9roVm-ghc8.10.7.so
        linux-vdso.so.1 (0x00007ffc36b18000)
        libHStransformers-0.5.6.2-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/transformers-0.5.6.2/libHStransformers-0.5.6.2-ghc8.10.7.so (0x00007fea2e815000)
        libHSprocess-1.6.13.2-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/process-1.6.13.2/libHSprocess-1.6.13.2-ghc8.10.7.so (0x00007fea2e7cf000)
        libHSpretty-1.1.3.6-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/pretty-1.1.3.6/libHSpretty-1.1.3.6-ghc8.10.7.so (0x00007fea2e75f000)
        libHSdirectory-1.3.6.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/directory-1.3.6.0/libHSdirectory-1.3.6.0-ghc8.10.7.so (0x00007fea2e6f4000)
        libHSunix-2.7.2.2-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/unix-2.7.2.2/libHSunix-2.7.2.2-ghc8.10.7.so (0x00007fea2e609000)
        libHStime-1.9.3-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/time-1.9.3/libHStime-1.9.3-ghc8.10.7.so (0x00007fea2e496000)
        libHSfilepath-1.4.2.1-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/filepath-1.4.2.1/libHSfilepath-1.4.2.1-ghc8.10.7.so (0x00007fea2e471000)
        libHSbinary-0.8.8.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/binary-0.8.8.0/libHSbinary-0.8.8.0-ghc8.10.7.so (0x00007fea2e3c6000)
        libHScontainers-0.6.5.1-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/containers-0.6.5.1/libHScontainers-0.6.5.1-ghc8.10.7.so (0x00007fea2e038000)
        libHSbytestring-0.10.12.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/bytestring-0.10.12.0/libHSbytestring-0.10.12.0-ghc8.10.7.so (0x00007fea2df42000)
        libHSdeepseq-1.4.4.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/deepseq-1.4.4.0/libHSdeepseq-1.4.4.0-ghc8.10.7.so (0x00007fea2df23000)
        libHSarray-0.5.4.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/array-0.5.4.0/libHSarray-0.5.4.0-ghc8.10.7.so (0x00007fea2de99000)
        libHSbase-4.14.3.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/base-4.14.3.0/libHSbase-4.14.3.0-ghc8.10.7.so (0x00007fea2d491000)
        libHSinteger-gmp-1.0.3.0-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/integer-gmp-1.0.3.0/libHSinteger-gmp-1.0.3.0-ghc8.10.7.so (0x00007fea2d44f000)
        libHSghc-prim-0.6.1-ghc8.10.7.so => /nix/store/gblb4a16xsgjbhc9iy5ad0x7x15f8ybf-ghc-8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1/libHSghc-prim-0.6.1-ghc8.10.7.so (0x00007fea2cfa5000)
        librt.so.1 => /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/librt.so.1 (0x00007fea2cf9a000)
        libutil.so.1 => /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libutil.so.1 (0x00007fea2cf93000)
        libdl.so.2 => /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libdl.so.2 (0x00007fea2cf8e000)
        libpthread.so.0 => /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libpthread.so.0 (0x00007fea2cf6e000)
        libgmp.so.10 => /nix/store/d98pqy6b8graar18kwq0zba010xy0ihn-gmp-6.2.1/lib/libgmp.so.10 (0x00007fea2cecc000)
        libc.so.6 => /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libc.so.6 (0x00007fea2ccf7000)
        libm.so.6 => /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/libm.so.6 (0x00007fea2cbb6000)
        /nix/store/q29bwjibv9gi9n86203s38n0577w09sx-glibc-2.33-117/lib/ld-linux-x86-64.so.2 => /nix/store/bzd91shky9j9d43girrrj6vmqlw7x9m8-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007fea31a76000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants