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

3.1.0 fails to find drm.h #337

Open
fkobi opened this issue Nov 30, 2024 · 0 comments · May be fixed by #338
Open

3.1.0 fails to find drm.h #337

fkobi opened this issue Nov 30, 2024 · 0 comments · May be fixed by #338

Comments

@fkobi
Copy link

fkobi commented Nov 30, 2024

Hello,

I am using Gentoo and would like to package 3.1.0 for the GURU repos, where 3.0.2 work fine.
However during compilation I get those errors:

[12/21] /usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work
/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=
odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -MF src/CMa
keFiles/nvtop.dir/extract_gpuinfo_panthor.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -c /var/tmp/portage/sys-process/n
vtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panthor.c
FAILED: src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panthor.c
In file included from /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panthor.c:21:
/usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
   40 | #include <drm.h>
      |          ^~~~~~~
compilation terminated.
[13/21] /usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panfrost.c
FAILED: src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panfrost.c
In file included from /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panfrost.c:24:
/usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
   40 | #include <drm.h>
      |          ^~~~~~~
compilation terminated.

Here's what DRM headers I do have:

$ find /usr/include/ -name "drm.h"
/usr/include/drm/drm.h
/usr/include/libdrm/drm.h
/usr/include/wlroots-0.18/wlr/backend/drm.h

I am using libdrm-2.4.123-r1

After manually changing xf86drm.h to include not drm.h but drm/drm.h or libdrm/drm.h I get this:

[16/21] /usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panthor.c
FAILED: src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panthor.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panthor.c
In file included from /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panthor.c:28:
/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/panthor_drm.h:6:10: fatal error: drm.h: No such file or directory
    6 | #include "drm.h"
      |          ^~~~~~~
compilation terminated.
[17/21] /usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panfrost.c
FAILED: src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o 
/usr/bin/x86_64-pc-linux-gnu-gcc -DHAS_REALLOCARRAY -DUSING_LIBUDEV -D_GNU_SOURCE -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/include -I/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0_build/include  -march=native -O2 -pipe  -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -std=gnu11 -MD -MT src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -MF src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o.d -o src/CMakeFiles/nvtop.dir/extract_gpuinfo_panfrost.c.o -c /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panfrost.c
In file included from /var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/extract_gpuinfo_panfrost.c:31:
/var/tmp/portage/sys-process/nvtop-3.1.0/work/nvtop-3.1.0/src/panfrost_drm.h:9:10: fatal error: drm.h: No such file or directory
    9 | #include "drm.h"
      |          ^~~~~~~
compilation terminated.

From what I can tell there is no drm.h shipped with 3.1.0, or at 6e91c74.

I have checked and panthor_drm.h and panfrost_drm.h want to include a local drm.h that is not there.

If I edit them to include <libdrm/drm.h> instead of "drm.h" it compiles fine.

Here are my questions:

  1. Is there a problem with packaging libdrm on Gentoo (xf86drm.h)?
  2. What should provide pan{thor,frost}_drm.h?
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

Successfully merging a pull request may close this issue.

1 participant