colcon / colcon-ros

Extension for colcon to support ROS packages
http://colcon.readthedocs.io
Apache License 2.0
13 stars 26 forks source link

Paths not being exported #132

Closed g-arjones closed 3 months ago

g-arjones commented 2 years ago

I apologize if this is not the place to report this issue but I couldn't find a better one.

As far as I can tell, some paths (PKG_CONFIG_PATH, CMAKE_MODULE_PATH, CMAKE_PREFIX_PATH) are not being exported through the environment setup scripts and hooks. That makes integration with other build tools more painful than it should be.

arjones@dfcdfc78e327:~$ find /opt/ros/galactic/ -name "*.pc"
/opt/ros/galactic/lib/pkgconfig/orocos-kdl.pc
/opt/ros/galactic/lib/pkgconfig/orocos_kdl.pc
/opt/ros/galactic/lib/pkgconfig/libzstd.pc
/opt/ros/galactic/lib/x86_64-linux-gnu/pkgconfig/console_bridge.pc
/opt/ros/galactic/lib/x86_64-linux-gnu/pkgconfig/urdfdom.pc
/opt/ros/galactic/lib/x86_64-linux-gnu/pkgconfig/urdfdom_headers.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-Overlay.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-Paging.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-MeshLodGenerator.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-PCZ.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-RTShaderSystem.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-Terrain.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-HLMS.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-Volume.pc
/opt/ros/galactic/opt/rviz_ogre_vendor/lib/pkgconfig/OGRE-Property.pc
/opt/ros/galactic/opt/yaml_cpp_vendor/lib/pkgconfig/yaml-cpp.pc
arjones@dfcdfc78e327:~$ source /opt/ros/galactic/setup.bash 
arjones@dfcdfc78e327:~$ env | egrep "PKG_CONFIG_PATH|CMAKE_MODULE_PATH|CMAKE_PREFIX_PATH"
arjones@dfcdfc78e327:~$ 

Is this a bug or am I missing something?

cottsay commented 2 years ago

At the moment, pkg-config is just unsupported. Neither ament nor catkin utilize it, so it just hasn't been needed. It might be possible to develop a colcon extension to create the necessary hooks, but since colcon isn't used to build the binary debian and RPM packages on the buildfarm, you'd have to develop an corresponding ament hook to handle this there as well.

As for CMAKE_MODULE_PATH and CMAKE_PREFIX_PATH, I'll need a little more information. You're referencing files in /opt/ros/galactic - did you install those packages as debs? If so, their environment hooks were generated by ament and not colcon.

cottsay commented 3 months ago

Hi @g-arjones, were you able to move forward?

Also, it appears that there is already a colcon-pkg-config extension available: https://github.com/colcon/colcon-pkg-config

g-arjones commented 3 months ago

Hi @g-arjones, were you able to move forward?

I moved on and left pkg-config alone. I was integrating it for completeness but since I don't use it anymore and colcon/ament didn't provide what was necessary I decided to leave pkg-config out and just not support it my tools.

cottsay commented 3 months ago

Thanks for getting back to me.

I'm going to close this ticket since you're not motivated to get to the bottom of the issue right now. Please feel free to re-open if it becomes a problem for you once again, and you believe a change to colcon would help.