ZCU104 - Yocto/bitbake Pynq 2.6

Hi all,

I’m trying to deploy Pynq 2.6 with meta-xilinx (yocto) because we have issue with DMA in 2.5

Log data follows:
| DEBUG: Executing shell function do_compile
| Traceback (most recent call last):
| File “path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/pynq-2.6.0/setup.py”, line 46, in
| from pynq.utils import download_overlays
| File “path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/pynq-2.6.0/pynq/init.py”, line 30, in
| from .registers import Register
| File “path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/pynq-2.6.0/pynq/registers.py”, line 32, in
| import numpy as np
| ModuleNotFoundError: No module named ‘numpy’
| ERROR: 'python3 setup.py build ’ execution failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of ‘path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/temp/run.do_compile.131529’ failed with exit code 1:
| Traceback (most recent call last):
| File “path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/pynq-2.6.0/setup.py”, line 46, in
| from pynq.utils import download_overlays
| File “path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/pynq-2.6.0/pynq/init.py”, line 30, in
| from .registers import Register
| File “path2build/tmp/work/cortexa72-cortexa53-mensi-linux/python3-pynq/2.6.0-r0/pynq-2.6.0/pynq/registers.py”, line 32, in
| import numpy as np
| ModuleNotFoundError: No module named ‘numpy’
| WARNING: exit code 1 from a shell command.

I have also tried to use pip3 directly on the target:

copying pynq/lib/tests/test_led.py -> build/lib/pynq/lib/tests
running build_ext
make PYNQ_BUILD_ARCH=aarch64 -C pynq/lib/_pynq/_displayport/
make: Entering directory '/var/volatile/tmp/pip-install-i0s02vj7/pynq/pynq/lib/_pynq/_displayport'
g++ -fPIC -I=/usr/include/libdrm -c -g -std=c++11 displayport.cpp
displayport.cpp:14:10: fatal error: xf86drm.h: No such file or directory
   14 | #include <xf86drm.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:8: all] Error 1
make: Leaving directory '/var/volatile/tmp/pip-install-i0s02vj7/pynq/pynq/lib/_pynq/_displayport'
error: command 'make' failed with exit status 2
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/var/volatile/tmp/pip-install-i0s02vj7/pynq/setup.py’“'”‘; file=’“'”‘/var/volatile/tmp/pip-install-i0s02vj7/pynq/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ install --record /var/volatile/tmp/pip-record-ug3tw8my/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/pynq Check the logs for full command output.

Any info to fix that ?

Maybe someone here knows when pynq recipe will be updated inside meta-xilinx ?

Cheers,

1 Like

why not add python3-numpy and python-numpy to recipes? (enable them in rootfs options)
go to user-rootfs.config and add:
CONFIG_python3-numpy
CONFIG_python-numpy
you could also add:
CONFIG_python3-dev
CONFIG_python-dev
and some other recipes to have your zcu104 independent and self-compile-able :slight_smile:, if further packages are needed.
All recipes should be in meta-xilinx or meta-pynq.

Hi,

Thank you but python3 numpy modules is already installed on the rootfs.

“All recipes should be in meta-xilinx or meta-pynq”. the problem as you said SHOULD be … but meta-xilinx is still on 2.5.1 and I need 2.6 :frowning:

More info:

meta-xilinx, pynq 2.5.1 is built correctly, I have changed md5 and SHA256 to point to 2.6.0

And the numpy issue appear…

[EDIT] I’m also able to uninstall pynq2.6 from ZCU104 Pynq image_2.6 so the trouble is probably inside the setup or yocto recipe :S

Any advice to debug that ?
Thx!

[EDIT2]: After editing setup.py this problem goes away.
image

1 Like