ros / console_bridge Goto Github PK
View Code? Open in Web Editor NEWA ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.
License: BSD 3-Clause "New" or "Revised" License
A ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.
License: BSD 3-Clause "New" or "Revised" License
Robot Operating System (ROS) =============================================================================== ROS is a meta-operating system for your robot. It provides language-independent and network-transparent communication for a distributed robot control system. Installation Notes ------------------ For full installation instructions, including system prerequisites and platform-specific help, see: http://wiki.ros.org/ROS/Installation
I ran into an issue where my project could not find the header console_bridge/console_bridge.h
event though find_package was able to find the package. After further investigation I found that the target console_bridge::console_bridge
provided by does not set the targets INTERFACE_INCLUDE_DIRECTORIES, but it does set the cmake variable console_bridge_INCLUDE_DIRS
.
Reproduce:
find_package(console_bridge REQUIRED)
get_target_property(GET_INCLUDES console_bridge::console_bridge INTERFACE_INCLUDE_DIRECTORIES)
message(AUTHOR_WARNING "console_bridge Interface Includes: ${GET_INCLUDES}")
add_library(${PROJECT_NAME} src/osqp_eigen_solver.cpp)
target_link_libraries(${PROJECT_NAME} PUBLIC console_bridge::console_bridge)
Output:
console_bridge Interface Includes: GET_INCLUDES-NOTFOUND
Can someone with admin privileges enable travis CI for this repository? I've been testing a build script in my fork, but I'm not allowed to enable it for this repo.
Tried to compile version 0.4.1 on arch linux and recieved following error.
Please help.
[ 12%] Linking CXX shared library lib/libconsole_bridge.so [ 25%] Building CXX object test/CMakeFiles/gtest.dir/gtest/src/gtest-all.cc.obj CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x118): undefined reference to
std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x149): undefined reference to std::ostream::put(char)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x151): undefined reference to
std::ostream::flush()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x167): undefined reference to std::ctype<char>::_M_widen_init() const' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x18e): undefined reference to
std::__throw_bad_cast()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x1e9): undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x1fc): undefined reference to
std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x22d): undefined reference to std::ostream::put(char)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x235): undefined reference to
std::ostream::flush()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x24e): undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x25c): undefined reference to
std::ostream::operator<<(int)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x274): undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x293): undefined reference to
std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x2c1): undefined reference to std::ostream::put(char)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x2c9): undefined reference to
std::ostream::flush()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x300): undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x313): undefined reference to
std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x344): undefined reference to std::ostream::put(char)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x34c): undefined reference to
std::ostream::flush()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x368): undefined reference to std::ctype<char>::_M_widen_init() const' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x399): undefined reference to
std::ctype::_M_widen_init() const'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x3d4): undefined reference to std::ctype<char>::_M_widen_init() const' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x416): undefined reference to
std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x431): undefined reference to std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x455): undefined reference to
std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x45f): undefined reference to std::__throw_bad_cast()' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x4b5): undefined reference to
std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x4e6): undefined reference to std::ostream::put(char)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x504): undefined reference to
std::ctype::_M_widen_init() const'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x52b): undefined reference to std::__throw_bad_cast()' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x598): undefined reference to
__cxa_guard_acquire'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x5eb): undefined reference to __cxa_guard_release' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x603): undefined reference to
std::__throw_system_error(int)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x669): undefined reference to __cxa_guard_acquire' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x6bc): undefined reference to
__cxa_guard_release'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x6d4): undefined reference to std::__throw_system_error(int)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x748): undefined reference to
__cxa_guard_acquire'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x79b): undefined reference to __cxa_guard_release' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x7b3): undefined reference to
std::__throw_system_error(int)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x7ed): undefined reference to __cxa_guard_acquire' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x840): undefined reference to
__cxa_guard_release'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x8ed): undefined reference to __cxa_guard_acquire' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x940): undefined reference to
__cxa_guard_release'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xa23): undefined reference to operator delete(void*)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xa4c): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long long&, unsigned long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xae1): undefined reference to std::__throw_system_error(int)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xaf7): undefined reference to
operator delete(void*)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xb78): undefined reference to __cxa_guard_acquire' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xbcb): undefined reference to
__cxa_guard_release'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xbe3): undefined reference to std::__throw_system_error(int)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xc48): undefined reference to
__cxa_guard_acquire'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xc9b): undefined reference to __cxa_guard_release' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xcb3): undefined reference to
std::__throw_system_error(int)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xd0a): undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xd2d): undefined reference to
std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long long)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xd4d): undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long long)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xd77): undefined reference to
std::ostream::put(char)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xd94): undefined reference to std::ctype<char>::_M_widen_init() const' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xdd8): undefined reference to
std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xde2): undefined reference to std::__throw_bad_cast()' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xc8): undefined reference to
std::ios_base::Init::~Init()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xff): undefined reference to operator delete(void*)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x15f): undefined reference to
operator delete(void*)'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x2dd): undefined reference to std::ostream::flush()' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x360): undefined reference to
std::ostream::flush()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0x4f3): undefined reference to std::ostream::flush()' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text+0xd85): undefined reference to
std::ostream::flush()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.xdata+0x4): undefined reference to __gxx_personality_seh0' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.xdata+0x34): undefined reference to
__gxx_personality_seh0'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.xdata+0x54): undefined reference to __gxx_personality_seh0' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.xdata+0x68): undefined reference to
__gxx_personality_seh0'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.xdata+0x88): undefined reference to __gxx_personality_seh0' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.xdata+0xa8): more undefined references to
__gxx_personality_seh0' follow
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text$_ZN14console_bridge16OutputHandlerSTDD0Ev[_ZN14console_bridge16OutputHandlerSTDD0Ev]+0x1): undefined reference to operator delete(void*)' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.text.startup+0xc): undefined reference to
std::ios_base::Init::Init()'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.rdata$_ZTIN14console_bridge13OutputHandlerE[_ZTIN14console_bridge13OutputHandlerE]+0x0): undefined reference to vtable for __cxxabiv1::__class_type_info' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.rdata$_ZTIN14console_bridge16OutputHandlerSTDE[_ZTIN14console_bridge16OutputHandlerSTDE]+0x0): undefined reference to
vtable for __cxxabiv1::__si_class_type_info'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.rdata$_ZTIN14console_bridge17OutputHandlerFileE[_ZTIN14console_bridge17OutputHandlerFileE]+0x0): undefined reference to vtable for __cxxabiv1::__si_class_type_info' CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.rdata$.refptr._ZSt4cout[.refptr._ZSt4cout]+0x0): undefined reference to
std::cout'
CMakeFiles/console_bridge.dir/src/console.cpp.obj:console.cpp:(.rdata$.refptr._ZSt4cerr[.refptr._ZSt4cerr]+0x0): undefined reference to std::cerr' collect2.exe: error: ld returned 1 exit status make[2]: *** [CMakeFiles/console_bridge.dir/build.make:84: lib/libconsole_bridge.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/console_bridge.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[2]: *** Deleting file 'test/CMakeFiles/gtest.dir/gtest/src/gtest-all.cc.obj' make[2]: unlink: test/CMakeFiles/gtest.dir/gtest/src/gtest-all.cc.obj: Device or resource busy make[2]: *** [test/CMakeFiles/gtest.dir/build.make:63: test/CMakeFiles/gtest.dir/gtest/src/gtest-all.cc.obj] Interrupt make[1]: *** [CMakeFiles/Makefile2:208: test/CMakeFiles/gtest.dir/all] Interrupt make: *** [Makefile:141: all] Interrupt
We're seeing a build failure in console_bridge on Windows (http://ci.ros2.org/job/packaging_windows/114/consoleFull#console-section-37):
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /I<http://ci.ros2.org/job/packaging_windows/ws/ws\src\vendor\console_bridge\include> /I<http://ci.ros2.org/job/packaging_windows/ws/ws\src\vendor\console_bridge\test\gtest\include> /I<http://ci.ros2.org/job/packaging_windows/ws/ws\src\vendor\console_bridge\test\gtest> /I<http://ci.ros2.org/job/packaging_windows/ws/ws\src\vendor\console_bridge\test> /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"console_TEST.dir\Release\\" /Fd"console_TEST.dir\Release\vc140.pdb" /Gd /TP /errorReport:queue -Wno-deprecated-declarations <http://ci.ros2.org/job/packaging_windows/ws/ws\src\vendor\console_bridge\test\console_TEST.cc>
cl : Command line error D8021: invalid numeric argument '/Wno-deprecated-declarations' [<http://ci.ros2.org/job/packaging_windows/ws/ws\build\console_bridge\test\console_TEST.vcxproj]>
I'm not an expert, but it looks like the MSVC compiler doesn't accept Wno-deprecated-declarations
. It's not on their apparently exhaustive list: https://msdn.microsoft.com/en-us/library/fwkeyyhe.aspx.
Perhaps the setting of that option should be conditioned on platform so that it's not used on Windows: https://github.com/ros/console_bridge/blob/master/test/CMakeLists.txt#L26-L27.
add
#define logWarn CONSOLE_BRIDGE_logWarn
#define logError CONSOLE_BRIDGE_logError
#define logDebug CONSOLE_BRIDGE_logDebug
#define logInform CONSOLE_BRIDGE_logInform
to /usr/include/ros/console_bridge/console.h in some cases.
My OS: archlinux
lend my wisdom.
The latest released version 0.2.3 fails when being build with spaces in the path.
Since the master has already been diverged I did not send those as a pull request. The following paths would need to be quoted:
The current master does not have a problem with spaces in the path but is not in a shape to be released as-is (imho #8 (comment)).
Apparently CLang complains about the use of ## __VA_ARGS__
as it is a GNU extension causing warnings on our CI:
Warning type: -Wgnu-zero-variadic-macro-arguments
Warning message: "token pasting of ',' and __VA_ARGS__
is a GNU extension"
Compiler version : AppleClang 9.0.0.9000039
Compiler args: -Wall -Wextra -Wpedantic
Example job producing warnings:
http://ci.ros2.org/job/ci_osx/3283/warnings10Result/
Is this package supposed to have a package.xml? It seems it was removed at tag 0.2.4, though groovy claims to be at version 0.2.4 yet it has a package.xml.
Anyway, we are building ROS from source and are currently patching this package; should we make a pull request? (Or, are we doing it wrong? :)
E.g.:
console_bridge\test\gtest\include\gtest/gtest-printers.h(500):
warning C4996: 'std::tr1': warning STL4002:
The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED. You can define _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING to acknowledge that you have received this warning.
The warnings have been fixed upstream so pulling a newer version of the googletest
code will likely solve this.
The ROS package of console bridge must not use GNU install dirs. Simply because the files can not be found in these locations (as I commented four months ago) and it break all downstream stuff (e.g. http://jenkins.ros.org/view/Idev/job/devel-indigo-actionlib/5/testReport/ ).
As a result I will downgrade console_bridge in the Indigo file to an older version. Before this is addressed no new console_bridge releases can be accepted into the ROS distro.
I am looking for guidance on how to implement similar functionality to the named logs in ROS within in this package. Anyone have an guidance on how to implement this?
By avoiding to embed the absolute path of the install prefix in e.g. the .pc
file. Similar to ros2/urdfdom#20.
Related to ros2/ros2#606.
I'm trying to cross-compile console_bridge with catkin_make_isolated. Compiling it works fine, but when other packages try to link against console_bridge they can't find the library as console_bridge_LIBRARIES
is only set to console_bridge
.
e.g. in rosbag_storage:
https://github.com/ros/ros_comm/blob/kinetic-devel/tools/rosbag_storage/CMakeLists.txt#L41
I'm no cmake expert (so correct me if I'm wrong), but according to the documentation this variable should contain absolute paths to the library:
https://cmake.org/cmake/help/v3.10/command/link_directories.html:
Library locations returned by find_package() and find_library() are absolute paths. Pass these absolute library file paths directly to the target_link_libraries() command.
hi, there:
We found ROS cannot print Chinese by c++, like" 我是新手 ".
For instance, ROS_INFO(" 我是新手 "), the result is [ INFO] [1512552131.271037807]: ????????????
However, in python ROS could print Chinese well.
Is this issue caused by pointer?
like: const char* m in void console_bridge::log(const char file, int line, LogLevel level, const char m, ...)
@wjwwood
console_bridge/src/console.cpp
Line 153 in bbcc914
'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
http://ci.ros2.org/view/packaging/job/packaging_windows/103/warnings34Result/package.-318397937/
I had to add "boost system" to get it to compile. Here is the diff:
[kevin@tardis console_bridge]$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 453683d..09b7f61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
-find_package(Boost COMPONENTS thread REQUIRED)
+find_package(Boost COMPONENTS system thread REQUIRED)
if(MSVC OR MSVC90 OR MSVC10)
set(MSVC ON)
@@ -20,7 +20,7 @@ include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})
add_library(${PROJECT_NAME} SHARED src/console.cpp)
-target_link_libraries(${PROJECT_NAME} ${Boost_THREAD_LIBRARY})
+target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
install(TARGETS ${PROJECT_NAME}
DESTINATION lib/)
I had to disable the appveyor tests in 0d83ff0 since the test is failing via timeout. When I run it locally, it gives a pop-up saying that the console_bridge dll could not be found. I've tried to fix it scpeters@064642a, but it's not quite working yet.
When building ROS in a cross-compiled build, console_bridgeConfig.cmake
will set console_bridge_INCLUDE_DIRS
to its installation include directory.
This will cause e.g. /usr/include
to be added to the INCLUDE_DIRECTORIES
, if the requiring package does not manually prefix the directories with the CMAKE_FIND_ROOT_PATH
. As a result, builds might fail, e.g. because the hosts math.h
is included which likely contains invalid ASM for the target system.
I am not sure about the convention in this regard, but looking at e.g. FindBoost.cmake
they use find_path
which returns the prefixed path.
I applied this patch in my case which fixes the issue:
diff --git a/console_bridge-config.cmake.in b/console_bridge-config.cmake.in
index 9d0763f..22ac756 100644
--- a/console_bridge-config.cmake.in
+++ b/console_bridge-config.cmake.in
@@ -3,7 +3,9 @@ if (@PKG_NAME@_CONFIG_INCLUDED)
endif()
set(@PKG_NAME@_CONFIG_INCLUDED TRUE)
-set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
+find_path(@PKG_NAME@_INCLDE_DIRS
+ NAMES console_bridge/console.h
+ HINTS @CMAKE_INSTALL_FULL_INCLUDE_DIR@)
foreach(lib @PKG_LIBRARIES@)
set(onelib "${lib}-NOTFOUND")
In Groovy:
I'm writing a library that is including syslog.h via a 3rd-party library (MongoDB). When I attempt to export my library using Pluginlib (to use in RViz), I can't compile due to conflicting enums. See error output below:
In file included from /opt/ros/groovy/include/class_loader/class_loader.h:38:0,
from /opt/ros/groovy/include/pluginlib/class_list_macros.h:40,
from /home/dinh/ros_workspace/foobar/src/foo.cpp:157:
/opt/ros/groovy/include/console_bridge/console.h:81:5: error: expected identifier before numeric constant
/opt/ros/groovy/include/console_bridge/console.h:81:5: error: expected ‘}’ before numeric constant
/opt/ros/groovy/include/console_bridge/console.h:81:5: error: expected unqualified-id before numeric constant
LOG_DEBUG and LOG_INFO both conflict with names in syslog.h. If I change the enums in console_bridge/console.h to differ from those in syslog.h, everything compiles fine.
There are no issues in Fuerte. This issue could be showing up now due to the change in Pluginlib / introduction of the ClassLoader package in Groovy and it's possible that I'm incorrectly using Pluginlib with the new changes. Nevertheless, I suggest a change in the enums in order to reduce any potential conflicts.
The state of this repository has diverged significantly from what is actually being used / has been released latest. Currently it is not clear where future patches should be applied and how they could be released:
console_bridge
To match user expectation I think the repo needs some clean up:
console_bridge
version being used by ROS Indigo(The general rules apply that no version number should ever be reused or be available from different branches containing different code.)
Potentially a missing -fPIC in the compile arguments. I guess because it's not catkin it doesn't default to SHARED. Do we wnat to implement
Anything building on top of console_bridge is failing, like class_loader: http://jenkins.willowgarage.com:8080/view/HbinP64/job/ros-hydro-class-loader_binarydeb_precise_amd64/7/console
make[2]: Entering directory `/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu'
/usr/bin/cmake -H/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203 -B/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[3]: Entering directory `/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu'
make -f CMakeFiles/class_loader.dir/build.make CMakeFiles/class_loader.dir/depend
make[4]: Entering directory `/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu'
cd /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203 /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203 /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles/class_loader.dir/DependInfo.cmake --color=
Scanning dependencies of target class_loader
make[4]: Leaving directory `/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu'
make -f CMakeFiles/class_loader.dir/build.make CMakeFiles/class_loader.dir/build
make[4]: Entering directory `/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu'
/usr/bin/cmake -E cmake_progress_report /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles 1
[ 25%] Building CXX object CMakeFiles/class_loader.dir/src/class_loader.cpp.o
/usr/lib/ccache/c++ -Dclass_loader_EXPORTS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fPIC -I/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/include -I/opt/ros/hydro/include -o CMakeFiles/class_loader.dir/src/class_loader.cpp.o -c /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/src/class_loader.cpp
/usr/bin/cmake -E cmake_progress_report /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles 2
[ 50%] Building CXX object CMakeFiles/class_loader.dir/src/class_loader_core.cpp.o
/usr/lib/ccache/c++ -Dclass_loader_EXPORTS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fPIC -I/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/include -I/opt/ros/hydro/include -o CMakeFiles/class_loader.dir/src/class_loader_core.cpp.o -c /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/src/class_loader_core.cpp
/usr/bin/cmake -E cmake_progress_report /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles 3
[ 75%] Building CXX object CMakeFiles/class_loader.dir/src/meta_object.cpp.o
/usr/lib/ccache/c++ -Dclass_loader_EXPORTS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fPIC -I/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/include -I/opt/ros/hydro/include -o CMakeFiles/class_loader.dir/src/meta_object.cpp.o -c /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/src/meta_object.cpp
/usr/bin/cmake -E cmake_progress_report /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/obj-x86_64-linux-gnu/CMakeFiles 4
[100%] Building CXX object CMakeFiles/class_loader.dir/src/multi_library_class_loader.cpp.o
/usr/lib/ccache/c++ -Dclass_loader_EXPORTS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fPIC -I/tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/include -I/opt/ros/hydro/include -o CMakeFiles/class_loader.dir/src/multi_library_class_loader.cpp.o -c /tmp/buildd/ros-hydro-class-loader-0.2.1-0precise-20130619-0203/src/multi_library_class_loader.cpp
Linking CXX shared library devel/lib/libclass_loader.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/class_loader.dir/link.txt --verbose=1
/usr/lib/ccache/c++ -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -shared -Wl,-soname,libclass_loader.so -o devel/lib/libclass_loader.so CMakeFiles/class_loader.dir/src/class_loader.cpp.o CMakeFiles/class_loader.dir/src/class_loader_core.cpp.o CMakeFiles/class_loader.dir/src/meta_object.cpp.o CMakeFiles/class_loader.dir/src/multi_library_class_loader.cpp.o -lboost_thread-mt -lpthread /opt/ros/hydro/lib/libconsole_bridge.a -lPocoFoundation -ldl
/usr/bin/ld: /opt/ros/hydro/lib/libconsole_bridge.a(console.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/ros/hydro/lib/libconsole_bridge.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [devel/lib/libclass_loader.so] Error 1
On answers.ros.org and this post (http://answers.ros.org/question/62215/where-to-install-console_bridge/) there are errors in the instructions:
Edit: mkdir cb_ws
cd cb_ws
git clone https://github.com/ros/console_bridge
cd cb_ws
mkdir build
cd build
cmake -CMAKE_INSTALL_PREFIX=../install ../console_bridge
make install
From the wiki (http://www.ros.org/wiki/console_bridge) the build instructions hint at some possible corrections but please review and correct as needed:
Edit: mkdir cb_ws
cd cb_ws
git clone https://github.com/ros/console_bridge (from the wiki should there be a .git at the end here)??
cd cb_ws (from the wiki should this be cd console_bridge)??
mkdir build (Here you use build but below you speak of install. Should we mkdir install instead of build)??
cd build
cmake -CMAKE_INSTALL_PREFIX=../install ../console_bridge (I've tried this line with the directory above as build and install and this cmake throws errors)??
make install (I never get this far because the cmake above fails)
I would appreciate any edits here to clear this up.
Hi,
the new version breaks the API:
/<<PKGBUILDDIR>>/tools/rosbag_storage/src/bz2_stream.cpp: In member function 'virtual void rosbag::BZ2Stream::read(void*, size_t)':
/<<PKGBUILDDIR>>/tools/rosbag_storage/src/bz2_stream.cpp:119:9: error: 'else' without a previous 'if'
else {
^
/<<PKGBUILDDIR>>/tools/rosbag_storage/src/lz4_stream.cpp: In member function 'virtual void rosbag::LZ4Stream::read(void*, size_t)':
/<<PKGBUILDDIR>>/tools/rosbag_storage/src/lz4_stream.cpp:159:9: error: 'else' without a previous 'if'
else {
^
tools/rosbag_storage/CMakeFiles/rosbag_storage.dir/build.make:137: recipe for target 'tools/rosbag_storage/CMakeFiles/rosbag_storage.dir/src/bz2_stream.cpp.o' failed
make[3]: *** [tools/rosbag_storage/CMakeFiles/rosbag_storage.dir/src/bz2_stream.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
The problematic commit is 4c529c6.
The problem is that the console_bridge_deprecated();
makes the macro two commands and so the binding between the if
and the else
is lost (see https://github.com/ros/ros_comm/blob/indigo-devel/tools/rosbag_storage/src/bz2_stream.cpp#L118).
Platform: Windows 10 1803
Built with VS 2017
Command line warning D9002: ignoring unknown option '-fvisibility=hidden'
error C2065: 'deprecated': undeclared identifier
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2448: 'attribute': function-style initializer appears to be a function definition
Since console_bridge is ROS-independent should it go in a ROS workspace or simply in with the debian/Ubuntu somewhere?
Whatever changed in rosconsole recently broke ABI compatiblity. Just a head's up.
If console_bridge is installed in odd (non-system) places, I am getting this error:
Re-run cmake no build system arguments
-- urdfdom version 0.2.9
-- Looking for libtinyxml - found
CMake Error at /home/hsu/projects/console_bridge/install_release/share/console_bridge/cmake/console_bridge-config.cmake:12 (message):
Library 'console_bridge' in package console_bridge is not installed
properly
Call Stack (most recent call first):
CMakeLists.txt:42 (find_package)
-- Configuring incomplete, errors occurred!
This package uses just a very small amount of boost, much less than urdfdom (related issue: ros/urdfdom#62 ). So it should be easier to use this as a test case for how to start the move to c++11. I have made the necessary changes in scpeters@255abf6 but I wanted to wait before submitting a pull request to ask what the new branch should be called and what numbering to use.
Some questions:
release-0.2
) and make the master branch use c++11?This issue tracks the progression of libconsole-bridge-dev
to Quality Level 1 and a 1.0 version level. It will follow the outline described in REP 2004.
Documentation
Testing:
cppcheck
and cpplint
Dependencies:
Platform Support
The currently defined macros to log messages (e.g.
) are much to generic and collide with existing code. The should be prefixed with the package name to make them unique.Even if this is a significant API change this should be fixed. Likely bumping more then just the patch version number.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.