dart icon indicating copy to clipboard operation
dart copied to clipboard

Unable to build DART tutorial out of source tree on MacOS

Open jyf588 opened this issue 8 years ago • 11 comments

Hello everyone,

I was trying to build a tutorial out of DART source tree following instructions in dart/tutorials/README.md. But I got this error message from Cmake log: Could NOT find Dart (missing: DART_ROOT).

I am using OSX, and I'm not sure whether this is related to collision with another "Dart testing software": https://github.com/Kitware/CMake/blob/master/Modules/FindDart.cmake

How should I resolve this?

Thanks, Yifeng

jyf588 avatar May 20 '17 03:05 jyf588

Did you install DART before building the tutorial?

jslee02 avatar May 20 '17 09:05 jslee02

Yes, I think so... I tried both installing from homebrew and installing from source.

jyf588 avatar May 20 '17 10:05 jyf588

I could reproduce the build error. Unfortunately, I don't have macOS for now. Let me take a look at this coming Monday.

jslee02 avatar May 20 '17 17:05 jslee02

I believe this should be addressed by #889.

jslee02 avatar May 21 '17 18:05 jslee02

My Cmake can find DART now, but I am getting another error during make:

In file included from /usr/local/include/dart/config.hpp:5: /usr/local/include/eigen3/Eigen/Core:273:10: fatal error: 'type_traits' file not found #include <type_traits>

Any help with this? Cmake outputs "Found DART: /usr/local/include (Required is at least version "6.2.0") found components: utils-urdf gui dart"; is the components complete?

jyf588 avatar May 23 '17 02:05 jyf588

That's odd. type_traits is a standard library header. Can you provide more detail on how could I reproduce it (such as how you installed DART, which version or branch or tag, which tutorial, etc)?

jslee02 avatar May 23 '17 02:05 jslee02

I installed DART using "sudo make install" from latest DART source (Master branch). (I might previously also installed earlier versions of DART through homebrew; I don't see these two conflict though.)

I was making the BipedFinished tutorial; but the error from config.hpp actually referred from dart.hpp, from my make error log.

Thanks.

jyf588 avatar May 23 '17 03:05 jyf588

Add "add_compile_options(-stdlib=libc++)" in Cmake will clear the type_traits error but give me other errors like "libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9"...

Is this the right way to force compiler to use libc++?

jyf588 avatar May 23 '17 03:05 jyf588

I followed what you did but couldn't reproduce the errors. Could you make sure if the earlier versions of DART don't conflict? Also, are you using the CMakeLists.txt in the tutorials directory?

jslee02 avatar May 23 '17 21:05 jslee02

I think I solved the issue: indeed I have to use libc++ instead of libstdc++, as I mentioned above.

Adding SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++11") solved the problem.

Do you know why this only happens on my machine? Thanks.

jyf588 avatar May 25 '17 01:05 jyf588

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 13 '18 17:02 stale[bot]