WSL 2 Libcuda configure step fails

Make fails with error when trying to configure libcud.a

Sepcs:

  • Kernel: 5.15.133.1-microsoft-standard-WSL2
  • WSL: 2.0.14
  • nvcc on WSL works
➜  ~ nvcc
nvcc fatal   : No input files specified; use option --help for more information
  • nvcc on windows does not
C:\Windows\System32\lxss\lib>nvcc
'nvcc' is not recognized as an internal or external command,
operable program or batch file.
  • Symlinks created for libcuda.so and libcuda.so.1

  • These are added to the path

/usr/local/cuda-12.3/lib64:/usr/local/cuda-12.3/bin:/usr/lib/wsl/lib

nvidia-smi output from WSL
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.129.01 Driver Version: 537.70 CUDA Version: 12.2 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA T1000 On | 00000000:01:00.0 On | N/A |
| 36% 47C P8 N/A / 50W | 1288MiB / 4096MiB | 2% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+
| 1 NVIDIA T1000 On | 00000000:02:00.0 Off | N/A |
| 51% 34C P8 N/A / 50W | 0MiB / 4096MiB | 0% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+

±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 24 G /Xwayland N/A |
| 1 N/A N/A 24 G /Xwayland N/A |
±--------------------------------------------------------------------------------------+

nvidia-smi output from windows

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 537.70                 Driver Version: 537.70       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                     TCC/WDDM  | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA T1000                 WDDM  | 00000000:01:00.0  On |                  N/A |
| 36%   46C    P8              N/A /  50W |   1257MiB /  4096MiB |      2%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
|   1  NVIDIA T1000                 WDDM  | 00000000:02:00.0 Off |                  N/A |
| 51%   34C    P8              N/A /  50W |      0MiB /  4096MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      6444    C+G   ...on\122.0.2365.52\msedgewebview2.exe    N/A      |
|    0   N/A  N/A      7088    C+G   C:\Windows\explorer.exe                   N/A      |
|    0   N/A  N/A      8568    C+G   ...ekyb3d8bbwe\PhoneExperienceHost.exe    N/A      |
|    0   N/A  N/A      9332    C+G   ...Programs\Microsoft VS Code\Code.exe    N/A      |
|    0   N/A  N/A     15444    C+G   ...2txyewy\StartMenuExperienceHost.exe    N/A      |
|    0   N/A  N/A     15752    C+G   ....Search_cw5n1h2txyewy\SearchApp.exe    N/A      |
|    0   N/A  N/A     16792    C+G   ...crosoft\Edge\Application\msedge.exe    N/A      |
|    0   N/A  N/A     16956    C+G   ...CBS_cw5n1h2txyewy\TextInputHost.exe    N/A      |
|    0   N/A  N/A     19916    C+G   ...070_x64__8wekyb3d8bbwe\ms-teams.exe    N/A      |
|    0   N/A  N/A     20220    C+G   ...les\Microsoft OneDrive\OneDrive.exe    N/A      |
|    0   N/A  N/A     20768    C+G   ...x86)\Jabra\Direct6\jabra-direct.exe    N/A      |
|    0   N/A  N/A     22140    C+G   ...siveControlPanel\SystemSettings.exe    N/A      |
|    0   N/A  N/A     26876    C+G   ...on\122.0.2365.59\msedgewebview2.exe    N/A      |
|    0   N/A  N/A     27844    C+G   ...64__8wekyb3d8bbwe\CalculatorApp.exe    N/A      |
|    0   N/A  N/A     28964    C+G   ...5n1h2txyewy\ShellExperienceHost.exe    N/A      |
|    0   N/A  N/A     29588    C+G   ...__8wekyb3d8bbwe\WindowsTerminal.exe    N/A      |
|    0   N/A  N/A     32084    C+G   ...oogle\Chrome\Application\chrome.exe    N/A      |
|    0   N/A  N/A     38576    C+G   ...t.LockApp_cw5n1h2txyewy\LockApp.exe    N/A      |
|    0   N/A  N/A     38740    C+G   ...(x86)\Heimdal\Heimdal.ThorAgent.exe    N/A      |
+---------------------------------------------------------------------------------------+

The error

Copying translator module into output directory
[  0%] Built target translate
[ 13%] Built target preprocess
[ 13%] Performing configure step for 'libcudd.a'
configure.ac:131: warning: The macro 'AC_TRY_RUN' is obsolete.
configure.ac:131: You should run autoupdate.
./lib/autoconf/general.m4:2995: AC_TRY_RUN is expanded from...
lib/m4sugar/m4sh.m4:690: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:697: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
configure.ac:131: the top level
configure: error: cannot run /bin/bash ./build-aux/config.sub
make[2]: *** [search/CMakeFiles/libcudd.a.dir/build.make:92: /home/bartek/projects/private/GNN-planning-paper/fast-downward-symbolic-optimal-actions/src/search/cudd-3.0.0/src/libcudd.a-stamp/libcudd.a-configure] Error 2
make[1]: *** [CMakeFiles/Makefile2:198: search/CMakeFiles/libcudd.a.dir/all] Error 2