Page 1 of 1

Simbody build Errors MacOSX 10.7

Posted: Thu Jul 04, 2013 11:42 pm
by capogros
Good day to all,

I'm having a problem installing the Simbody 3.0 version from source for MAC.
Even following the guide after I've set the release and debug folders, and generated the code with ccmake,
when I try to run the make command, the following error appears:

Code: Select all

[  1%] Built target PlatformFiles
[  6%] Built target SimTKcommon_static_d
Linking CXX shared library ../../libSimTKcommon_d.dylib
ld: library not found for -lpthreadVC2
collect2: ld returned 1 exit status
make[2]: *** [libSimTKcommon_d.dylib] Error 1
make[1]: *** [SimTKcommon/sharedTarget/CMakeFiles/SimTKcommon_d.dir/all] Error 2
make: *** [all] Error 2

Now I don't know what is this pthreadVC2 library. What should I do?
Thanks for your help

Marco

Re: Simbody build Errors MacOSX 10.7

Posted: Fri Jul 05, 2013 12:19 am
by sherm
Hi, Marco. I think this was a problem in the CMake script that we fixed in Simbody 3.1. Please use that branch instead of Simbody 3.0 and post again if you are still having problems.

Regards,
Sherm

Re: Simbody build Errors MacOSX 10.7

Posted: Fri Jul 05, 2013 3:08 am
by capogros
Thank you very much, that solved the issue.
However now I'm trying to install OpenSim from source code, which requires Simbody, and in particular in the CMake configuration od Simbody it requires the use of SimTKlapack. Now when I generate the Simbody code and type make The following error appears.

Code: Select all

ld: library not found for -lSimTKlapack
collect2: ld returned 1 exit status
make[2]: *** [libSimTKcommon_d.dylib] Error 1
make[1]: *** [SimTKcommon/sharedTarget/CMakeFiles/SimTKcommon_d.dir/all] Error 2
make: *** [all] Error 2

So if I'm using the standard lapack everything is fine, but then OpenSim doesn't compile, if i try to use the SimTKlapack Simbody doesn't compile,
Where can I find this library?
Thanks again

Marco

Re: Simbody build Errors MacOSX 10.7

Posted: Fri Jul 05, 2013 9:16 am
by sherm
Hi, Marco.

The SimTKlapack library is only supplied for Windows. On Mac, lapack is already available and the Simbody build used the native libraries.

In the OpenSim build, you should be able to change which lapack it uses via the CMake variable called BUILD_USING_OTHER_LAPACK. Please try changing that in your OpenSim build to "lapack;blas" (no quotes). Then when you configure, the variable LAPACK_BEING_USED will change.

If that doesn't work you may have to use the almost-released OpenSim 3.1 branch instead, which I believe builds smoothly on Macs.

Regards,
Sherm

Re: Simbody build Errors MacOSX 10.7

Posted: Mon Jul 08, 2013 2:44 am
by capogros
Dear Sherm
Thanks for the infos, I used the SimTKlapack because on the compiling guide of OpenSim it is reported the following statement:
If you are building Simbody on OS X 10.7 (Lion) you will need to use the SDK 10.6 instead of 10.5, and SimTKlapack must be used rather than the Mac native lapack. This is done by changing your cmake configuration as follows:
Set CMAKE_OSX_DEPLOYMENT_TARGET to "10.6", and CMAKE_OSX_SYSROOT to /Developer/SDKs/MacOSX10.6.sdk"
Set BUILD_USING_OTHER_LAPACK to "SimTKlapack", and add the Simbody build directory to my DYLD_LIBRARY_PATH
I've changed to lapack and blas but It seems that the software has still errors in i386 architecture,
something like:

Code: Select all

inking CXX shared library ../../libosimCommon.dylib
ld: warning: ignoring file /usr/local/SimTK/lib/libSimTKcommon.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/SimTK/lib/libSimTKmath.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386
Is there a beta version of the code already available for the 3.1?
Simbody instead compiled perfectly.
Thanks again

Marco

Re: Simbody build Errors MacOSX 10.7

Posted: Mon Jul 08, 2013 8:09 am
by sherm
Hi, Marco. Yes, there is a 3.1 beta posted on the OpenSim downloads page. I suspect that is the easiest option since that is routinely built on OSX (the API at least -- I'm not sure about the OpenSim GUI).

You should be able to build OpenSim 3.1 using Simbody 3.1 with default settings; you shouldn't have to set the architecture or lapack. If you have trouble, please post to the OpenSim forum where there is more OpenSim build expertise. This would also be timely in case there is some problem since 3.1 is just being released.

Regards,
Sherm