Hi,
I’m not sure if the sync is the actual cause, but after I apt-get upgrade, build of some packages fails in my environment.
The problem occurs when a package with parameter files for dynamic_reconfigure
(e.g. compressed_image_transport
) is already installed via apt-get and also is located on catkin workspace and there is difference between parameter files of the packages.
It looks like g++
looks at header files generated from dynamic reconfigure params on /opt/ros/melodic
instead of the current catkin workspace.
I further looked into build logs and found that devel directory is passed to compiler using -isystem
instead of -I
.
To reproduce the issue:
sudo apt-get install ros-melodic-compressed-image-transport
source /opt/ros/melodic/setup.bash
mkdir -p ~/catkin_ws/src && cd ~/catkin_ws/src
git clone https://github.com/ros-perception/image_transport_plugins.git -b indigo-devel
cd ~/catkin_ws
catkin config --init
catkin build
Log on environment BEFORE apt-get upgrade
:
/usr/bin/c++ -DROSCONSOLE_BACKEND_LOG4CXX -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"compressed_image_transport\" -Dcompressed_image_transport_EXPORTS -I/home/furushchev/catkin_ws/devel/.private/compressed_image_transport/include -I/home/furushchev/catkin_ws/src/image_transport_plugins/compressed_image_transport/include -I/home/furushchev/catkin_ws/src/vision_opencv/cv_bridge/include -I/home/furushchev/catkin_ws/src/image_common/image_transport/include -I/opt/ros/melodic/include -I/opt/ros/melodic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -isystem /usr/include/opencv -O2 -g -DNDEBUG -fPIC -o CMakeFiles/compressed_image_transport.dir/src/compressed_publisher.cpp.o -c /home/furushchev/catkin_ws/src/image_transport_plugins/compressed_image_transport/src/compressed_publisher.cpp
Log on environment AFTER apt-get upgrade
:
/usr/bin/c++ -DROSCONSOLE_BACKEND_LOG4CXX -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"compressed_image_transport\" -Dcompressed_image_transport_EXPORTS -isystem /home/furushchev/catkin_ws/src/image_transport_plugins/compressed_image_transport/BEFORE -isystem /home/furushchev/catkin_ws/devel/.private/compressed_image_transport/include -I/home/furushchev/catkin_ws/src/image_transport_plugins/compressed_image_transport/include -I/opt/ros/melodic/include -I/opt/ros/melodic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -isystem /usr/include/opencv -fPIC -o CMakeFiles/compressed_image_transport.dir/src/compressed_publisher.cpp.o -c /home/furushchev/catkin_ws/src/image_transport_plugins/compressed_image_transport/src/compressed_publisher.cpp
I’m not sure the issue comes from catkin
package, so I posted here.
Hope it helps!