Syllo / nvtop

GPU & Accelerator process monitoring for AMD, Apple, Huawei, Intel, NVIDIA and Qualcomm
Other
7.98k stars 291 forks source link

Build on Ubuntu 18.04 fails #97

Closed flavienbwk closed 3 years ago

flavienbwk commented 3 years ago

Hi,

Following the build steps, after cmake successfuly building, I get the following error :

$> make

Scanning dependencies of target nvtop
[ 12%] Building C object src/CMakeFiles/nvtop.dir/nvtop.c.o
[ 25%] Building C object src/CMakeFiles/nvtop.dir/interface.c.o
[ 37%] Building C object src/CMakeFiles/nvtop.dir/interface_layout_selection.c.o
[ 50%] Building C object src/CMakeFiles/nvtop.dir/get_process_info_linux.c.o
[ 62%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo.c.o
[ 75%] Building C object src/CMakeFiles/nvtop.dir/time.c.o
[ 87%] Building C object src/CMakeFiles/nvtop.dir/plot.c.o
[100%] Linking C executable nvtop
CMakeFiles/nvtop.dir/extract_gpuinfo.c.o: In function `update_device_infos':
extract_gpuinfo.c:(.text+0x105d): undefined reference to `nvmlDeviceGetGraphicsRunningProcesses_v2'
extract_gpuinfo.c:(.text+0x1125): undefined reference to `nvmlDeviceGetComputeRunningProcesses_v2'
collect2: error: ld returned 1 exit status
src/CMakeFiles/nvtop.dir/build.make:253: recipe for target 'src/nvtop' failed
make[2]: *** [src/nvtop] Error 1
CMakeFiles/Makefile2:117: recipe for target 'src/CMakeFiles/nvtop.dir/all' failed
make[1]: *** [src/CMakeFiles/nvtop.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Thanks for your help

ralpioxxcs commented 3 years ago

If you did cmake .. -DNVML_RETRIEVE_HEADER_ONLINE=True just try cmake .. I solved it in my case.