ros2 fails to build at rcl_logging_log4cxx
Hi, I was building ROS2-Galactic on my Mac and I encountered the following error which I have not been able to fix so far:
Finished <<< libyaml_vendor [3.76s]
running egg_info
writing rosidl_generator_c.egg-info/PKG-INFO
writing dependency_links to rosidl_generator_c.egg-info/dependency_links.txt
writing entry points to rosidl_generator_c.egg-info/entry_points.txt
writing top-level names to rosidl_generator_c.egg-info/top_level.txt
reading manifest file 'rosidl_generator_c.egg-info/SOURCES.txt'
writing manifest file 'rosidl_generator_c.egg-info/SOURCES.txt'
In file included from /Users/henry/ros2_galactic/src/ros2/rcl_logging/rcl_logging_log4cxx/src/rcl_logging_log4cxx/rcl_logging_log4cxx.cpp:23:
In file included from /usr/local/include/log4cxx/logger.h:30:
In file included from /usr/local/include/log4cxx/helpers/appenderattachableimpl.h:27:
In file included from /usr/local/include/log4cxx/spi/appenderattachable.h:26:
In file included from /usr/local/include/log4cxx/logstring.h:28:
In file included from /usr/local/include/log4cxx/log4cxx.h:45:
/usr/local/include/log4cxx/boost-std-configuration.h:10:18: error: no type named 'shared_mutex' in namespace 'std'
typedef std::shared_mutex shared_mutex;
~~~~~^
Starting >>> rcl_logging_spdlog
[ 49%] Built target test_validate_node_name
[ 88%] Linking CXX executable class_loader_fviz_test
[100%] Built target ament_cmake_python_build_rosidl_generator_c_egg
Finished <<< rviz_rendering_tests [3.62s]
Finished <<< rcl_logging_noop [1.98s]
[ 50%] Linking CXX executable test_allocators
[ 92%] Built target class_loader_fviz_test
In file included from /Users/henry/ros2_galactic/src/ros2/rcl_logging/rcl_logging_log4cxx/src/rcl_logging_log4cxx/rcl_logging_log4cxx.cpp:29:
In file included from /usr/local/include/log4cxx/patternlayout.h:27:
In file included from /usr/local/include/log4cxx/pattern/loggingeventpatternconverter.h:21:
/usr/local/include/log4cxx/pattern/patternconverter.h:76:44: warning: extra ';' inside a class [-Wextra-semi]
DECLARE_LOG4CXX_PATTERN(PatternConverter);
^
[ 96%] Linking CXX executable class_loader_unique_ptr_test
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/rcl_logging_log4cxx.dir/src/rcl_logging_log4cxx/rcl_logging_log4cxx.cpp.o] Error 1
make[1]: *** [CMakeFiles/rcl_logging_log4cxx.dir/all] Error 2
make: *** [all] Error 2
[ 52%] Built target test_allocators
-- Install configuration: ""
-- Execute custom install script
-- Up-to-date symlink: /Users/henry/ros2_galactic/install/rosidl_generator_c/share/ament_index/resource_index/rosidl_generator_packages/rosidl_generator_c
-- Up-to-date symlink: /Users/henry/ros2_galactic/install/rosidl_generator_c/share/rosidl_generator_c/environment/pythonpath.sh
--- stderr: rcl_logging_log4cxx
In file included from /Users/henry/ros2_galactic/src/ros2/rcl_logging/rcl_logging_log4cxx/src/rcl_logging_log4cxx/rcl_logging_log4cxx.cpp:23:
In file included from /usr/local/include/log4cxx/logger.h:30:
In file included from /usr/local/include/log4cxx/helpers/appenderattachableimpl.h:27:
In file included from /usr/local/include/log4cxx/spi/appenderattachable.h:26:
In file included from /usr/local/include/log4cxx/logstring.h:28:
In file included from /usr/local/include/log4cxx/log4cxx.h:45:
/usr/local/include/log4cxx/boost-std-configuration.h:10:18: error: no type named 'shared_mutex' in namespace 'std'
typedef std::shared_mutex shared_mutex;
~~~~~^
In file included from /Users/henry/ros2_galactic/src/ros2/rcl_logging/rcl_logging_log4cxx/src/rcl_logging_log4cxx/rcl_logging_log4cxx.cpp:29:
In file included from /usr/local/include/log4cxx/patternlayout.h:27:
In file included from /usr/local/include/log4cxx/pattern/loggingeventpatternconverter.h:21:
/usr/local/include/log4cxx/pattern/patternconverter.h:76:44: warning: extra ';' inside a class [-Wextra-semi]
DECLARE_LOG4CXX_PATTERN(PatternConverter);
^
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/rcl_logging_log4cxx.dir/src/rcl_logging_log4cxx/rcl_logging_log4cxx.cpp.o] Error 1
make[1]: *** [CMakeFiles/rcl_logging_log4cxx.dir/all ...
Possible to invoke
colcon
with the--event-handlers console_direct+
argument to get more detailed output? Unfortunately themake
error doesn't lend any information to work with.I've run this and will update the post with the error I'm getting. Thank you!