Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

build issue on macosx #72

Open
serena-ivaldi opened this issue Jul 10, 2013 · 4 comments
Open

build issue on macosx #72

serena-ivaldi opened this issue Jul 10, 2013 · 4 comments

Comments

@serena-ivaldi
Copy link

Hello, I'm trying to install metapod on macosx. I've succeeded in installing all dependencies with homebrew, now I'm compiling and the building fails but I have no idea why. Cmake gives no errors, here's the output of the make (the part giving errors):

ternal::backward_traversal_prev_internal<Visitor, Robot,...
^
/Users/sere/software/src/metapod/tests/use_model/test_backward_traversal_prev.cc:67:3: note:
in instantiation of function template specialization
'metapod::backward_traversal_prev<PrintBwdTraversalVisitor,
metapod::simple_humanoid, 10, -1>::runstd::basic_ofstream<char, int>'
requested here
backward_traversal_prev<PrintBwdTraversalVisitor, CURRENT_MODEL_ROBOT,
^
24 warnings generated.
Linking CXX executable test_backward_traversal_prev_simple_humanoid
cd /Users/sere/software/src/metapod/build/tests/use_simple_humanoid && /usr/local/Cellar/cmake/2.8.11.1/bin/cmake -E cmake_link_script CMakeFiles/test_backward_traversal_prev_simple_humanoid.dir/link.txt --verbose=1
/usr/bin/c++ -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/test_backward_traversal_prev_simple_humanoid.dir/test_backward_traversal_prev.cc.o -o test_backward_traversal_prev_simple_humanoid /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_unit_test_framework-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libboost_timer-mt.dylib /usr/local/lib/libboost_chrono-mt.dylib /usr/local/lib/libboost_system-mt.dylib ../../libmetapod_simple_humanoid.dylib /usr/local/lib/libboost_unit_test_framework-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libboost_timer-mt.dylib /usr/local/lib/libboost_chrono-mt.dylib
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tests/use_simple_humanoid/test_backward_traversal_prev_simple_humanoid] Error 1
make[1]: *** [tests/use_simple_humanoid/CMakeFiles/test_backward_traversal_prev_simple_humanoid.dir/all] Error 2
make: *** [all] Error 2

@sbarthelemy
Copy link

Hello Serena

you build system is trying to link this following executable (a test_

Linking CXX executable test_backward_traversal_prev_simple_humanoid
...
Undefined symbols for architecture x86_64:
"_main", referenced from:

but fails because the object file has no "main" function.
If you look at the source file you'll see that the main function is indeed not defined. This is because we expect the boost test framework to provide it.

Maybe playing with boost options in the CMakeLists.txt might help. You could also simply skip the tests.

Hope it helps

@olivier-stasse
Copy link
Member

To be honest we never tried here on clang.
I ll try tomorrow on ubuntu 12.04 lts with clang.
Thx for the feedback.

Le jeudi 11 juillet 2013, Sébastien BARTHÉLÉMY a écrit :

Hello Serena

you build system is trying to link this following executable (a test_

Linking CXX executable test_backward_traversal_prev_simple_humanoid
...
Undefined symbols for architecture x86_64:
"_main", referenced from:

but fails because the object file has no "main" function.
If you look at the source file you'll see that the main function is indeed
not defined. This is because we expect the boost test framework to provide
it.

Maybe playing with boost options in the CMakeLists.txt might help. You
could also simply skip the tests.

Hope it helps


Reply to this email directly or view it on GitHubhttps://github.com//issues/72#issuecomment-20841319
.

Olivier Stasse,

Ph.D., Researcher,
Gepetto, LAAS-CNRS,
7 Avenue du Colonel Roche,
31077 - Toulouse Cedex 4, France
Tel: +33-561-336-454 Fax: +33-561-336-455
http://www.laas.fr/~ostasse

@olivier-stasse
Copy link
Member

Hi Serena,
Thanks for your feedback,
I tried with clang on Ubuntu 10.04 finally, and it looks like there is
some work to do to make it working.
Maybe I should try with a more recent distribution.
Unfortunately I am bit of a shortage time right now for the rest of the
month.
August will be more favorable for me on this.

Best, Olivier.

On 07/10/2013 10:33 PM, Serena Ivaldi wrote:

Hello, I'm trying to install metapod on macosx. I've succeeded in
installing all dependencies with homebrew, now I'm compiling and the
building fails but I have no idea why. Cmake gives no errors, here's
the output of the make (the part giving errors):

ternal::backward_traversal_prev_internal ^
/Users/sere/software/src/metapod/tests/use_model/test_backward_traversal_prev.cc:67:3:
note:
in instantiation of function template specialization
'metapod::backward_traversal_prev metapod::simple_humanoid, 10,
-1>::runstd::basic_ofstream<char, int>'
requested here
backward_traversal_prev<PrintBwdTraversalVisitor, CURRENT_MODEL_ROBOT,
^
24 warnings generated.
Linking CXX executable test_backward_traversal_prev_simple_humanoid
cd /Users/sere/software/src/metapod/build/tests/use_simple_humanoid &&
/usr/local/Cellar/cmake/2.8.11.1/bin/cmake -E cmake_link_script
CMakeFiles/test_backward_traversal_prev_simple_humanoid.dir/link.txt
--verbose=1
/usr/bin/c++ -pedantic -Wno-long-long -Wall -Wextra -Wcast-align
-Wcast-qual -Wformat -Wwrite-strings -Wconversion
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
CMakeFiles/test_backward_traversal_prev_simple_humanoid.dir/test_backward_traversal_prev.cc.o
-o test_backward_traversal_prev_simple_humanoid
/usr/local/lib/libboost_filesystem-mt.dylib
/usr/local/lib/libboost_system-mt.dylib
/usr/local/lib/libboost_unit_test_framework-mt.dylib
/usr/local/lib/libboost_program_options-mt.dylib
/usr/local/lib/libboost_regex-mt.dylib
/usr/local/lib/libboost_timer-mt.dylib
/usr/local/lib/libboost_chrono-mt.dylib
/usr/local/lib/libboost_system-mt.dylib
../../libmetapod_simple_humanoid.dylib
/usr/local/lib/libboost_unit_test_framework-mt.dylib
/usr/local/lib/libboost_program_options-mt.dylib
/usr/local/lib/libboost_regex-mt.dylib
/usr/local/lib/libboost_timer-mt.dylib
/usr/local/lib/libboost_chrono-mt.dylib
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: ***
[tests/use_simple_humanoid/test_backward_traversal_prev_simple_humanoid]
Error 1
make[1]: ***
[tests/use_simple_humanoid/CMakeFiles/test_backward_traversal_prev_simple_humanoid.dir/all]
Error 2
make: *** [all] Error 2


Reply to this email directly or view it on GitHub
#72.

@serena-ivaldi
Copy link
Author

Hi Olivier
thanks! I'll work on Ubuntu in the meantime :)
Thank you!
Serena

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants