Hey,
I’ve been trying to compile a small tool statically. However, when I specify the -static flag, and the --cudart static --cudadevrt static, turns out the libcudart_static.a static library is calling dlopen under the hood. This seems to make it impossible to compile with glibc statically too. (technically it compiles but segfaults directly)
/usr/bin/ld: /usr/local/cuda-12/bin/../targets/x86_64-linux/lib/libcudart_static.a(cudart_static.o): in function `libcudart_static_aa4a6bcb5fce58be20d542d9b467101e0a9360a5':
(.text+0x2453e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
NVIDIA’s Single GPU Jacobi implementation
Is there a path around it? Is it really the case that the “static” libcudart library is using dlopen behind the scenes? should I give up on building a completely static binary?
Details:
- Application being compiled Nvidia’s Single GPU Jacobi implementation (I edited the Makefile and the jacobi.cu to attempt build the static version)
jacobi.cu.txt (9.8 KB)
Makefile.txt (948 Bytes)