The following issue can be seen on several builds:
https://nix-cache.s3.amazonaws.com/log/piwrmvacwqvzhqa4j2idmrxbz4xcrd6g-timemachine-0.3.1.drv
/nix/store/bxgwclk8kjjczlrkilwb12jhcm0n8syk-binutils-2.30/bin/ld: meters.o: undefined reference to symbol 'log10@@GLIBC_2.2.5'
/nix/store/p8fyjvz3djclmndwxjfcj7zkmx89wniw-glibc-2.27/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:364: timemachine] Error 1
make[2]: Leaving directory '/build/source/src'
make[1]: *** [Makefile:368: all-recursive] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:309: all] Error 2
builder for '/nix/store/piwrmvacwqvzhqa4j2idmrxbz4xcrd6g-timemachine-0.3.1.drv' failed with exit code 2
https://nix-cache.s3.amazonaws.com/log/i0h4pfb327cjc8dmp0ypbqzrvsw5ykip-lash-0.5.4.drv
/nix/store/bxgwclk8kjjczlrkilwb12jhcm0n8syk-binutils-2.30/bin/ld: lashd-alsa_mgr.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'
/nix/store/p8fyjvz3djclmndwxjfcj7zkmx89wniw-glibc-2.27/lib/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:340: lashd] Error 1
make[2]: Leaving directory '/build/lash-0.5.4/lashd'
make[1]: *** [Makefile:327: all-recursive] Error 1
make[1]: Leaving directory '/build/lash-0.5.4'
make: *** [Makefile:237: all] Error 2
builder for '/nix/store/i0h4pfb327cjc8dmp0ypbqzrvsw5ykip-lash-0.5.4.drv' failed with exit code 2
https://nix-cache.s3.amazonaws.com/log/agp0brdp9s78w8j1zxpg0xwqwrayg4gw-tangogps-0.99.2.drv
/nix/store/bxgwclk8kjjczlrkilwb12jhcm0n8syk-binutils-2.30/bin/ld: callbacks.o: undefined reference to symbol 'acos@@GLIBC_2.2.5'
/nix/store/p8fyjvz3djclmndwxjfcj7zkmx89wniw-glibc-2.27/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:353: tangogps] Error 1
make[2]: Leaving directory '/build/tangogps-0.99.2/src'
make[1]: *** [Makefile:376: all-recursive] Error 1
make[1]: Leaving directory '/build/tangogps-0.99.2'
make: *** [Makefile:285: all] Error 2
builder for '/nix/store/agp0brdp9s78w8j1zxpg0xwqwrayg4gw-tangogps-0.99.2.drv' failed with exit code 2
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
These errors say which library was missing on the command line, e.g. that tangogps is missing -lm.
It surprised me to see several occurrences of this. It made me wonder whether there have been any underlying changes.
I find it very likely to have been triggered by #51770. I have a local rebuild in progress verifying that (local revert of that change atop staging-next).
Gentoo is patching them to add the missing libraries:
https://data.gpo.zugaina.org/gentoo/media-sound/timemachine/timemachine-0.3.3-r1.ebuild
https://data.gpo.zugaina.org/gentoo/media-sound/timemachine/files/timemachine-0.3.3-underlinking.patch
https://data.gpo.zugaina.org/gentoo/media-sound/lash/lash-0.5.4-r3.ebuild
https://data.gpo.zugaina.org/gentoo/media-sound/lash/files/lash-0.5.4-underlinking.patch
Confirmed that was the commit. I haven't looked deeply into this PR/issue, but I expect it will be best to patch the individual expressions, if there aren't too many, e.g. simply extend LDFLAGS for those derivations. I wonder why the error (apparently) doesn't happen on some distributions and does on others.
I believe there are approximately 50 expressions that would need patching for x86_64-linux platform based on the latest staging-next evaluation accounting for direct failures from this change.
I've been collecting some fixes on https://github.com/NixOS/nixpkgs/compare/staging-next...pbogdan:dt-needed (mostly just adding LDFLAGS as needed, mixed with some patches). As far as differences between Nix(OS) and other distros so far I've seen examples of:
though I haven't inspected each and every failing package beyond adding needed flags (or adding patches where I did).
We have the problem in master now. @pbogdan: do you know about any "risks" in merging your branch now? I'm looking at it ATM, but I'd prefer your ACK anyway.
As you mentioned on the linked PR I'm also unsure what would be the impact on Darwin as I don't really have any means of testing on that platform. I believe that out of the touched expressions / attributes only the following evaluate on Darwin:
I did build all of the directly affected packages on x86_64-linux, at the time I was testing this based on staging-next I couldn't test a build of packages that depend on the expressions touched as IIRC there were other (unrelated) build failures :-(.
It's in master now. If some of these regressions remained, it would be just a few.
Most helpful comment
I find it very likely to have been triggered by #51770. I have a local rebuild in progress verifying that (local revert of that change atop staging-next).