# Installation Error on WSL2 with CUDA Toolkit

**URL:** <https://gromacs.bioexcel.eu/t/installation-error-on-wsl2-with-cuda-toolkit/12528>\
**Category:** User discussions\
**Tags:** gpu, installation-error\
**Created:** [August 13, 2025, 8:45pm UTC](https://gromacs.bioexcel.eu/t/installation-error-on-wsl2-with-cuda-toolkit/12528 "2025-08-13T20:45:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brucez](https://avatars.discourse-cdn.com/v4/letter/b/b487fb/32.png) [@brucez](https://gromacs.bioexcel.eu/u/brucez)\
**Post date:** [August 13, 2025, 8:45pm UTC](https://gromacs.bioexcel.eu/t/installation-error-on-wsl2-with-cuda-toolkit/12528/1 "2025-08-13T20:45:43Z")

</div>

GROMACS version: 2025.2  
GROMACS modification: No  
Here post your question

Hello,  
I tried to install GROMACS 2025.2 on wsl2-Ubuntu 22.04.5 with CUDA. My device has an NVidia RTX 2060. Here’s the cmake command I used:  
`cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=CUDA -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/gcc -DCMX_CUDA_TARGET_SM=“75”`

While running `make` I then receive the following error:

```auto
[92%] Linking CXX shared library ../../lib/libgromacs.so
/usr/bin/ld: CMakeFiles/libgromacs.dir/nbnxm/cuda/nbnxm_cuda.cu.o: in function `gmx::gpu_launch_kernel_pruneonly(gmx::NbnxmGpu*, gmx::InteractionLocality, int)': tmpxft_0001cfc1_00000000-6_nbnxm_cuda.compute_120.cudafe1.cpp:(.text+0x605): undefined reference to `void gmx::nbnxn_kernel_prune_cuda<true>(gmx::NBAtomDataGpu, gmx::NBParamGpu, gmx::GpuPairlist, int)' /usr/bin/ld: CMakeFiles/libgromacs.dir/nbnxm/cuda/nbnxm_cuda.cu.o: relocation R_X86_64_PC32 against undefined hidden symbol `_ZN3gmx23nbnxn_kernel_prune_cudaILb1EEEvNS_13NBAtomDataGpuENS_10NBParamGpuENS_11GpuPairlistEi' can not be used when making a shared object /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: ***[src/gromacs/CMakeFiles/libgromacs.dir/build.make:14521: lib/libgromacs.so.10.0.0] Error 1 make[1]:*** [CMakeFiles/Makefile2:5606: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2 make: *** [Makefile:166: all] Error 2

```

My GCC version is 11.4.0 and my Cuda Toolkit version is 13.0.48. I would appreciate any help people here can offer.

---

<div class="post-metadata">

**Author:** ![al42and](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/al42and/32/1393_2.png) [@al42and](https://gromacs.bioexcel.eu/u/al42and)\
**Post date:** [August 13, 2025, 10:40pm UTC](https://gromacs.bioexcel.eu/t/installation-error-on-wsl2-with-cuda-toolkit/12528/2 "2025-08-13T22:40:42Z")

</div>

Hi.

CUDA 13 will be supported since GROMACS 2025.3 (planned for September).

For now, you can fix the problem by adding `-DCMAKE_CUDA_FLAGS=-static-global-template-stub=false` to your CMake command. Or downgrade CUDA to 12.9, that one works without any extra steps.
