Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling error for FreeBSD 13.1: #159

Closed
rajhlinux opened this issue Aug 17, 2022 · 2 comments
Closed

Compiling error for FreeBSD 13.1: #159

rajhlinux opened this issue Aug 17, 2022 · 2 comments

Comments

@rajhlinux
Copy link

rajhlinux commented Aug 17, 2022

Hello I get this error when compiling from source for FreeBSD 13.1:

root@user:/home/user $ git clone https://github.com/Syllo/nvtop

Cloning into 'nvtop'...
remote: Enumerating objects: 1262, done.
remote: Counting objects: 100% (407/407), done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 1262 (delta 252), reused 287 (delta 224), pack-reused 855
Receiving objects: 100% (1262/1262), 604.51 KiB | 7.85 MiB/s, done.
Resolving deltas: 100% (822/822), done.

root@user:/home/user $ mkdir -p nvtop/build && cd nvtop/build

root@user:/home/user/nvtop/build $ cmake .. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON

-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.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/libncursesw.so
-- Looking for cbreak in /usr/lib/libncursesw.so - found
-- Found Curses: /usr/lib/libncursesw.so  
-- Performing Test HAS_REALLOCARRAY
-- Performing Test HAS_REALLOCARRAY - Success
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "1.8.0") 
-- Found Libdrm: /usr/local/lib/libdrm.so (found version "2.4.112") 
-- Found libdrm; Enabling AMDGPU support
-- 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 - Failed
-- 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 - Failed
-- 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 - Failed
-- 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 - Failed
-- Performing Test compiler_has-Wtrampolines
-- Performing Test compiler_has-Wtrampolines - Failed
-- 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 - Failed
-- 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 - Failed
-- Performing Test compiler_has-Wnormalized
-- Performing Test compiler_has-Wnormalized - Failed
-- Performing Test compiler_has-Wdisabled-optimization
-- Performing Test compiler_has-Wdisabled-optimization - Success
-- Performing Test compiler_has-Whsa
-- Performing Test compiler_has-Whsa - Failed
-- 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 linker_has-Wl_-z_relro
-- Performing Test linker_has-Wl_-z_relro - Success
-- Performing Test sanitizer-address-available
-- Performing Test sanitizer-address-available - Success
-- Performing Test sanitizer-undefined-available
-- Performing Test sanitizer-undefined-available - Success
-- Found GTest: /usr/local/lib/cmake/GTest/GTestConfig.cmake (found version "1.12.1")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/nvtop/build
root@user:/home/user/nvtop/build $ make

[  7%] Building C object src/CMakeFiles/nvtop.dir/nvtop.c.o
[ 14%] Building C object src/CMakeFiles/nvtop.dir/interface.c.o
[ 21%] Building C object src/CMakeFiles/nvtop.dir/interface_layout_selection.c.o
[ 28%] Building C object src/CMakeFiles/nvtop.dir/interface_options.c.o
[ 35%] Building C object src/CMakeFiles/nvtop.dir/interface_setup_win.c.o
[ 42%] Building C object src/CMakeFiles/nvtop.dir/interface_ring_buffer.c.o
[ 50%] Building C object src/CMakeFiles/nvtop.dir/get_process_info_linux.c.o
[ 57%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo.c.o
[ 64%] Building C object src/CMakeFiles/nvtop.dir/time.c.o
[ 71%] Building C object src/CMakeFiles/nvtop.dir/plot.c.o
[ 78%] Building C object src/CMakeFiles/nvtop.dir/ini.c.o
[ 85%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo_nvidia.c.o
[ 92%] Building C object src/CMakeFiles/nvtop.dir/extract_gpuinfo_amdgpu.c.o
/home/user/nvtop/src/extract_gpuinfo_amdgpu.c:36:10: fatal error: 'linux/kcmp.h' file not found
#include <linux/kcmp.h>
         ^~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/user/nvtop/build
*** Error code 1

Stop.
make[1]: stopped in /usr/home/user/nvtop/build
*** Error code 1

Stop.
make: stopped in /usr/home/user/nvtop/build

What could be the issue?

Details of my PC Build:

OS: FreeBSD 13.1-RELEASE-p1 amd64
Shell: csh tcsh 6.22.04
Resolution: 3840x2160
DE: Plasma 5.24.6
WM: KWin
Theme: Breeze [GTK2], Adwaita [GTK3]
Icons: breeze-dark [GTK2], Adwaita [GTK3]
Terminal: konsole
CPU: AMD FX-8350 (8) @ 3.887GHz
GPU: Ellesmere [Radeon RX 580]
Memory: 7373MiB / 24492MiB

Thanks.

@Syllo
Copy link
Owner

Syllo commented Aug 20, 2022

The AMDGPU code uses the kcmp syscall to test if two file descriptors point to the same file.
If FreeBSD provides such a function/syscall I would gladly accept a pull request for it.

@rajhlinux
Copy link
Author

I will look into this and ask to the FreeBSD forum, will let you know.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants