Static CUDA build: nvcc --lib?
Hi,
we are trying to link an AMReX app (WarpX) with Ascent and VTK-m and receive linker errors of the form
opt/spack/linux-rhel7-power9le/gcc-6.4.0/vtk-m-1.5.3-snfxd2wslbxozktt7zkxw6z5pjvrlt2j/lib/libvtkm_cont-1.5.a(CudaAllocator.cu.o):
In function `__sti____cudaRegisterAll()':
tmpxft_00019c0b_00000000-5_CudaAllocator.cudafe1.cpp:(.text.startup._ZL24__sti____cudaRegisterAllv+0x34): undefined reference to `__cudaRegisterLinkedBinary_48_tmpxft_00019c0b_00000000_6_CudaAllocator_cpp1_ii_8727e6b7'
when linking the final executable.
VTK-m is build as static lib in this case. AMReX uses RDC and if we change AMReX to build statically or shared does not change the situation.
Is it possible the static VTK-m libraries should be setting CUDA_RESOLVE_DEVICE_SYMBOLS
?
Edited by Axel Huebl