I’m getting some confusing autoPatchelfHook behavior. I have a derivation that pulls down a python wheel with binaries and then attempts to patch them with autoPatchelfHook. Without any autoPatchelfHook I get
> ldd result/lib/python3.9/site-packages/jaxlib/_pocketfft.so
linux-vdso.so.1 (0x00007fff714fd000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff031943000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff031928000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff031905000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff031713000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff031bb4000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff0315c4000)
Ok, makes sense lots of nix-unfriendly paths. Then if I add just nativeBuildInputs = [ autoPatchelfHook ];
I get an error:
autoPatchelfHook could not satisfy dependency libstdc++.so.6
which also makes sense to me, since I need to add those things as dependencies. So I add buildInputs = [ stdenv.cc.cc ];
, and then everything builds just fine, but I see:
> ldd result/lib/python3.9/site-packages/jaxlib/_pocketfft.so
result/lib/python3.9/site-packages/jaxlib/_pocketfft.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/0kiykyrnrpfhmjwxwx89kxr20hmf5304-gcc-10.3.0-lib/lib/libstdc++.so.6)
linux-vdso.so.1 (0x00007ffc2cb77000)
libstdc++.so.6 => /nix/store/0kiykyrnrpfhmjwxwx89kxr20hmf5304-gcc-10.3.0-lib/lib/libstdc++.so.6 (0x00007fb9d707c000)
libgcc_s.so.1 => /nix/store/0kiykyrnrpfhmjwxwx89kxr20hmf5304-gcc-10.3.0-lib/lib/libgcc_s.so.1 (0x00007fb9d7062000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb9d7026000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb9d6e34000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb9d72ca000)
libm.so.6 => /nix/store/9bh3986bpragfjmr32gay8p95k91q4gy-glibc-2.33-47/lib/libm.so.6 (0x00007fb9d6cf3000)
which still appears to contain a bunch of nix-unfriendly paths.
Why isn’t autoPatchelfHook touching these other dependencies? Is everything ok?