rosdistro: Installation indigo on OSX failed while building 'nodelet_tutorial_math'
Hello,
I followed the official installation of ROS Indigo on OSX.
Everything worked perfectly until I started building the catkin Workspace.
And nodelet_tutorial_math failed to build but not for the same reason that is answered in the installation tutorial. This is what I get:
> cd /Users/ejalaa/Development/ros_installation/my_install/build_isolated/nodelet_tutorial_math && /Users/ejalaa/Development/ros_installation/my_install/install_isolated/env.sh make -j4 -l4
[ 50%] Building CXX object CMakeFiles/nodelet_math.dir/src/plus.cpp.o
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:23:
In file included from /usr/local/include/boost/config/no_tr1/memory.hpp:21:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:610:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:79:9: error:
no member named 'strcoll' in the global namespace
using ::strcoll;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:80:9: error:
no member named 'strxfrm' in the global namespace
using ::strxfrm;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:82:9: error:
no member named 'memchr' in the global namespace; did you mean 'wmemchr'?
using ::memchr;
~~^
/usr/include/wchar.h:150:10: note: 'wmemchr' declared here
wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
^
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:23:
In file included from /usr/local/include/boost/config/no_tr1/memory.hpp:21:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:610:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:86:9: error:
no member named 'strcspn' in the global namespace
using ::strcspn;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:88:9: error:
no member named 'strpbrk' in the global namespace
using ::strpbrk;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:90:9: error:
no member named 'strrchr' in the global namespace; did you mean 'strchr'?
using ::strrchr;
~~^
/System/Library/Frameworks/Kernel.framework/Headers/string.h:81:14: note:
'strchr' declared here
extern char *strchr(const char *s, int c);
^
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:23:
In file included from /usr/local/include/boost/config/no_tr1/memory.hpp:21:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:610:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:92:9: error:
no member named 'strspn' in the global namespace
using ::strspn;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:94:9: error:
no member named 'strstr' in the global namespace; did you mean 'strnstr'?
using ::strstr;
~~^
/System/Library/Frameworks/Kernel.framework/Headers/string.h:80:14: note:
'strnstr' declared here
extern char *strnstr(char *s, const char *find, size_t slen);
^
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:23:
In file included from /usr/local/include/boost/config/no_tr1/memory.hpp:21:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:610:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:99:98: error:
no member named 'strpbrk' in the global namespace; did you mean simply
'strpbrk'?
...char* strpbrk( char* __s1, const char* __s2) {return ::strpbrk(__s1...
^~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:99:46: note:
'strpbrk' declared here
inline _LIBCPP_INLINE_VISIBILITY char* strpbrk( char* __s1, c...
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:100:88: error:
no member named 'strrchr' in the global namespace; did you mean simply
'strrchr'?
...char* strrchr( char* __s, int __c) {return ::strrchr(__s, __c);}
^~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:100:46: note:
'strrchr' declared here
inline _LIBCPP_INLINE_VISIBILITY char* strrchr( char* __s, in...
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:101:99: error:
no member named 'memchr' in the global namespace; did you mean simply
'memchr'?
...void* memchr( void* __s, int __c, size_t __n) {return ::memchr(__s...
^~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:101:46: note:
'memchr' declared here
inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, in...
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:102:97: error:
no member named 'strstr' in the global namespace; did you mean simply
'strstr'?
...char* strstr( char* __s1, const char* __s2) {return ::strstr(__s1, ...
^~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:102:46: note:
'strstr' declared here
inline _LIBCPP_INLINE_VISIBILITY char* strstr( char* __s1, co...
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:106:9: error:
no member named 'strtok' in the global namespace
using ::strtok;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:109:9: error:
no member named 'strerror' in the global namespace
using ::strerror;
~~^
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:28:
In file included from /usr/local/include/boost/smart_ptr/detail/shared_count.hpp:29:
In file included from /usr/local/include/boost/smart_ptr/detail/sp_counted_base.hpp:45:
In file included from /usr/local/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp:18:
In file included from /usr/local/include/boost/detail/sp_typeinfo.hpp:20:
In file included from /usr/local/include/boost/core/typeinfo.hpp:119:
In file included from /usr/local/include/boost/core/demangle.hpp:14:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:438:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cwchar:186:49: error:
declaration conflicts with target of using declaration already in scope
inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wmemchr(const wchar_t* _...
^
/usr/include/wchar.h:150:10: note: target of using declaration
wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:82:9: note:
using declaration
using ::memchr;
^
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:28:
In file included from /usr/local/include/boost/smart_ptr/detail/shared_count.hpp:29:
In file included from /usr/local/include/boost/smart_ptr/detail/sp_counted_base.hpp:45:
In file included from /usr/local/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp:18:
In file included from /usr/local/include/boost/detail/sp_typeinfo.hpp:20:
In file included from /usr/local/include/boost/core/typeinfo.hpp:119:
In file included from /usr/local/include/boost/core/demangle.hpp:14:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:646:54: error:
no matching function for call to 'memchr'
{return __n == 0 ? NULL : (const char_type*) memchr(__s, to_int_...
^~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:101:46: note:
candidate function not viable: no known conversion from
'const char_type *' (aka 'const char *') to 'void *' for 1st argument;
take the address of the argument with &
inline _LIBCPP_INLINE_VISIBILITY void* memchr( void* __s, in...
^
In file included from /Users/ejalaa/Development/ros_installation/my_install/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/pluginlib/class_list_macros.h:40:
In file included from /Users/ejalaa/Development/ros_installation/my_install/install_isolated/include/class_loader/class_loader.h:34:
In file included from /usr/local/include/boost/thread/recursive_mutex.hpp:16:
In file included from /usr/local/include/boost/thread/pthread/recursive_mutex.hpp:11:
In file included from /usr/local/include/boost/thread/exceptions.hpp:22:
In file included from /usr/local/include/boost/system/system_error.hpp:14:
In file included from /usr/local/include/boost/system/error_code.hpp:19:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:140:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/locale:871:44: error:
use of undeclared identifier 'errno'
typename remove_reference<decltype(errno)>::type __save_errno = errno;
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/locale:871:53: error:
no type named 'type' in the global namespace
typename remove_reference<decltype(errno)>::type __save_errno = errno;
~~^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/locale:871:73: error:
use of undeclared identifier 'errno'
typename remove_reference<decltype(errno)>::type __save_errno = errno;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/nodelet_math.dir/src/plus.cpp.o] Error 1
make[1]: *** [CMakeFiles/nodelet_math.dir/all] Error 2
make: *** [all] Error 2
I can’t figure out what to do ? Apparently there is a similar issue on mikepurvis git
Thank you
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 24 (9 by maintainers)
The problem is due to the inclusion of the wrong
string.h(from kernel framework instead of the standard library).-DCMAKE_FIND_FRAMEWORK=LASTdid not resolve the problem on my side.I found the culprit to be the FindUUID CMake module. It is located at ${ros_ws}/src/cmake_modules/cmake/Modules/FindUUID.cmake. Changing from find_path(UUID_INCLUDE_DIRS uuid/uuid.h) to find_path(UUID_INCLUDE_DIRS ossp/uuid.h) worked for me. Be sure to install
ossp-uuidvia homebrew first.Had same problem with macOS Sierra 10.15.2 and ROS Kinetic, all suggestions didn’t work for me, so I’ve removed
${UUID_INCLUDE_DIRS}${UUID_LIBRARIES}from nodelet package.Before:
After:
Hopefully this could help someone and won’t brake something else 😛.
This can be solved by passing
-DCMAKE_FIND_FRAMEWORK=LASTas the very first CMake argument.@mikaelarguedas yesterday I tried to use Mac OS X installer. I added
-DCMAKE_FIND_FRAMEWORK=LASTto the build options and saw no error, all was good. So the solution by @jundazhu should work.If this is no longer an issue with recent updates we can close this out as we don’t need to update the documentation. Thanks for the followup @ejalaa12
@folkwang I have 10.11.6. I had an issue with Qt as well. Section 4.2 helped me.