Can ROS be compiled for libc++ with clang and c++98?
My question, is there any build or way of compiling ROS from source so that its compiled with libc++ instead of libstdc++? I've reached to compile quite a lot of it with clang,libc++ and c++98 but, there is an error that I don't quite know how to bypass:
/home/ubuntu/ros_catkin_ws/src/ros_comm/rosconsole/src/rosconsole/rosconsole.cpp:428:3: error: use of undeclared identifier 'va_copy'
Bare in mind that I'm only interested in the ROS Barebones of Indigo in this case.
Any idea of how I can bypass this ? Maybe a code susbtitute?
Edit: Thanks for the fast response.
The problem is that I need to import ROS libraries in a system that has been compiled differently. This is an example: In this system when looking for the function ros::NodeHandle it asks for this symbol in the .so:
_ZN3ros10NodeHandleC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_3mapIS7_S7_NS1_4lessIS7_EENS5_INS1_4pairIS8_S7_EEEEEE
But in the ros .so libraries compiled by default, that same function was compiled differently:
_ZN3ros10NodeHandleC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIS7_S6_EEE
THats why it doesnt find it. So maybe I'm trying to compile with a version too old that I really dont need? The only thing I know of the system is that was compiled with libc++ instead of libstdc++. As fas as my limited comprehension goes, we need to compile with clang to be able to use libc++? Or at least for ROS compilation to recognise cxxflags. These are the procedure that I use to compile ROS barebones. am I doing something wrong or could it be changed to make it work?
cd /home/ubuntu/ros_catkin_ws export CC=/usr/bin/clang-3.9 export CXX=/usr/bin/clang++-3.9 export CXXFLGAS="$CXXFLAGS -stdlib=libc++ -std=c++98" ./src/catkin/bin/catkin_make_isolated --install
Any ideas? Am I missing something or overcomplicating stuff? Thanks in advance
Don't use answers unless you are answering your own question. Use comments or edit your original question.
Thanks, I'll bare in mind next time