problem building OpenSim from source

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kevin Tanghe
Posts: 36
Joined: Mon Sep 22, 2014 6:54 am

problem building OpenSim from source

Post by Kevin Tanghe » Thu Dec 04, 2014 3:35 am

Hi,

I'm using a Windows 7, 64 bit machine and want to build OpenSim from source. First I have build Simbody. I've build the ALL_BUILD, INSTALL and RUN_TESTS without failures.

Then I get a problem when I try to build OpenSim. Cmake gives me the following error:

Could NOT find Simbody (missing: Simbody_INCLUDE_DIR)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Simbody_INCLUDE_DIR (ADVANCED)
used as include directory in directory C:/OpenSim32-source
used as include directory in directory C:/OpenSim32-source
used as include directory in directory C:/OpenSim32-source
used as include directory in directory C:/OpenSim32-source
... (list goes on )

I have specified the SimTK_INSTALL_DIR to C:/Apps/SimbodyLocal. I think the problem is in Simbody_INCLUDE_DIR. It has a value Simbody_INCLUDE_DIR-NOTFOUND. When I change it to C/Apps/SimbodyLocal and press configure, it automatically changes the value back to Simbody_INCLUDE_DIR-NOTFOUND.

What should I do?

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

Re: problem building OpenSim from source

Post by Michael Sherman » Thu Dec 04, 2014 12:49 pm

Hi, Kevin.

A few thoughts:
- If you haven't already, verify that the Simbody install actually did go to C:/Apps/SimbodyLocal
- Assuming it is there, try setting the environment variable (not CMake variable) SIMBODY_HOME to C:/Apps/SimbodyLocal. This should be done before you run CMake on OpenSim so that it has a chance to affect the FindSimbody CMake script that is used to hunt down your Simbody build.

Simbody_INCLUDE_DIR is just an output of FindSimbody which is why you can't set it directly; the current behavior just indicates that FindSimbody gave up.

Please let us know whether that helps.

Regards,
Sherm

User avatar
Kevin Tanghe
Posts: 36
Joined: Mon Sep 22, 2014 6:54 am

Re: problem building OpenSim from source

Post by Kevin Tanghe » Tue Dec 09, 2014 7:04 am

I found out that the C:/Apps/SimbodyLocal folder was empty. So I retried to build Simbody from source. Is it correct that the variable SimTK_INSTALL_DIR is not in CMake by default? I need to enter this entry manually. I also get the folowing errors during configuration:
Could not find 'svnversion' executable; 'about' will be wrong. (Cygwin provides one on Windows.)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

Re: problem building OpenSim from source

Post by Michael Sherman » Tue Dec 09, 2014 10:19 am

Hi, Kevin. I'm not sure what version of Simbody you are building. Currently (GitHub master branch) the CMake variable to use for controlling installation directory is the standard CMAKE_INSTALL_PREFIX. In earlier versions it was SimTK_INSTALL_DIR. But in either case the variable is predefined and should be visible in the CMake GUI.

Regards,
Sherm

User avatar
Ayman Habib
Posts: 2234
Joined: Fri Apr 01, 2005 12:24 pm

Re: problem building OpenSim from source

Post by Ayman Habib » Tue Dec 09, 2014 11:52 am

Hi Kevin,

If the Simbody install directory is empty it could be that after you built Simbody you didn't install it. Building the INSTALL target/project in visual studio should copy the headers and libraries of Simbody into the install directory.

If you don't have Doxygen installed on your machine then CMake will not find it but that's not critical if you're not building the Doxygen documentation locally. SVN message should also be ignored since you're not building from the source repository directly. We should have that cleaned up in the next release.

Please let us know if you have resolved your build problems and if so what were the issues so that we can improve the documentation.

Best regards,
-Ayman

User avatar
Kevin Tanghe
Posts: 36
Joined: Mon Sep 22, 2014 6:54 am

Re: problem building OpenSim from source

Post by Kevin Tanghe » Wed Dec 10, 2014 1:49 am

In visual studio I have build the ALL_BUILD, INSTALL and RUN_TESTS projects. They all succeeded without failures. Yet, there are no files in the simbody install directory.

Is it correct that the variable SimTK_INSTALL_DIR is not in CMake by default? I need to enter this entry manually.

User avatar
Kevin Tanghe
Posts: 36
Joined: Mon Sep 22, 2014 6:54 am

Re: problem building OpenSim from source

Post by Kevin Tanghe » Thu Dec 11, 2014 4:34 am

Ok, I managed to install simbody correctly. I would recommend to change the instructions at http://simtk-confluence.stanford.edu:80 ... rom+Source . The installation directory for simbody can be set with the variable CMAKE_INSTALL_PREFIX and not with the SimTK_INSTALL_PREFIX. Maybe an experienced user knows this, but a beginner like me doesn't. I also made sure that the build directory wasn't a subdir of the source directory as explained at the GitHub page of simbody. In the simtk instruction page, the build directory is a subdir of the source code.

Having a working simbody build, I tried to build OpenSim. However, I get the following warning in CMake:
CMake Warning at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/InstallRequiredSystemLibraries.cmake:373 (message):
system runtime library file does not exist:
'MSVC10_REDIST_DIR-NOTFOUND/x64/Microsoft.VC100.CRT/msvcp100.dll'
Call Stack (most recent call first):
CMakeLists.txt:258 (INCLUDE)


CMake Warning at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/InstallRequiredSystemLibraries.cmake:373 (message):
system runtime library file does not exist:
'MSVC10_REDIST_DIR-NOTFOUND/x64/Microsoft.VC100.CRT/msvcr100.dll'
Call Stack (most recent call first):
CMakeLists.txt:258 (INCLUDE)

I ignored the warning, but then building the project in Microsoft Visual C++ 2010 Express fails. For example, I get the error:
fatal error LNK1104: cannot open file 'osimCommon_d.lib'

How can I solve this?

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

Re: problem building OpenSim from source

Post by Michael Sherman » Thu Dec 11, 2014 3:33 pm

I would recommend to change the instructions at http://simtk-confluence.stanford.edu:80 ... rom+Source . The installation directory for simbody can be set with the variable CMAKE_INSTALL_PREFIX and not with the SimTK_INSTALL_PREFIX.
Done. Thanks, Kevin -- and sorry for the confusion. Simbody switched to CMAKE_INSTALL_PREFIX (which is the standard approach in CMake) but we forgot to update the OpenSim instructions to match.

I don't know why the VS10 redistribution library is missing, nor why it should be required if you have VS10 installed. Hopefully Ayman Habib can comment on that.

User avatar
Ayman Habib
Posts: 2234
Joined: Fri Apr 01, 2005 12:24 pm

Re: problem building OpenSim from source

Post by Ayman Habib » Thu Dec 11, 2014 11:47 pm

Hi Kevin,

I think the combination of the old VC2010 Express and the very recent CMake (version 3 according to your error report) is not working.

I strongly suggest you use VisualStudio 2013 Express instead (if you don't have a VisualStudio Pro license), and let us know how it goes since many of our users have used this version over the last year.

What flags did you set in CMake? It looks like CMake is trying to build an installer and fails looking for the redistributable which you absolutely shouldn't care about if you're building locally, but it could also be something that was changed in CMake 3.0 and we don't see it because we normally use machines that have VisualStudio Pro installed.

Please let us know how it goes,
-Ayman

User avatar
Kevin Tanghe
Posts: 36
Joined: Mon Sep 22, 2014 6:54 am

Re: problem building OpenSim from source

Post by Kevin Tanghe » Fri Dec 12, 2014 8:23 am

Hi,

I've downloaded the Visual Studio 2013 Express, and now the error in CMake doesn't appear anymore. I can generate without problems.

Next, I've loaded the OpenSim.sln file in VS2013 and tried building the ALL_BUILD project in Debug mode. This gave a lot of failures. You can see the details in the attachment output_debug.

Then, I've tried building in RelWithDebInfo mode. Building ALL_BUILD and INSTALL didn't generate any failures. However, when building RUN_TESTS, several test failed. You can see the details in the attachment output_RelWithDebInfo.
Attachments
output_RelWithDebInfo.txt
(10.18 KiB) Downloaded 27 times
output_Debug.txt
(12.27 KiB) Downloaded 24 times

POST REPLY