Building within Raspberry Pi 4 OS Lite, fails with make? #326
-
During linking it fails with:
sudo apt install git libncurses-dev cmake libsystemd-dev libudev-dev libgtest-dev
git clone https://github.com/Syllo/nvtop.git && cd nvtop
mkdir build
cd build
$ cmake .. -DV3D_SUPPORT=ON -DNVIDIA_SUPPORT=OFF -DAMDGPU_SUPPORT=OFF -DINTEL_SUPPORT=OFF -DMSM_SUPPORT=OFF -DAPPLE_SUPPORT=OFF -DPANFROST_SUPPORT=OFF -DPANTHOR_SUPPORT=OFF -DASCEND_SUPPORT=OFF
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for cbreak in /usr/lib/aarch64-linux-gnu/libncursesw.so
-- Looking for cbreak in /usr/lib/aarch64-linux-gnu/libncursesw.so - found
-- Found Curses: /usr/lib/aarch64-linux-gnu/libncursesw.so
-- Performing Test HAS_REALLOCARRAY
-- Performing Test HAS_REALLOCARRAY - Success
-- Found UDev: /usr/lib/aarch64-linux-gnu/libudev.so (found version "252")
-- Libudev stable: TRUE
-- Found Systemd: /usr/lib/aarch64-linux-gnu/libsystemd.so (found version "252")
-- Performing Test compiler_has-Wall
-- Performing Test compiler_has-Wall - Success
-- Performing Test compiler_has-Wextra
-- Performing Test compiler_has-Wextra - Success
-- Performing Test compiler_has-Waddress
-- Performing Test compiler_has-Waddress - Success
-- Performing Test compiler_has-Waggressive-loop-optimizations
-- Performing Test compiler_has-Waggressive-loop-optimizations - Success
-- Performing Test compiler_has-Wbad-function-cast
-- Performing Test compiler_has-Wbad-function-cast - Success
-- Performing Test compiler_has-Wmissing-declarations
-- Performing Test compiler_has-Wmissing-declarations - Success
-- Performing Test compiler_has-Wmissing-parameter-type
-- Performing Test compiler_has-Wmissing-parameter-type - Success
-- Performing Test compiler_has-Wmissing-prototypes
-- Performing Test compiler_has-Wmissing-prototypes - Success
-- Performing Test compiler_has-Wnested-externs
-- Performing Test compiler_has-Wnested-externs - Success
-- Performing Test compiler_has-Wold-style-declaration
-- Performing Test compiler_has-Wold-style-declaration - Success
-- Performing Test compiler_has-Wold-style-definition
-- Performing Test compiler_has-Wold-style-definition - Success
-- Performing Test compiler_has-Wstrict-prototypes
-- Performing Test compiler_has-Wstrict-prototypes - Success
-- Performing Test compiler_has-Wpointer-sign
-- Performing Test compiler_has-Wpointer-sign - Success
-- Performing Test compiler_has-Wdouble-promotion
-- Performing Test compiler_has-Wdouble-promotion - Success
-- Performing Test compiler_has-Wuninitialized
-- Performing Test compiler_has-Wuninitialized - Success
-- Performing Test compiler_has-Winit-self
-- Performing Test compiler_has-Winit-self - Success
-- Performing Test compiler_has-Wstrict-aliasing
-- Performing Test compiler_has-Wstrict-aliasing - Success
-- Performing Test compiler_has-Wsuggest-attribute-const
-- Performing Test compiler_has-Wsuggest-attribute-const - Success
-- Performing Test compiler_has-Wtrampolines
-- Performing Test compiler_has-Wtrampolines - Success
-- Performing Test compiler_has-Wfloat-equal
-- Performing Test compiler_has-Wfloat-equal - Success
-- Performing Test compiler_has-Wshadow
-- Performing Test compiler_has-Wshadow - Success
-- Performing Test compiler_has-Wunsafe-loop-optimizations
-- Performing Test compiler_has-Wunsafe-loop-optimizations - Success
-- Performing Test compiler_has-Wfloat-conversion
-- Performing Test compiler_has-Wfloat-conversion - Success
-- Performing Test compiler_has-Wlogical-op
-- Performing Test compiler_has-Wlogical-op - Success
-- Performing Test compiler_has-Wnormalized
-- Performing Test compiler_has-Wnormalized - Success
-- Performing Test compiler_has-Wdisabled-optimization
-- Performing Test compiler_has-Wdisabled-optimization - Success
-- Performing Test compiler_has-Whsa
-- Performing Test compiler_has-Whsa - Success
-- Performing Test compiler_has-Wunused-result
-- Performing Test compiler_has-Wunused-result - Success
-- Performing Test compiler_has-Werror-implicit-function-declaration
-- Performing Test compiler_has-Werror-implicit-function-declaration - Success
-- Performing Test compiler_has-Wformat
-- Performing Test compiler_has-Wformat - Success
-- Performing Test compiler_has-Wformat-security
-- Performing Test compiler_has-Wformat-security - Success
-- Performing Test linker_has-Wl_-z_relro
-- Performing Test linker_has-Wl_-z_relro - Success
-- Found GTest: /usr/lib/aarch64-linux-gnu/cmake/GTest/GTestConfig.cmake (found version "1.12.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/test/nvtop/build
pi@pi:~/test/nvtop/build $ make
[ 6%] Building C object src/CMakeFiles/nvtop.dir/nvtop.c.o
[ 12%] Building C object src/CMakeFiles/nvtop.dir/interface.c.o
[ 18%] Building C object src/CMakeFiles/nvtop.dir/interface_layout_selection.c.o
[ 25%] Building C object src/CMakeFiles/nvtop.dir/interface_options.c.o
[ 31%] Building C object src/CMakeFiles/nvtop.dir/interface_setup_win.c.o
[ 37%] Building C object src/CMakeFiles/nvtop.dir/interface_ring_buffer.c.o
[ 43%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo.c.o
[ 50%] Building C object src/CMakeFiles/nvtop.dir/time.c.o
[ 56%] Building C object src/CMakeFiles/nvtop.dir/plot.c.o
[ 62%] Building C object src/CMakeFiles/nvtop.dir/ini.c.o
[ 68%] Building C object src/CMakeFiles/nvtop.dir/get_process_info_linux.c.o
[ 75%] Building C object src/CMakeFiles/nvtop.dir/extract_processinfo_fdinfo.c.o
[ 81%] Building C object src/CMakeFiles/nvtop.dir/info_messages_linux.c.o
[ 87%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo_v3d.c.o
[ 93%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo_v3d_utils.c.o
[100%] Linking C executable nvtop
/usr/bin/ld: CMakeFiles/nvtop.dir/extract_gpuinfo_v3d.c.o: in function `gpuinfo_v3d_refresh_dynamic_info':
extract_gpuinfo_v3d.c:(.text+0x1b8): undefined reference to `nvtop_device_get_syspath'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x1c4): undefined reference to `nvtop_device_new_from_syspath'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x1ec): undefined reference to `nvtop_device_unref'
/usr/bin/ld: CMakeFiles/nvtop.dir/extract_gpuinfo_v3d.c.o: in function `gpuinfo_v3d_get_device_handles':
extract_gpuinfo_v3d.c:(.text+0x260): undefined reference to `nvtop_enumerator_new'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x278): undefined reference to `nvtop_device_enumerator_add_match_subsystem'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x294): undefined reference to `nvtop_device_enumerator_add_match_property'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x2a4): undefined reference to `nvtop_enumerator_get_device_first'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x2b8): undefined reference to `nvtop_enumerator_get_device_next'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x2e0): undefined reference to `nvtop_enumerator_get_device_first'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x310): undefined reference to `nvtop_device_get_devname'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x334): undefined reference to `nvtop_device_get_parent'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x344): undefined reference to `nvtop_device_get_driver'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x390): undefined reference to `nvtop_device_ref'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x3a0): undefined reference to `nvtop_device_ref'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x414): undefined reference to `nvtop_enumerator_get_device_next'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0x42c): undefined reference to `nvtop_enumerator_unref'
/usr/bin/ld: CMakeFiles/nvtop.dir/extract_gpuinfo_v3d.c.o: in function `gpuinfo_v3d_shutdown':
extract_gpuinfo_v3d.c:(.text+0xbb4): undefined reference to `nvtop_device_unref'
/usr/bin/ld: extract_gpuinfo_v3d.c:(.text+0xbbc): undefined reference to `nvtop_device_unref'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/nvtop.dir/build.make:323: src/nvtop] Error 1
make[1]: *** [CMakeFiles/Makefile2:143: src/CMakeFiles/nvtop.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
|
Beta Was this translation helpful? Give feedback.
Answered by
xiaohuirong
Nov 9, 2024
Replies: 1 comment
-
I haven't compiled v3d support separately before and forgot to add diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 169e112..9ba7a9a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -60,7 +60,7 @@ if(ASCEND_SUPPORT)
target_link_libraries(nvtop PRIVATE "${DCMI_LIBRARY_PATH}/libdcmi.so")
endif()
-if(AMDGPU_SUPPORT OR INTEL_SUPPORT)
+if(AMDGPU_SUPPORT OR INTEL_SUPPORT OR V3D_SUPPORT)
if((SYSTEMD_FOUND AND UDEV_FOUND AND USE_LIBUDEV_OVER_LIBSYSTEMD) OR(NOT SYSTEMD_FOUND AND UDEV_FOUND))
target_compile_definitions(nvtop PRIVATE USING_LIBUDEV)
target_link_libraries(nvtop PRIVATE udev) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Ciantic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I haven't compiled v3d support separately before and forgot to add
device_discovery_linux.c
to the source files. You can try the following patch or enable Intel support.