Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

Wrong PYTHONPATH by building ros-bouncy/ament_cmake_core


quantum

Question

As part of my try to build ROS2 Bouncy distribution with Funtoo I added ros-overlay to my repository.

At present i get a build error for the package ros-bouncy/ament_cmake_core-0.5.1

Since i was unable to upload the file, there here is my /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/temp/build.log:

Quote

* Package:    ros-bouncy/ament_cmake_core-0.5.1
* Repository: local
* USE:        amd64 elibc_glibc kernel_linux python_targets_python3_6 userland_GNU
* FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking ament_cmake_core-bouncy-release-0.5.1.tar.gz to /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work
>>> Source unpacked in /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work
>>> Preparing source in /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1 ...
>>> Working in BUILD_DIR: "/var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1_build"
cmake -C /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DAMENT_ENABLE_TESTING=0 -DAMENT_BUILD
_BINARY_PACKAGE=1 -DCMAKE_PREFIX_PATH=/opt/ros/bouncy -DCMAKE_INSTALL_PREFIX=/opt/ros/bouncy -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/wo
rk/ament_cmake_core-0.5.1_build/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1_build/gentoo_toolchain.cmake  /var/tmp/portage/ros-b
ouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1
loading initial cache file /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1_build/gentoo_common_config.cmake
-- Found PythonInterp: /usr/bin/python (found suitable version "3.6.5", minimum required is "3")  
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- ament_cmake_core 0.5.1
Traceback (most recent call last):
 File "/var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1/cmake/package_templates/templates_2_cmake.py", line 21, in <module>
   from ament_package.templates import get_environment_hook_template_path
ModuleNotFoundError: No module named 'ament_package'
CMake Error at ament_cmake_package_templates-extras.cmake:41 (message):
 execute_process(/usr/bin/python
 /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1/cmake/package_templates/templates_2_cmake.py
 /var/tmp/portage/ros-bouncy/ament_cmake_core-0.5.1/work/ament_cmake_core-0.5.1_build/ament_cmake_package_templates/templates.cmake)
 returned error code 1
Call Stack (most recent call first):
 CMakeLists.txt:19 (include)

As i tried to investigate the problem, i found that i do have package ament_package, but at a different path:

Quote

/opt/ros/bouncy/lib64/python3.6/site-packages/ament_package-0.5.2-py3.6.egg-info

As you can see, /opt/ros/bouncy/lib64/python3.6/site-packages rather then /usr/lib64/python3.6/site-packages.

My guess is that the PYTHONPATH which is set in /var/git/overlay/ros-overlay/eclass/ament-cmake.eclass is not correct.


 

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

×
×
  • Create New...