Ask Your Question
0

Building ros on OSX 10.9, orocos_kdl

asked 2013-10-24 03:32:37 -0500

Hansg91 gravatar image

Hi all,

I am trying to build ros (hydro) on OSX 10.9. I had it working on 10.8, but since the update to 10.9 I can't get it to compile. orocos_kdl is giving me the following error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/utility:221:9: error: field has incomplete type 'KDL::TreeElement'

It says that a number of times and also :

/opt/ros/hydro/src/orocos_kdl/src/tree.cpp:39:21: error: no viable conversion from 'pair<basic_string<[3 * ...]>, [...]>' to 'const pair<basic_string<[3 * ...]>, [...]>'

Any solution to this?

edit retag flag offensive close merge delete

Comments

I have lots of problems rebuilding hydro too. One hint, try to run brew install for all necessary libraries and programs. I basically had to almost rebuild everything. The problem now is how to build vtk and pcl.

Artem gravatar image Artem  ( 2013-10-24 04:52:44 -0500 )edit

Did you run brew upgrade ? Or did you remove stuff from brew and reinstalled them?

Hansg91 gravatar image Hansg91  ( 2013-10-24 07:00:56 -0500 )edit

I think you need to relink everything, I haven't updated yet, but I have heard that `libc++` is now the default rather than `libstdc++`, which is likely to cause problems (I have not confirmed that). If you run into specific compile errors like with KDL, I would suggest filing tickets directly against them.

William gravatar image William  ( 2013-10-24 07:53:09 -0500 )edit

That's re-linkedit, not `brew link`.

William gravatar image William  ( 2013-10-24 07:53:29 -0500 )edit

What do you mean relink everything? I mean I understand, but how do I do that?

Hansg91 gravatar image Hansg91  ( 2013-10-24 08:02:43 -0500 )edit

I think the easiest way is to uninstall and reinstall.

William gravatar image William  ( 2013-10-24 08:27:43 -0500 )edit

I was afraid you'd say that :(, I will give it a shot

Hansg91 gravatar image Hansg91  ( 2013-10-24 09:06:32 -0500 )edit

William is right about libstdc++, that was the issue. I did brew uninstall and then brew install for most of the packages. William have you updated hombrew pcl? As far as I remember your formula was pulling binaries? Now it has to be compiled :(

Artem gravatar image Artem  ( 2013-10-24 17:13:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-10-24 22:32:46 -0500

Artem gravatar image

updated 2013-10-27 00:26:12 -0500

I had several issues compiling pcl with vtk 6. I have not succeeded yet, but here is what I changed to solve some of the issues:

To resolve the compilation issues follows this [migration guide].(http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide)

To resolve the linking errors add all vtk libraries to CMakeLists.txt in section set(VTK_IO_TARGET_LINK_LIBRARIES ... )

If I'm building released 6.0 using brew install vtk, I am getting this (see solution below)

... 
duplicate symbol ___sincospif in:
    CMakeFiles/vtktiff.dir/tif_aux.c.o
    CMakeFiles/vtktiff.dir/tif_color.c.o
duplicate symbol ___sincospi in:
    CMakeFiles/vtktiff.dir/tif_aux.c.o
    CMakeFiles/vtktiff.dir/tif_color.c.o
duplicate symbol ___sputc in:
    CMakeFiles/vtktiff.dir/tif_aux.c.o
    CMakeFiles/vtktiff.dir/tif_extension.c.o
duplicate symbol ___sputc in:
    CMakeFiles/vtktiff.dir/tif_aux.c.o
    CMakeFiles/vtktiff.dir/tif_unix.c.o
ld: 91 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libvtktiff-6.0.1.dylib] Error 1
make[1]: *** [ThirdParty/tiff/vtktiff/CMakeFiles/vtktiff.dir/all] Error 2

If you know how to resolve this please let me know.

*EDITED The best solution to build VTK and PCL is to go back to VTK ver 5.10. Simply do

1) cd /usr/local/Library/Taps/homebrew-science/
2) brew versions vtk
3) git checkout 27a4327 vtk.rb
4) brew uninstall vtk && brew install vtk
edit flag offensive delete link more

Comments

You can fix this by installing libtiff (brew install libtiff) and then setting the -DVTK_USE_SYSTEM_TIFF=ON option for vtk.

Hansg91 gravatar image Hansg91  ( 2013-10-24 22:51:10 -0500 )edit

Thanks it worked. Now back to building PCL. I am going to create a new question.

Artem gravatar image Artem  ( 2013-10-25 01:05:34 -0500 )edit

I have both VTK5 and PCL installed already, but I'm still blocked in this orocos_kdl error

Bruno Normande gravatar image Bruno Normande  ( 2013-11-18 09:52:50 -0500 )edit

What orocos error exactly? Regarding some TreeElement type?

Hansg91 gravatar image Hansg91  ( 2013-11-18 19:03:37 -0500 )edit

Yes, the exactly same error that was reported.

Bruno Normande gravatar image Bruno Normande  ( 2013-11-18 23:06:30 -0500 )edit

Not sure if a proper fix is available by now, but what you need to do for libc++ is to make TreeElement a pointer and change some things to work with pointers instead. To save you the trouble, you can use my modified version: https://dl.dropboxusercontent.com/u/40610835/orocos_kdl.zip

Hansg91 gravatar image Hansg91  ( 2013-11-19 00:20:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-10-24 03:32:37 -0500

Seen: 1,036 times

Last updated: Oct 27 '13