| ^~~~~~~~~~~~~~~~~~~~~~~~ x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fno-diagnostics-color -Wall -Wextra -pthread -Iinclude -ffunction-sections -fdata-sections -I/usr/include/libdrm -DENABLE_XCB=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DENABLE_NLS=1 -DHAS_DRMGETDEVICE=1 -DENABLE_AMDGPU=1 -c -o amdgpu.o amdgpu.c amdgpu.c:20:10: fatal error: libdrm/amdgpu.h: No such file or directory 20 | #include <libdrm/amdgpu.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_no-multilib-20210203-084956 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-10.2.0 * Python 3.8.7 The following VMs are available for generation-2: *) AdoptOpenJDK 8.272_p10 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm timestamp(s) of HEAD at this tinderbox image: /var/db/repos/gentoo Wed Feb 3 15:47:44 UTC 2021 emerge -qpvO app-misc/radeontop [ebuild N ] app-misc/radeontop-1.3 USE="nls"
Created attachment 685683 [details] emerge-info.txt
Created attachment 685686 [details] app-misc:radeontop-1.3:20210203-172831.log
Created attachment 685689 [details] emerge-history.txt
Created attachment 685692 [details] environment
Created attachment 685695 [details] etc.portage.tar.bz2
Created attachment 685698 [details] temp.tar.bz2
It seems this can be fixed by recompiling x11-libs/libdrm after adding 'amdgpu' to the VIDEO_CARDS="... amdgpu ..." variable in make.conf. This will provide the missing libdrm/amdgpu.h include, and allows app-misc/radeontop to compile successfully.
(In reply to Arnim Eijkhoudt from comment #7) > It seems this can be fixed by recompiling x11-libs/libdrm after adding > 'amdgpu' to the VIDEO_CARDS="... amdgpu ..." variable in make.conf. This > will provide the missing libdrm/amdgpu.h include, and allows > app-misc/radeontop to compile successfully. FWIW the tinderbox sets data/package.use.90common:*/* VIDEO_CARDS: -* dummy
(In reply to Arnim Eijkhoudt from comment #7) > It seems this can be fixed by recompiling x11-libs/libdrm after adding > 'amdgpu' to the VIDEO_CARDS="... amdgpu ..." variable in make.conf. This > will provide the missing libdrm/amdgpu.h include, and allows > app-misc/radeontop to compile successfully. Thanks for the input and thanks for testing @Toralf I've created a PR which should fix this issue. Since this tool is only useful in combination with amd radeon gpus i've simply added the dependency on amdgpu/radeon.
That PR did not fix the problem. Package: app-misc/radeontop-1.3-r1 USE: abi_x86_64 amd64 elibc_glibc kernel_linux nls userland_GNU video_cards_radeon libdrm/amdgpu.h: No such file or directory To me it seems like the problem is -DENABLE_AMDGPU=1 is being set when it should not be.
Created attachment 687279 [details, diff] patch: app-misc/radeontop: fix build without amdgpu, really fixes #768549
Created attachment 687282 [details, diff] patch: app-misc/radeontop: fix build without amdgpu, really fixes #768549 (better version) Modified so it better fits existing syntax
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50c2b42a4b140da2c9dba85542ec5bba82b84bf commit d50c2b42a4b140da2c9dba85542ec5bba82b84bf Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2021-02-17 19:27:00 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2021-02-17 19:32:50 +0000 app-misc/radeontop: fix build without amdgpu Really fixes #768549. Bug: https://bugs.gentoo.org/768549 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Jernej Jakob <jernej.jakob@gmail.com> Signed-off-by: Conrad Kostecki <conikost@gentoo.org> app-misc/radeontop/radeontop-1.3-r2.ebuild | 57 ++++++++++++++++++++++++++++++ app-misc/radeontop/radeontop-9999.ebuild | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-)