-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I use Ubuntu on WSL2. I have an NVIDIA GeForce 3050 Ti Laptop GPU on my laptop, and I am trying to get CUDA Toolkit installed for use in WSL2. From online documentation, I found that I only need to install the necessary NVIDIA Game Ready driver (based on the information here) on Windows, and not inside WSL Ubuntu. I installed the driver on Windows and then followed the rest of the instructions to install ONLY the CUDA Toolkit inside WSL (excluding the driver).
I went here to complete post-installation actions and test out the new CUDA installation using this cuda-samples repository. I followed the instructions on the README on this repository. When I ran cmake, this was the output I got:
-- The CUDA compiler identification is NVIDIA 12.8.93
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda-12.8/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found CUDAToolkit: /usr/local/cuda-12.8/include (found version "12.8.93")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'simpleCUDA2GL'
-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
-- MPI not found - will not build sample 'simpleMPI'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'simpleTexture3D'
-- Could NOT find EGL (missing: EGL_LIBRARY EGL_INCLUDE_DIR)
-- EGL not found - will not build sample 'EGLStream_CUDA_CrossGPU'
-- Could NOT find EGL (missing: EGL_LIBRARY EGL_INCLUDE_DIR)
-- EGL not found - will not build sample 'EGLStream_CUDA_Interop'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'FunctionPointers'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'boxFilter'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'imageDenoising'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'particles'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'bindlessTexture'
-- Could NOT find FreeImage (missing: FreeImage_LIBRARY FreeImage_INCLUDE_DIR)
-- FreeImage not found - will not build sample 'FilterBorderControlNPP'
-- Could NOT find FreeImage (missing: FreeImage_LIBRARY FreeImage_INCLUDE_DIR)
-- FreeImage not found - will not build sample 'boxFilterNPP'
-- Could NOT find FreeImage (missing: FreeImage_LIBRARY FreeImage_INCLUDE_DIR)
-- FreeImage not found - will not build sample 'cannyEdgeDetectorNPP'
-- NvSCI not found - will not build sample 'cudaNvSci'
-- Could NOT find FreeImage (missing: FreeImage_LIBRARY FreeImage_INCLUDE_DIR)
-- FreeImage not found - will not build sample 'freeImageInteropNPP'
-- Could NOT find FreeImage (missing: FreeImage_LIBRARY FreeImage_INCLUDE_DIR)
-- FreeImage not found - will not build sample 'histEqualizationNPP'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'oceanFFT'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'randomFog'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'Mandelbrot'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'SobelFilter'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'bicubicTexture'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'bilateralFilter'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'fluidsGL'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'marchingCubes'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'nbody'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'postProcessGL'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'recursiveGaussian'
-- Sample 'simpleD3D11' is Windows-only - skipping
-- Sample 'simpleD3D11Texture' is Windows-only - skipping
-- Sample 'simpleD3D12' is Windows-only - skipping
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'simpleGL'
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Looking for GLFW/glfw3.h
-- Looking for GLFW/glfw3.h - not found
-- Vulkan not found - will not build sample 'simpleVulkan'
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Vulkan not found - will not build sample 'simpleVulkanMMAP'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'smokeParticles'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'volumeFiltering'
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- OpenGL not found - will not build sample 'volumeRender'
-- Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR)
-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
-- Vulkan not found - will not build sample 'vulkanImageCUDA'
-- Using CUDA_HOME: /usr/local/cuda-12.8
-- Using CUDA_LIB: /usr/lib/wsl/lib/libcuda.so
-- Using LIBNVVM_HOME: /usr/local/cuda-12.8/nvvm
-- Using libnvvm header: /usr/local/cuda-12.8/nvvm/include/nvvm.h
-- Using libnvvm header path: /usr/local/cuda-12.8/nvvm/include
-- Using libnvvm library: /usr/local/cuda-12.8/nvvm/lib64/libnvvm.so
-- Using rpath: /usr/local/cuda-12.8/nvvm/lib64
-- Skipping the build of the cuda-c-linking sample.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shivariyer/cuda-samples/build
Now, the cmake finished fine, without errors, and subsequently the make also ran successfully (except for warnings).
But I am curious as to why OpenGL, Vulkan, etc. couldn't be found! It seems like my Windows installation of the NVIDIA should've installed OpenGL. So it seems like the cmake isn't able to locate them.