-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Hello everyone!
I recently used the petalinux2022.2 tool on an X86 host to cross-compile a custom ROS 2 message package for integration into a boot image for an embedded device (Xilinx MPSoC device) built using petalinux2022.2.
I'm currently encountering a cross-compilation error with the following error message:
CMake Error in CMakeLists.txt: | Target "mnist_cnn_interface__rosidl_generator_py" | INTERFACE_INCLUDE_DIRECTORIES property contains path: | "/home/lzh/lzh/petalinux/kr260_xsa_ros/build/tmp/work/cortexa72-cortexa53-xilinx-linux/mnist-cnn-interface/0.1.0-r0/recipe-sysroot-native/usr/lib/python3.9/site-packages/numpy/core/include" | | which is prefixed in the source directory.
My initial analysis suggests a path contamination issue. The rosidl_generate_interfaces metapackage uses the NumPy library in the host development environment's Python path when generating the Python interface language from the message package source code (the rosidl_generate_interfaces metapackage is designed for compiling message packages on the host). Instead of using the NumPy library in the embedded device boot image in the path /petalinux/kr260_xsa_ros/build/tmp/work/cortexa72-cortexa53-xilinx-linux/mnist-cnn-interface/0.1.0-r0/recipe-sysroot/usr/include/python3.9, it actually should.
Is my suspicion correct? If so, how can I resolve this Python path contamination issue during cross-compilation?
Attached is the full error message. I look forward to your response!
cmake-error.txt