openEuler-24.03上运行cuda-samples的软件依赖

在openEuler-24.03上运行cuda-samples测试用例时,会提示缺少一些依赖,本文就缺少的依赖提示总结下需要安装哪些依赖包.
从官方仓库下载cuda-samples,然后执行make test命令进行cuda测试.

make[1]: Entering directory '/home/storage/bshang-home/cuda-samples/Samples/2_Concepts_and_Techniques/FunctionPointers'
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --threads 0 --std=c++11 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o FunctionPointers.o -c FunctionPointers.cpp
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --threads 0 --std=c++11 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o FunctionPointers_kernels.o -c FunctionPointers_kernels.cu
/usr/local/cuda/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o FunctionPointers FunctionPointers.o FunctionPointers_kernels.o -L/usr/lib64/nvidia -lGL -lGLU -lglut
/usr/bin/ld: cannot find -lglut: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:367: FunctionPointers] Error 1
make[1]: Leaving directory '/home/storage/bshang-home/cuda-samples/Samples/2_Concepts_and_Techniques/FunctionPointers'
make: *** [Makefile:48: Samples/2_Concepts_and_Techniques/FunctionPointers/Makefile.ph_test] Error 2

安装如下软件来解决:
[root@localhost cuda-samples]# yum install freeglut.x86_64 freeglut-devel.x86_64


make[1]: Entering directory '/home/storage/bshang-home/cuda-samples/Samples/4_CUDA_Libraries/oceanFFT'
>>> WARNING - libGLU.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<<
>>> WARNING - gl.h not found, refer to CUDA Getting Started Guide for how to find and install them. <<<
>>> WARNING - glu.h not found, refer to CUDA Getting Started Guide for how to find and install them. <<<
[@] /usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --threads 0 --std=c++11 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o oceanFFT.o -c oceanFFT.cpp

安装如下软件来解决:
[root@localhost cuDLAStandaloneMode]# yum install mesa-libGLU.x86_64 mesa-libGLU-devel.x86_64


WARNING - No MPI compiler found.
-----------------------------------------------------------------------------------------------
CUDA Sample "simpleMPI" cannot be built without an MPI Compiler.
This will be a dry-run of the Makefile.
For more information on how to set up your environment to build and run this
sample, please refer the CUDA Samples documentation and release notes
-----------------------------------------------------------------------------------------------

安装如下软件来解决:
[root@localhost cuda-samples]# yum install openmpi-devel.x86_64 openmpi.x86_64


make[1]: Leaving directory '/home/storage/bshang-home/cuda-samples/Samples/4_CUDA_Libraries/batchCUBLAS'
make[1]: Entering directory '/home/storage/bshang-home/cuda-samples/Samples/4_CUDA_Libraries/histEqualizationNPP'
test.c:1:10: fatal error: FreeImage.h: No such file or directory
    1 | #include "FreeImage.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
>>> WARNING - FreeImage is not set up correctly. Please ensure FreeImage is set up correctly. <<<
[@] /usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -I../../../Common/UtilNPP -m64 --threads 0 --std=c++11 -gencode arch=compute_50,code=compute_50 -o histEqualizationNPP.o -c histEqualizationNPP.cpp
[@] /usr/local/cuda/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_50,code=compute_50 -o histEqualizationNPP histEqualizationNPP.o -lnppisu -lnppist -lnppicc -lnppc -lfreeimage
[@] mkdir -p ../../../bin/x86_64/linux/release
[@] cp histEqualizationNPP ../../../bin/x86_64/linux/release
make[1]: Leaving directory '/home/storage/bshang-home/cuda-samples/Samples/4_CUDA_Libraries/histEqualizationNPP'
make[1]: Entering directory '/home/storage/bshang-home/cuda-samples/Samples/4_CUDA_Libraries/freeImageInteropNPP'
test.c:1:10: fatal error: FreeImage.h: No such file or directory
    1 | #include "FreeImage.h"
      |          ^~~~~~~~~~~~~
compilation terminated.

安装如下软件来解决:
[root@localhost cuda-samples]# yum install freeimage.x86_64 freeimage-devel.x86_64
1 Like