Nvlink warning : Skipping incompatible

Continuing the discussion from Nvlink warning - cannot find libraries:

Hello, I am facing the same issue as reported in the linked thread above, on my Manjaro Linux system, which has GNU 12.2, when building my code with NVHPC SDK 22.9:

nvlink warning : Skipping incompatible '/usr/lib64/libdl.a' when searching for -ldl
nvlink warning : Skipping incompatible '/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib64/libdl.a' when searching for -ldl
nvlink warning : Skipping incompatible '/usr/lib64/libpthread.a' when searching for -lpthread
nvlink warning : Skipping incompatible '/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib64/libpthread.a' when searching for -lpthread
nvlink warning : Skipping incompatible '/usr/lib64/librt.a' when searching for -lrt
nvlink warning : Skipping incompatible '/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib64/librt.a' when searching for -lrt

I wonder if someone has faced this issue before and found a way around this? Thanks!

(Unrelated: this minor issue was fixed in 22.9)

I’ve not been able to recreate this issue myself so don’t know exactly what’s wrong, but I believe as of libc2.34 libdl.a, libpthread.a, and librt.a are now empty archives. Hence the warning from nvlink as it’s searching for a suitable version of the library (most likely then resolving to the shared object).

It is just a warning so most likely benign though some build systems flag warnings as errors so might be a problem there. We do have the “-Wnvlink,-w” option which will pass the flag to disable warnings to nvlink. You might give this a try so the warnings are not emitted.

-Mat

1 Like

Thank you, Mat.

It is benign for my application, it just prints lots of warnings (six for each compute capability I’m compiling for). The flags you suggest disabled them successfully, though I prefer not to use them to be sure I don’t suppress something which may be important.