Nvlink warning - cannot find libraries

Hello, I am running a fresh install of NVHPC, installed via aur (on Manjaro Linux). When compiling some Fortran code, I am seeing a collection of warnings outputted, listing some missing libraries:

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.1.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.1.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.1.0/../../../../lib64/librt.a' when searching for -lrt

The simple tests I’ve run so far regarding nvfortran seem to be processing on the GPU, but I’m just not sure about what these warnings are referring to, so I was hoping for a little clarification. Thank you anyone, in advance, for your generous assistance.

I’ve not seen this myself either, but my best guess is that there’s some compatible with these GNU 12.1 static libraries. Probably not too surprising given 12.1 just came out about a month ago.

Are you trying to link statically (via “-Bstatic” or “-static”)? While I haven’t worked with GNU 12.1 as of yet, in the past they have sometimes had cases where the systems libraries can’t be linked statically. If this is the case, try linking just our runtime statically via the “-static-nvidia” flag.

Okay, interesting. I’m not attempting any static linking. Perhaps this is some compatibility issue? As I mentioned, I’m not seeing any actual problems regarding compilation and execution, though I still have only been playing around with simple examples as of yet.

FYI: if I try to link statically, I get a larger set of warnings:

    ~/th/c/test_cuda  $ nvfortran -stdpar=gpu -static test_add.f95 -o testadd                    2 ✘ 
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.1.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.1.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.1.0/../../../../lib64/librt.a' when searching for -lrt
/usr/bin/ld: warning: /opt/nvidia/Linux_x86_64/21.9/compilers/lib/nvhpc.ld contains output sections; did you forget -T?
/usr/bin/ld: cannot find -laccdevaux: No such file or directory
/usr/bin/ld: cannot find -laccdevaux: No such file or directory
/usr/bin/ld: cannot find -lnvhpcman: No such file or directory
/usr/bin/ld: cannot find -lcuda: No such file or directory
/usr/bin/ld: cannot find -lcudadevice: No such file or directory
/usr/bin/ld: cannot find -lcudanvhpc: No such file or directory
pgacclnk: child process exit status 1: /usr/bin/ld

Perhaps, though again I’ve not seen this before so just guessing that it’s a compatibility issue with GNU 12.1.

For “-static”, I wasn’t implying that you should use it. It’s actually mostly a useless options since more and more system libraries don’t have static versions. “-static-nvidia” will use our static libraries, but dynamically link to the system libraries. Not that you should need it here, but just an FYI.

I noticed you’re using NV HPC 21.9. You might try moving to our latest 22.5 which ships with CUDA 11.7. Given GNU 12.1 is so new, CUDA 11.7 still may give you the warnings, but worth a try.

Hello @MatColgrove and thanks for the tips. Indeed, I don’t intend to use static linking. Just thought I’d try it and see what is outputted. As for the NV HPC version, I have just seen today a 22.5 version AUR that has been put up. I will give it a try and update if there is any change regarding this issue.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.