Hey @marioruiz
I’ve tried with an Ubuntu 20 based docker image and an Ubuntu 20 based Petalinux image running on the board, and I’m having the same issue when trying to install pynq with pip3 install pynq
.
At first it cannot find xf86drm.h
, so I install libdrm-dev with sudo apt install libdrm-dev
.
Afterwards the pynq installation fails one step further, trying to import drm.h
. Do you have an idea on what might be the issue?
The error message:
creating build/lib/pynq/tests
copying pynq/tests/test_pl.py -> build/lib/pynq/tests
copying pynq/tests/test_mmio.py -> build/lib/pynq/tests
copying pynq/tests/util.py -> build/lib/pynq/tests
copying pynq/tests/test_su.py -> build/lib/pynq/tests
copying pynq/tests/test_gpio.py -> build/lib/pynq/tests
creating build/lib/pynq/lib/tests
copying pynq/lib/tests/test_rgbled.py -> build/lib/pynq/lib/tests
copying pynq/lib/tests/test_audio.py -> build/lib/pynq/lib/tests
copying pynq/lib/tests/test_video.py -> build/lib/pynq/lib/tests
copying pynq/lib/tests/test_switch.py -> build/lib/pynq/lib/tests
copying pynq/lib/tests/test_led.py -> build/lib/pynq/lib/tests
copying pynq/lib/tests/test_button.py -> build/lib/pynq/lib/tests
copying pynq/lib/tests/pynq_welcome.pdm -> build/lib/pynq/lib/tests
running build_ext
make PYNQ_BUILD_ARCH=aarch64 -C pynq/lib/_pynq/_displayport/
make: Entering directory '/tmp/pip-install-dp14u5s_/pynq/pynq/lib/_pynq/_displayport'
g++ -fPIC -I=/usr/include/libdrm -c -g -std=c++11 displayport.cpp
In file included from displayport.cpp:14:
/usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
40 | #include <drm.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:8: all] Error 1
make: Leaving directory '/tmp/pip-install-dp14u5s_/pynq/pynq/lib/_pynq/_displayport'
error: command 'make' failed with exit status 2
----------------------------------------
edit: drm.h exists and is in /usr/include
$ ll /usr/include/libdrm
total 576
drwxr-xr-x 3 root root 4096 Feb 15 21:04 ./
drwxr-xr-x 127 root root 16384 Feb 15 21:04 ../
-rw-r--r-- 1 root root 31894 May 27 2020 amdgpu_drm.h
-rw-r--r-- 1 root root 55079 May 27 2020 amdgpu.h
-rw-r--r-- 1 root root 32818 May 27 2020 drm_fourcc.h
-rw-r--r-- 1 root root 32306 May 27 2020 drm.h
-rw-r--r-- 1 root root 24920 May 27 2020 drm_mode.h
-rw-r--r-- 1 root root 2782 May 27 2020 drm_sarea.h
-rw-r--r-- 1 root root 6977 May 27 2020 etnaviv_drmif.h
-rw-r--r-- 1 root root 62951 May 27 2020 i915_drm.h
-rw-r--r-- 1 root root 7895 May 27 2020 mach64_drm.h
-rw-r--r-- 1 root root 13010 May 27 2020 mga_drm.h
-rw-r--r-- 1 root root 12105 May 27 2020 msm_drm.h
drwxr-xr-x 3 root root 4096 Feb 15 21:04 nouveau/
-rw-r--r-- 1 root root 7000 May 27 2020 nouveau_drm.h
-rw-r--r-- 1 root root 4131 May 27 2020 qxl_drm.h
-rw-r--r-- 1 root root 10000 May 27 2020 r128_drm.h
-rw-r--r-- 1 root root 16388 May 27 2020 r600_pci_ids.h
-rw-r--r-- 1 root root 1991 May 27 2020 radeon_bo_gem.h
-rw-r--r-- 1 root root 2839 May 27 2020 radeon_bo.h
-rw-r--r-- 1 root root 1678 May 27 2020 radeon_bo_int.h
-rw-r--r-- 1 root root 1601 May 27 2020 radeon_cs_gem.h
-rw-r--r-- 1 root root 5121 May 27 2020 radeon_cs.h
-rw-r--r-- 1 root root 2179 May 27 2020 radeon_cs_int.h
-rw-r--r-- 1 root root 38317 May 27 2020 radeon_drm.h
-rw-r--r-- 1 root root 5968 May 27 2020 radeon_surface.h
-rw-r--r-- 1 root root 7170 May 27 2020 savage_drm.h
-rw-r--r-- 1 root root 2633 May 27 2020 sis_drm.h
-rw-r--r-- 1 root root 14877 May 27 2020 tegra_drm.h
-rw-r--r-- 1 root root 2406 May 27 2020 tegra.h
-rw-r--r-- 1 root root 14457 May 27 2020 vc4_drm.h
-rw-r--r-- 1 root root 16906 May 27 2020 vc4_packet.h
-rw-r--r-- 1 root root 8244 May 27 2020 vc4_qpu_defines.h
-rw-r--r-- 1 root root 8372 May 27 2020 via_drm.h
-rw-r--r-- 1 root root 5010 May 27 2020 virtgpu_drm.h
-rw-r--r-- 1 root root 32085 May 27 2020 vmwgfx_drm.h
edit: ignore this, new thread