-
Notifications
You must be signed in to change notification settings - Fork 253
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
Error for adding demo_nodes_py or demo_nodes_cpp to IMAGE_INSTALL #1105
Comments
Thanks @Jpgig, meta-ros sets PYTHON_SITEPACKAGES_DIR in this class (
I took a look at the CMakeLists.txt for example_interfaces ( https://github.com/ros2/example_interfaces/blob/humble/CMakeLists.txt#L52 ). I don't see a reason why it would use /usr/lib. The install macro is relative and the recipe seems to inherit all the build system classes that would ensure that CMAKE_INSTALL_DIR or CMAKE_PREFIX_DIR is set appropriately. I will have to do some test builds for mickledore+humble to see if I can reproduce the failure. |
Hi Rob, did you get some time to build this? |
Hi Jiten, I noticed that the "mickledore" branch was missing some commits from "mickledore-next". One of which specifically related to using the correct arch-specific libdir: 689d33b There is a high-chance that this will solve you issue. Please update your meta-ros layer to include the latest commits and do a rebuild. Please let me know if this helps solve your issue. Regards, |
Thanks Rob, I took the latest commit still getting same error. |
Hi Jiten, I did fresh test builds for both recipes (demo-nodes-py and demo-nodes-cpp) for Humble and Mickledore on both qemux86_64:
and qemuarm64:
This was done using the mcf tool with the ros2-humble-mickledore.mcf configuration. Both builds were successful. It is possible that there is something specific to your setup that I'm not seeing. Can you share step-by-step instructions for creating your build environment and running the build? Can you also share the Build Configuration information from the beginning of your build? (eg as shown above) Regards, |
I'm following below steps:
I see below for ros layer: |
I managed to reproduce the problem with example_interfaces Wind River Linux LTS 23. The ament_cmake_python package in ROS automatically tries to detect the PYTHON_INSTALL_DIR directory. The code can be seen here: https://github.com/ament/ament_cmake/blob/9743c9cd3e5aef9566acefea6e6e3724e0e5657e/ament_cmake_python/ament_cmake_python-extras.cmake#L43 When running the python code under devshell, I can see it returns the following:
I compared this to the mickledore release for the Poky reference distro:
You can see from above that /usr/lib/python3.11 is derived from ${libdir} so I check libdir to see where it is defined. It is as expected:
So, then I check Wind River Linux LTS 23 which is based on mickledore as well:
Notice that it is /usr/lib64/python3.11 here, so let's check libdir and baselib:
Note that there is a multilib.conf being used in the definition of baselib that is resulting in the value of lib64. This is because the Wind River Linux LTS 23 BSPs support the multilib feature that lets one combine 32-bit and 64-bit libraries. However, the Python sysconfig for "purelib" is reporting back "/usr/lib". It is unclear to me what the expected behaviour should be in this scenario. It might be necessary to ask the Yocto developers that maintain Python upstream. However, a simple workaround may be to just add the following line in any affected packages (eg example-interfaces and demo-nodes-*).
This is something that I am happy to add to meta-ros as a temporary measure for the mickledore branch. It may take me some time to get to in the queue. If you could try it out and send me a PR with the changes, that would be excellent. You can refer to the commit I pointed to before to see examples of how this was done for other packages: 689d33b That said, it will likely require a more permanent fix for multilib in the later releases. You may wish to file a bug report against Wind River Linux LTS 23 explaining that the Python sysconfig may be reporting the wrong information on multilib systems. Then they can work to get it fixed upstream if it is needed. |
I took another look at the information above. I noticed that the python directory is being added to FILES in the ros_component.bbclass file: # :prepend /builds/oe-ros-ci/wrlinuxlts23-ros/work/layers/meta-ros/meta-ros-common/classes/ros_component.bbclass:23 When I look at that file I notice that it is using ${libdir}${PYTHON_DIR}: It may be more correct to use ${nonarch_libdir} instead. |
So your suggestion to add below: |
I tried to add demo_nodes_py to IMAGE_INSTALL as below:
IMAGE_INSTALL:append = " demo-nodes-py"
and getting build error now as below:
ERROR: example-interfaces-0.9.3-2-r0 do_package: QA Issue: example-interfaces: Files/directories were installed but not shipped in any package:
/usr/lib/python3.11/site-packages/example_interfaces/example_interfaces_s__rosidl_typesupport_fastrtps_c.cpython-311-aarch64-linux-gnu.so
/usr/lib/python3.11/site-packages/example_interfaces/example_interfaces_s__rosidl_typesupport_c.cpython-311-aarch64-linux-gnu.so
/usr/lib/python3.11/site-packages/example_interfaces/example_interfaces_s__rosidl_typesupport_introspection_c.cpython-311-aarch64-linux-gnu.so
/usr/lib/python3.11/site-packages/example_interfaces/init.py
/usr/lib/python3.11/site-packages/example_interfaces/msg
/usr/lib/python3.11/site-packages/example_interfaces/srv
/usr/lib/python3.11/site-packages/example_interfaces/action
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int32_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float32_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_byte_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_empty.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_byte_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float32.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int16_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int32_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_multi_array_dimension_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float32_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int32_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int8_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_multi_array_dimension.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int64_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_bool.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int32.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_empty_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int16_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int32_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int16_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_w_string.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float64_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float64_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_multi_array_layout_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_bool_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int16_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int16_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int8_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int64_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float64_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int16.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int64.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int16.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int32.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int8_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_multi_array_layout.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int64.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int64_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/init.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_string_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int8_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int16_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_byte_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_char_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float32_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int8_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_float64.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int32_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int64_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_w_string_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_char.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int8.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_byte.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int8.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int64_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_u_int8_multi_array_s.c
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int64_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_string.py
/usr/lib/python3.11/site-packages/example_interfaces/msg/_int32_multi_array.py
/usr/lib/python3.11/site-packages/example_interfaces/srv/_set_bool_s.c
/usr/lib/python3.11/site-packages/example_interfaces/srv/_add_two_ints_s.c
/usr/lib/python3.11/site-packages/example_interfaces/srv/_trigger_s.c
/usr/lib/python3.11/site-packages/example_interfaces/srv/_set_bool.py
/usr/lib/python3.11/site-packages/example_interfaces/srv/init.py
/usr/lib/python3.11/site-packages/example_interfaces/srv/_add_two_ints.py
/usr/lib/python3.11/site-packages/example_interfaces/srv/_trigger.py
/usr/lib/python3.11/site-packages/example_interfaces/action/_fibonacci.py
/usr/lib/python3.11/site-packages/example_interfaces/action/init.py
/usr/lib/python3.11/site-packages/example_interfaces/action/_fibonacci_s.c
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
example-interfaces: 76 installed and not shipped files. [installed-vs-shipped]
ERROR: example-interfaces-0.9.3-2-r0 do_package: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /home/jiten/Projects/WindRiver/cvc_fl_LTS23_RCPL_01/build-cvc-fl-initramfs/tmp-glibc/work/cortexa53-wrs-linux/example-interfaces/0.9.3-2-r0/temp/log.do_package.1838574
ERROR: Task (/home/jiten/Projects/WindRiver/cvc_fl_LTS23_RCPL_01/layers/meta-ros/meta-ros2-humble/generated-recipes/example-interfaces/example-interfaces_0.9.3-2.bb:do_package) failed with exit code '1
Can you guide here?
The text was updated successfully, but these errors were encountered: