Yocto Kirkstone VPP compilation
Hi,
I'm relatively new to Yocto and I'm trying to compile the VPP code. I have a recipe that all it does is download the code from the official repository and tries to compile it (i'm trying to compile 23.10 stable version). This code has a lot of dependencies, among them dpdk. The code downloads these dependencies in tar.gz files and then compiles the code for each of them. But when it gets to the dpdk dependency, I get the same error every time. Here is the error:
Quoted 10 lines
/home/user/Yocto/build/tmp/work/core2-64-poky-linux/vpp-test/23.10-r0/git/build/external/downloads/meson-0.55.3.tar.gz| Traceback (most recent call last):
| File "/home/enigmedia/Yocto/build/tmp/work/core2-64-poky-linux/vpp-test/23.10-r0/recipe-sysroot-native/usr/bin/pip3", line 7, in <module>
| from pip._internal.cli.main import main
| ModuleNotFoundError: No module named 'pip'
From what I have been able to find out, the dpdk dependency generates a python virtual environment and executes a series of commands. I have tried to launch theses commands manually and there has been no problem, however, when I try to launch the recipe via bitbake, I get the above error.
Here is the vpp.bb recipe:
Quoted 25 lines
DESCRIPTION = "Vector Packet Processing"
STABLE = "stable/2310"
BRANCH = "master"
SRCREV = "6b287b53011208bc242040962056360c1ff54a6c" S = "${WORKDIR}/git"
PV = "23.10"LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM= "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
AUTOTOOLS_SCRIPT_PATH= "${S}/src"
SRC_URI+= "git://github.com/FDio/vpp;branch=${STABLE}\
"DEPENDS += "openssl numactl curl-native cmake-native nasm-native python3-native python3-pip python3-ply-native ninja-native m4-native zlib-native binutils-native elfutils-native libpcap libbpf apt systemd bpftrace util-linux"
inherit autotools pkgconfig python3-dir python3native
Quoted 9 lines
export
OPENSSL_PATH= "${RECIPE_SYSROOT}"include vpp-packages.inc
do_compile() {
cd ${S}oe_runmakebuild-release
}
vpp-packages.in is a file that enables some vpp plugins and installs the resulting libraries and files on the system.
Could anyone know what is going on or give me any hints on how to fix the bug?
Thank you so much,
Miriam
It is not entirely clear what is happening. The recipe depends on python3-pip (not the native), but somehow pip3 executable still ends up in the native sysroot. Then pip3 can't find its own modules, which means that either the modules are not there (in recipe-sysroot-native/ that is), or it's using python in a way that they're not in module search path.
There's a number of recipes in meta-openembedded/meta-python that rely on python3-pip-native (and build-appliance-image in core), so you could investigate how it's being used there, and why it works in that context.
You should push your complete layer with the recipe and its includes to github or similar, so that it's possible to reproduce the issues.
Alex
Quoted 63 lines · On Mon, 26 Feb 2024 at 12:51, <[email protected]> wrote:
Hi,
I'm relatively new to Yocto and I'm trying to compile the VPP code. I have a recipe that all it does is download the code from the official repository and tries to compile it (i'm trying to compile 23.10 stable version). This code has a lot of dependencies, among them dpdk. The code downloads these dependencies in tar.gz files and then compiles the code for each of them. But when it gets to the dpdk dependency, I get the same error every time. Here is the error:
/home/user/Yocto/build/tmp/work/core2-64-poky-linux/vpp-test/23.10-r0/git/build/external/downloads/meson-0.55.3.tar.gz| Traceback (most recent call last): | File "/home/enigmedia/Yocto/build/tmp/work/core2-64-poky-linux/vpp-test/23.10-r0/recipe-sysroot-native/usr/bin/pip3", line 7, in <module> | from pip._internal.cli.main import main | ModuleNotFoundError: No module named 'pip'From what I have been able to find out, the dpdk dependency generates a python virtual environment and executes a series of commands. I have tried to launch theses commands manually and there has been no problem, however, when I try to launch the recipe via bitbake, I get the above error.
Here is the vpp.bb recipe:
DESCRIPTION = "Vector Packet Processing"
STABLE = "stable/2310"
BRANCH = "master"
SRCREV = "6b287b53011208bc242040962056360c1ff54a6c" S = "${WORKDIR}/git"
PV = "23.10"LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM= "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
AUTOTOOLS_SCRIPT_PATH= "${S}/src"
SRC_URI+= "git://github.com/FDio/vpp;branch=${STABLE}\
"DEPENDS += "openssl numactl curl-native cmake-native nasm-native python3-native python3-pip python3-ply-native ninja-native m4-native zlib-native binutils-native elfutils-native libpcap libbpf apt systemd bpftrace util-linux"
inherit autotools pkgconfig python3-dir python3native
export
OPENSSL_PATH= "${RECIPE_SYSROOT}"include vpp-packages.inc
do_compile () { cd ${S} oe_runmake build-release }vpp-packages.in is a file that enables some vpp plugins and installs the resulting libraries and files on the system.
Could anyone know what is going on or give me any hints on how to fix the bug?
Thank you so much,
Miriam
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#62604): https://lists.yoctoproject.org/g/yocto/message/62604
Mute This Topic: https://lists.yoctoproject.org/mt/104580146/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 6 lines · miriam.rico via lists.yoctoproject.org
Hi,
I'm relatively new to Yocto and I'm trying to compile the VPP code. I have a recipe that all it does is download the code from the official repository and tries to compile it (i'm trying to compile 23.10 stable version). This code has a lot of dependencies, among them dpdk. The code downloads these dependencies in tar.gz files and then compiles the code for each of them. But when it gets to the dpdk dependency, I get the same error every time. Here is the error:
/home/user/Yocto/build/tmp/work/core2-64-poky-linux/vpp-test/23.10-r0/git/build/external/downloads/meson-0.55.3.tar.gz
Quoted 8 lines
| Traceback (most recent call last): | File "/home/enigmedia/Yocto/build/tmp/work/core2-64-poky-linux/vpp-test/23.10-r0/recipe-sysroot-native/usr/bin/pip3", line 7, in <module> | from pip._internal.cli.main import main | ModuleNotFoundError: No module named 'pip'From what I have been able to find out, the dpdk dependency generates a python virtual environment and executes a series of commands. I have tried to launch theses commands manually and there has been no problem, however, when I try to launch the recipe via bitbake, I get the above error.
Here is the vpp.bb recipe:
Respectfully, this recipe is confused.
Quoted 1 line
AUTOTOOLS_SCRIPT_PATH = "${S}/src"This directory doesn’t contain any autotools files: https://github.com/FDio/vpp/tree/stable/2310/src
Quoted 3 lines
DEPENDS += "openssl numactl curl-native cmake-native nasm-native python3-native python3-pip python3-ply-native ninja-native m4-native zlib-native binutils-native elfutils-native libpcap libbpf apt systemd bpftrace util-linux"
inherit autotools pkgconfig python3-dir python3native
There’s a “configure” script but that is not autotools, so don’t inherit autotools. That configure script seems to be a wrapper around calling cmake, which we already have a class for.
Quoted 4 lines
do_compile () {
cd ${S}
oe_runmake build-release
}I suggest ignoring that Makefile entirely, as it’s trying to install dependencies on the system which is entirely the wrong thing to do in a managed build. I’d try seeing if it is possible to just inherit cmake and set OECMAKE_SOURCEPATH=${S}/src.
Ross
Hi,
Thank you for your reply. I already tried to use cmake instead of autotools but the error I got was that there was no CMakeLists for the compilation.
Then I tried to set:
Quoted 4 lines
OECMAKE_GENERATOR= "Unix Makefiles"
But another error appears:
Quoted 3 lines
Error: Unsupported flag --build=x86_64-linux
I think the only option is to use autotools and see if the problems can be solved.
Quoted 5 lines · On Tue, 27 Feb 2024 at 08:20, <[email protected]> wrote:
Thank you for your reply. I already tried to use cmake instead of autotools but the error I got was that there was no CMakeLists for the compilation.
Then I tried to set:
Quoted 7 lines
OECMAKE_GENERATOR= "Unix Makefiles"But another error appears:
Error: Unsupported flag --build=x86_64-linux
I think the only option is to use autotools and see if the problems can be solved.
If you don't follow the advice you get, and do something else, and that something else fails, then people will stop responding to you.
So please. I'll say this only once: do what Ross suggested, and if you get an error, then provide the complete recipe at that point (so we can verify what you did), and a full copy-paste of the error. That's the only way we can help, and make progress.
Alex
Quoted 10 lines · miriam.rico via lists.yoctoproject.org
Hi,
Thank you for your reply. I already tried to use cmake instead of autotools but the error I got was that there was no CMakeLists for the compilation.
Then I tried to set:
OECMAKE_GENERATOR= "Unix Makefiles"
But another error appears:
Error: Unsupported flag --build=x86_64-linux
I think the only option is to use autotools and see if the problems can be solved.
The use of autotools requires a ‘configure.ac’ file. Can you point me at the configure.ac that is being executed?
The CMakeLists file is under src/, which is why I said to set OECMAKE_SOURCEPATH.
Ross
Hi all,
First of all, thank you for your help and sorry.
I checked Ross's comment again and saw that I had made a mistake in modifying the recipe. That's why the compilation was failing and that's why I tried another route.
After rereading the comment I have made the indicated changes and now the code compiles.
This would be the resulting recipe:
Quoted 23 lines
DESCRIPTION = "Vector Packet Processing"
STABLE = "stable/2310"
BRANCH = "master"
SRCREV = "6b287b53011208bc242040962056360c1ff54a6c" S = "${WORKDIR}/git"
PV = "23.10"LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM= "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
SRC_URI+= "git://github.com/FDio/vpp;branch=${STABLE}\
"
OECMAKE_SOURCEPATH= "${S}/src"DEPENDS += "openssl numactl curl-native cmake-native nasm-native python3-pip-native python3-ply-native ninja-native m4-native zlib-native binutils-native elfutils-native libpcap libbpf apt systemd bpftrace util-linux"
Quoted 6 lines
inherit cmake
export
OPENSSL_PATH= "${RECIPE_SYSROOT}"include vpp-packages.inc
Now that the code compiles, it gives me an error that the packages have been installed but that they have not been shipped in any package.
Quoted 90 lines
ERROR: vpp-test-23.10-r0
do_package: QA Issue: vpp-test: Files/directories were installed but not shipped in any package:/usr/share/usr/share/vpp/usr/share/vpp/vppapigen_json.py/usr/share/vpp/generate_json.py/usr/share/vpp/vapi_cpp_gen.py/usr/share/vpp/vppapigen_c.py/usr/share/vpp/vapi_json_parser.py/usr/share/vpp/vapi_c_gen.py/usr/share/vpp/api/usr/share/vpp/api/core/usr/share/vpp/api/plugins/usr/share/vpp/api/core/tunnel_types.api.json/usr/share/vpp/api/core/span.api.json/usr/share/vpp/api/core/flow.api.json/usr/share/vpp/api/core/crypto.api.json/usr/share/vpp/api/core/session.api.json/usr/share/vpp/api/core/ip6_nd.api.json/usr/share/vpp/api/core/bier.api.json/usr/share/vpp/api/core/ip_types.api.json/usr/share/vpp/api/core/vpe_types.api.json/usr/share/vpp/api/core/memclnt.api.json/usr/share/vpp/api/core/pci_types.api.json/usr/share/vpp/api/core/vpe.api.json/usr/share/vpp/api/core/teib.api.json/usr/share/vpp/api/core/p2p_ethernet.api.json/usr/share/vpp/api/core/flow_types.api.json/usr/share/vpp/api/core/arp.api.json/usr/share/vpp/api/core/pipe.api.json/usr/share/vpp/api/core/sr_types.api.json/usr/share/vpp/api/core/policer_types.api.json/usr/share/vpp/api/core/ethernet_types.api.json/usr/share/vpp/api/plugins/vhost_user.api.json/usr/share/vpp/api/plugins/lisp_gpe.api.json/usr/share/vpp/api/plugins/pot.api.json/usr/share/vpp/api/plugins/dhcp.api.json/usr/share/vpp/api/plugins/tls_openssl.api.json/usr/share/vpp/api/plugins/ioam_cache.api.json/usr/share/vpp/api/plugins/igmp.api.json/usr/share/vpp/api/plugins/dns.api.json/usr/lib/vpp_api_test_plugins/vpp_api_test_plugin.so/usr/lib/vpp_api_test_plugins/lb_test_plugin.so/usr/lib/vpp_api_test_plugins/adl_test_plugin.so/usr/lib/vpp_api_test_plugins/memif_test_plugin.so/usr/lib/vpp_api_test_plugins/vmxnet3_test_plugin.so/usr/lib/vpp_api_test_plugins/vlib_vlibapi_test_plugin.so/usr/lib/vpp_api_test_plugins/vnet_arp_test_plugin.so/usr/lib/vpp_api_test_plugins/tracedump_test_plugin.so/usr/lib/vpp_api_test_plugins/builtinurl_test_plugin.so/usr/lib/vpp_api_test_plugins/flowprobe_test_plugin.so/usr/lib/vpp_api_test_plugins/arping_test_plugin.so/usr/lib/vpp_api_test_plugins/vrrp_test_plugin.so/usr/lib/python3.8/site-packages/usr/lib/python3.8/site-packages/vpp_papi/usr/lib/python3.8/site-packages/vpp_papi-2.0.0-py3.8.egg-info/usr/lib/python3.8/site-packages/vpp_papi/vpp_serializer.py/usr/lib/python3.8/site-packages/vpp_papi/vpp_papi.py/usr/lib/vpp_plugins/srv6adflow_plugin.so/usr/lib/vpp_plugins/dma_intel_plugin.so/usr/lib/vpp_plugins/af_packet_plugin.so/usr/lib/vpp_plugins/cdp_plugin.so/usr/lib/vpp_plugins/ip_session_redirect_plugin.so/usr/lib/vpp_plugins/oddbuf_plugin.so/usr/lib/vpp_plugins/hsi_plugin.so/usr/lib/vpp_plugins/pnat_plugin.so/usr/lib/vat2_plugins/pppoe_test_plugin_pppoe_plugin.so/usr/lib/vat2_plugins/vnet_l2_plugin.so/usr/lib/vat2_plugins/npt66_test_plugin_npt66_plugin.so/usr/lib/vat2_plugins/vnet_mpls_plugin.so/usr/lib/vat2_plugins/vnet_feature_plugin.so/usr/lib/vat2_plugins/vnet_ip6_nd_plugin.so/usr/lib/vat2_plugins/vnet_ipsec_plugin.so/usr/lib/vat2_plugins/lb_test_plugin_lb_types_plugin.so/usr/lib/vat2_plugins/cnat_test_plugin_cnat_plugin.so/usr/lib/vat2_plugins/vnet_session_plugin.so/usr/lib/vat2_plugins/gtpu_test_plugin_gtpu_plugin.so/usr/lib/vat2_plugins/vlibmemory_vlib_plugin.so/usr/lib/vat2_plugins/dns_test_plugin_dns_plugin.so/usr/lib/vat2_plugins/lisp_test_plugin_lisp_plugin.so/usr/lib/vat2_plugins/tracedump_test_plugin_tracedump_plugin.so/usr/lib/vat2_plugins/l2tp_test_plugin_l2tp_plugin.so/usr/lib/vat2_plugins/vnet_policer_plugin.so/usr/lib/vat2_plugins/af_packet_test_plugin_af_packet_plugin.so/usr/lib/vat2_plugins/flowprobe_test_plugin_flowprobe_plugin.so/usr/lib/vat2_plugins/http_static_test_plugin_http_static_plugin.so/usr/lib/vat2_plugins/vnet_pg_plugin.so/usr/lib/vat2_plugins/vnet_fib_types_plugin.so/usr/lib/vat2_plugins/lisp_test_plugin_one_plugin.so
Quoted 9 lines
/usr/lib/vat2_plugins/vnet_ethernet_types_plugin.so/usr/lib/vat2_plugins/tracenode_test_plugin_tracenode_plugin.so/usr/lib/vat2_plugins/vxlan_test_plugin_vxlan_plugin.so/usr/lib/vat2_plugins/dhcp_test_plugin_dhcp6_ia_na_client_cp_plugin.so/usr/lib/vat2_plugins/dslite_test_plugin_dslite_plugin.soPlease set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them withindo_install.
vpp-test: 430 installed and not shipped files. [installed-vs-shipped]
More packages appear but I have reduced the list. I'm modifying the recipe to solve the problems I'm having.
Thank you very much for your help and sorry for the inconvenience.