Open MaximilienNaveau opened 1 year ago
This is issue is not very reproducible. While containing a lot of details, @MaximilienNaveau you should rather provide two bash files to reproduce and understand it.
Reproducing the bug:
# wrong behavior
source /opt/ros/noetic/setup.bash # Can be any ros1 version
cd /tmp
mkdir -p devel/workspace/src
cd devel/workspace/src
git clone --recursive https://github.com/Gepetto/aig.git -b topic/mnaveau/catkin_incompatible_cmake_module
cd ..
catkin build
source devel/setup.bash
env | grep ROS
catkin build
source devel/setup.bash
env | grep ROS
The ouput should look tike this:
Cloning into 'aig'...
remote: Enumerating objects: 1450, done.
remote: Counting objects: 100% (313/313), done.
remote: Compressing objects: 100% (219/219), done.
remote: Total 1450 (delta 169), reused 148 (delta 89), pack-reused 1137
Receiving objects: 100% (1450/1450), 2.31 MiB | 7.99 MiB/s, done.
Resolving deltas: 100% (910/910), done.
Submodule 'cmake' (https://github.com/jrl-umi3218/jrl-cmakemodules.git) registered for path 'cmake'
Cloning into '/tmp/devel/workspace/src/aig/cmake'...
remote: Enumerating objects: 4594, done.
remote: Counting objects: 100% (1098/1098), done.
remote: Compressing objects: 100% (527/527), done.
remote: Total 4594 (delta 583), reused 938 (delta 518), pack-reused 3496
Receiving objects: 100% (4594/4594), 2.25 MiB | 12.29 MiB/s, done.
Resolving deltas: 100% (2547/2547), done.
Submodule path 'cmake': checked out '7cf918642ffff34e6960b240aae87b0414c28860'
-------------------------------------------------------------------------------------
Profile: default
Extending: [env] /opt/ros/noetic:/opt/gurobi951/linux64/:/opt/openrobots/
Workspace: /tmp/devel/workspace
-------------------------------------------------------------------------------------
Build Space: [exists] /tmp/devel/workspace/build
Devel Space: [exists] /tmp/devel/workspace/devel
Install Space: [unused] /tmp/devel/workspace/install
Log Space: [missing] /tmp/devel/workspace/logs
Source Space: [exists] /tmp/devel/workspace/src
DESTDIR: [unused] None
-------------------------------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
-------------------------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
-------------------------------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
-------------------------------------------------------------------------------------
Workspace configuration appears valid.
NOTE: Forcing CMake to run for each package.
-------------------------------------------------------------------------------------
[build] Found '1' packages in 0.0 seconds.
[build] Updating package table.
Starting >>> catkin_tools_prebuild
Finished <<< catkin_tools_prebuild [ 1.1 seconds ]
Starting >>> aig
Finished <<< aig [ 45.6 seconds ]
[build] Summary: All 2 packages succeeded!
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 46.7 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/tmp/devel/workspace/src/aig:/opt/ros/noetic/share:/opt/openrobots/share # !!!!!!!!!!!!!!! Expected result
ROSLISP_PACKAGE_DIRECTORIES=/tmp/devel/workspace/devel/share/common-lisp
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
-------------------------------------------------------------------------------------
Profile: default
Extending: [cached] /opt/ros/noetic:/opt/gurobi951/linux64/:/opt/openrobots/
Workspace: /tmp/devel/workspace
-------------------------------------------------------------------------------------
Build Space: [exists] /tmp/devel/workspace/build
Devel Space: [exists] /tmp/devel/workspace/devel
Install Space: [unused] /tmp/devel/workspace/install
Log Space: [exists] /tmp/devel/workspace/logs
Source Space: [exists] /tmp/devel/workspace/src
DESTDIR: [unused] None
-------------------------------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
-------------------------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
-------------------------------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
-------------------------------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------------------------------
[build] Found '1' packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> aig
Finished <<< aig [ 2.3 seconds ]
[build] Summary: All 1 packages succeeded!
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 2.3 seconds total.
ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/opt/ros/noetic/share:/opt/openrobots/share # !!!!!!!!!!!!!!!!!!!!!!! HERE IS THE ISSUE !!!!!!!!!!!!!!
ROSLISP_PACKAGE_DIRECTORIES=
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
In order to get the correct behavior simply change the aig
branch to devel
and update the submodule, it should point to the commit 53b9790:
# wrong behavior
source /opt/ros/noetic/setup.bash # Can be any ros1 version
cd /tmp
mkdir -p devel/workspace/src
cd devel/workspace/src
git clone --recursive https://github.com/Gepetto/aig.git -b devel
cd ..
catkin build
source devel/setup.bash
env | grep ROS
catkin build
source devel/setup.bash
env | grep ROS
Expected output:
Cloning into 'aig'...
remote: Enumerating objects: 1450, done.
remote: Counting objects: 100% (314/314), done.
remote: Compressing objects: 100% (219/219), done.
remote: Total 1450 (delta 170), reused 149 (delta 90), pack-reused 1136
Receiving objects: 100% (1450/1450), 2.31 MiB | 11.42 MiB/s, done.
Resolving deltas: 100% (913/913), done.
Submodule 'cmake' (https://github.com/jrl-umi3218/jrl-cmakemodules.git) registered for path 'cmake'
Cloning into '/tmp/devel/workspace/src/aig/cmake'...
remote: Enumerating objects: 4594, done.
remote: Counting objects: 100% (1098/1098), done.
remote: Compressing objects: 100% (522/522), done.
remote: Total 4594 (delta 584), reused 949 (delta 523), pack-reused 3496
Receiving objects: 100% (4594/4594), 2.24 MiB | 4.36 MiB/s, done.
Resolving deltas: 100% (2548/2548), done.
Submodule path 'cmake': checked out '53b97908d7cd5cf58a30a309cfda85151eba8033'
-------------------------------------------------------------------------------------
Profile: default
Extending: [env] /opt/ros/noetic:/opt/gurobi951/linux64/:/opt/openrobots/
Workspace: /tmp/devel/workspace
-------------------------------------------------------------------------------------
Build Space: [exists] /tmp/devel/workspace/build
Devel Space: [exists] /tmp/devel/workspace/devel
Install Space: [unused] /tmp/devel/workspace/install
Log Space: [missing] /tmp/devel/workspace/logs
Source Space: [exists] /tmp/devel/workspace/src
DESTDIR: [unused] None
-------------------------------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
-------------------------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
-------------------------------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
-------------------------------------------------------------------------------------
Workspace configuration appears valid.
NOTE: Forcing CMake to run for each package.
-------------------------------------------------------------------------------------
[build] Found '1' packages in 0.0 seconds.
[build] Updating package table.
Starting >>> catkin_tools_prebuild
Finished <<< catkin_tools_prebuild [ 1.1 seconds ]
Starting >>> aig
Finished <<< aig [ 46.1 seconds ]
[build] Summary: All 2 packages succeeded!
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 47.2 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/tmp/devel/workspace/src/aig:/opt/ros/noetic/share:/opt/openrobots/share # !!!!!!!!!!!!!!! Expected result
ROSLISP_PACKAGE_DIRECTORIES=/tmp/devel/workspace/devel/share/common-lisp
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
-------------------------------------------------------------------------------------
Profile: default
Extending: [cached] /opt/ros/noetic:/opt/gurobi951/linux64/:/opt/openrobots/
Workspace: /tmp/devel/workspace
-------------------------------------------------------------------------------------
Build Space: [exists] /tmp/devel/workspace/build
Devel Space: [exists] /tmp/devel/workspace/devel
Install Space: [unused] /tmp/devel/workspace/install
Log Space: [exists] /tmp/devel/workspace/logs
Source Space: [exists] /tmp/devel/workspace/src
DESTDIR: [unused] None
-------------------------------------------------------------------------------------
Devel Space Layout: linked
Install Space Layout: None
-------------------------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False
-------------------------------------------------------------------------------------
Whitelisted Packages: None
Blacklisted Packages: None
-------------------------------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------------------------------
[build] Found '1' packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> aig
Finished <<< aig [ 0.5 seconds ]
[build] Summary: All 1 packages succeeded!
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 0.5 seconds total.
ROS_VERSION=1
ROS_PYTHON_VERSION=3
ROS_PACKAGE_PATH=/tmp/devel/workspace/src/aig:/opt/ros/noetic/share:/opt/openrobots/share # !!!!!!!!!!!!!!! Expected result
ROSLISP_PACKAGE_DIRECTORIES=/tmp/devel/workspace/devel/share/common-lisp
ROS_ETC_DIR=/opt/ros/noetic/etc/ros
ROS_MASTER_URI=http://localhost:11311
ROS_ROOT=/opt/ros/noetic/share/ros
ROS_DISTRO=noetic
We have an issue with catkin tools when package are managed with the jrl-cmakemmodules from 53b9790 excluded. Indeed everything is fine if 53b9790 is checkout is the git submodule.
The problem arise when one follows these steps:
workspace/src
catkin build
source devel/setup.bash
androslaunch something something
.catkin build
source devel/setup.bash
<your-workspace>:<chained-workpsace>
.<chained-workpsace>
it does not contain the paths to the source folder anymore.