Hello,
I’m encountering an issue during the linking phase of my CUDA project. All my CUDA files compile successfully, but I get the following error when linking:
fatbindata already defined
error with lto wrapper
I am using the same code that was working before but I changed the server and gpu I run my code.
CUDA Version: [CUDA V12.0.140]
Compiler: [ C Compiler: /usr/bin/gcc-12 -- C++ Compiler: /usr/bin/g++-12]
Build System: [CMake, Unix Makefiles]
OS: [Ubuntu 24.04.1 LTS]
I Verified that there are no duplicate definitions in my code.
However, the issue persists. Has anyone encountered this before, or does anyone have suggestions on how to resolve it?
Thank you in advance for your help!
Rafael Scatena
[100%] Linking CXX executable PRISMAMESH
tmpxft_000eefd3_00000000-7_CudaRayTriangle.cudafe1.stub.c:4:88: warning: type of ‘hostRefKernelArrayInternalLinkage’ does not match original declaration [-Wlto-type-mismatch]
tmpxft_000eefdb_00000000-7_CudaOctreeAux.cudafe1.stub.c:4:88: note: array types have different bounds
tmpxft_000eefdb_00000000-7_CudaOctreeAux.cudafe1.stub.c:4:88: note: ‘hostRefKernelArrayInternalLinkage’ was previously declared here
tmpxft_000eefd3_00000000-7_CudaRayTriangle.cudafe1.stub.c:37:88: warning: type of ‘hostRefKernelArrayExternalLinkage’ does not match original declaration [-Wlto-type-mismatch]
tmpxft_000eefdb_00000000-7_CudaOctreeAux.cudafe1.stub.c:59:88: note: array types have different bounds
tmpxft_000eefdb_00000000-7_CudaOctreeAux.cudafe1.stub.c:59:88: note: ‘hostRefKernelArrayExternalLinkage’ was previously declared here
/tmp/ccREtucS.s: Assembler messages:
/tmp/ccREtucS.s:38817: Erro: symbol `fatbinData' is already defined
/tmp/ccREtucS.s:39453: Erro: symbol `fatbinData' is already defined
make[3]: *** [/tmp/ccMOrdcs.mk:2: /tmp/ccnDAIAM.ltrans0.ltrans.o] Erro 1
make[3]: ** Esperando que outros processos terminem.
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: erro: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/PRISMAMESH.dir/build.make:778: PRISMAMESH] Erro 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/PRISMAMESH.dir/all] Erro 2
make: *** [Makefile:91: all] Erro 2