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

Build broken in nix-shell due to linker errors #3376

Closed
blitz opened this issue Feb 26, 2020 · 2 comments
Closed

Build broken in nix-shell due to linker errors #3376

blitz opened this issue Feb 26, 2020 · 2 comments

Comments

@blitz
Copy link
Contributor

blitz commented Feb 26, 2020

I'm trying to build nix in a nix-shell on Fedora 31, but the linking step eventually fails with undefined references to __clock_nanosleep@GLIBC_PRIVATE (and similar):

% nix-shell --pure
nix-shell % sh bootstrap.sh
[...]
nix-shell % configure && make -j4
[...]

  LD     src/libstore/libnixstore.so
  LD     src/libexpr/libnixexpr.so
  LD     src/libmain/libnixmain.so
  LD     src/nix/nix
/nix/store/7wy2mifb0igrp9hzf9dzwddadbs7ai7d-binutils-2.31.1/bin/ld: /nix/store/sc7lh1dhvd7fg28d7dxwsqzfcinnr6j5-glibc-2.30/lib/librt.so.1: undefined reference to `__clock_nanosleep@GLIBC_PRIVATE'
/nix/store/7wy2mifb0igrp9hzf9dzwddadbs7ai7d-binutils-2.31.1/bin/ld: /nix/store/sc7lh1dhvd7fg28d7dxwsqzfcinnr6j5-glibc-2.30/lib/librt.so.1: undefined reference to `__clock_getres@GLIBC_PRIVATE'
/nix/store/7wy2mifb0igrp9hzf9dzwddadbs7ai7d-binutils-2.31.1/bin/ld: /nix/store/sc7lh1dhvd7fg28d7dxwsqzfcinnr6j5-glibc-2.30/lib/librt.so.1: undefined reference to `__clock_getcpuclockid@GLIBC_PRIVATE'
/nix/store/7wy2mifb0igrp9hzf9dzwddadbs7ai7d-binutils-2.31.1/bin/ld: /nix/store/sc7lh1dhvd7fg28d7dxwsqzfcinnr6j5-glibc-2.30/lib/librt.so.1: undefined reference to `__clock_settime@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
make: *** [mk/lib.mk:105: src/nix/nix] Error 1
@blitz
Copy link
Contributor Author

blitz commented Feb 26, 2020

This does not reproduce on NixOS, which suggests that there is some impurity in the nix-shell --pure. Any pointers are appreciated.

@domenkozar
Copy link
Member

The impurity is glibc. See NixOS/nixpkgs#84043 for an example.

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