error building molmodel against simbody
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
error building molmodel against simbody
Guys (Sherm?),
I'm having trouble building molmodel on a macbook pro running OSX 10.9.5 . This is not the laptop I had in Sherm's office. The errors go like:
samuel-floress-macbook-pro-2:build Sam$ make -j8
Linking CXX shared library ../libSimTKmolmodel.dylib
Undefined symbols for architecture x86_64:
"SimTK::State::updU()", referenced from:
SimTK::VelocityRescalingThermostat::VelocityRescalingThermostatImpl::rescale(SimTK::State&) in VelocityRescalingThermostat.cpp.o
"SimTK::State::getNUDotErr() const", referenced from:
SimTK::VelocityRescalingThermostat::calcCurrentTemperature(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
SimTK::VelocityRescalingThermostat::calcNumThermalDofs(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
...
"SimTK::Subsystem::getSystem() const", referenced from:
SimTK::VanderWallSphereImpl::calcForce(SimTK::State const&, SimTK::Vector_<SimTK::Vec<2, SimTK::Vec<3, double, 1>, 1> >&, SimTK::Vector_<SimTK::Vec<3, double, 1> >&, SimTK::Vector_<double>&) const in VanderWallSphere.cpp.o
SimTK::VanderWallSphereImpl::calcPotentialEnergy(SimTK::State const&) const in VanderWallSphere.cpp.o
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]: *** [libSimTKmolmodel.dylib] Error 1
make[1]: *** [sharedTarget/CMakeFiles/SimTKmolmodel.dir/all] Error 2
make: *** [all] Error 2
samuel-floress-macbook-pro-2:build Sam$
I seem to recall that we fixed an error like this by setting BUILD_PLATFORM the same on simbody and molmodel. However both simbody and molmodel insist on overriding my settings for this. simbody wants Darwin:x64, and molmodel wants Mac:x64. Any ideas on how to fix this? I am not confident that this is the root cause. Other seemingly relevant cmake variables are set identically for both molmodel and simbody:
CMAKE_OSX_ARCHITECTURES x86_64
CMAKE_OSX_DEPLOYMENT_TARGET 10.9
CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
Many thanks
I'm having trouble building molmodel on a macbook pro running OSX 10.9.5 . This is not the laptop I had in Sherm's office. The errors go like:
samuel-floress-macbook-pro-2:build Sam$ make -j8
Linking CXX shared library ../libSimTKmolmodel.dylib
Undefined symbols for architecture x86_64:
"SimTK::State::updU()", referenced from:
SimTK::VelocityRescalingThermostat::VelocityRescalingThermostatImpl::rescale(SimTK::State&) in VelocityRescalingThermostat.cpp.o
"SimTK::State::getNUDotErr() const", referenced from:
SimTK::VelocityRescalingThermostat::calcCurrentTemperature(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
SimTK::VelocityRescalingThermostat::calcNumThermalDofs(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
...
"SimTK::Subsystem::getSystem() const", referenced from:
SimTK::VanderWallSphereImpl::calcForce(SimTK::State const&, SimTK::Vector_<SimTK::Vec<2, SimTK::Vec<3, double, 1>, 1> >&, SimTK::Vector_<SimTK::Vec<3, double, 1> >&, SimTK::Vector_<double>&) const in VanderWallSphere.cpp.o
SimTK::VanderWallSphereImpl::calcPotentialEnergy(SimTK::State const&) const in VanderWallSphere.cpp.o
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]: *** [libSimTKmolmodel.dylib] Error 1
make[1]: *** [sharedTarget/CMakeFiles/SimTKmolmodel.dir/all] Error 2
make: *** [all] Error 2
samuel-floress-macbook-pro-2:build Sam$
I seem to recall that we fixed an error like this by setting BUILD_PLATFORM the same on simbody and molmodel. However both simbody and molmodel insist on overriding my settings for this. simbody wants Darwin:x64, and molmodel wants Mac:x64. Any ideas on how to fix this? I am not confident that this is the root cause. Other seemingly relevant cmake variables are set identically for both molmodel and simbody:
CMAKE_OSX_ARCHITECTURES x86_64
CMAKE_OSX_DEPLOYMENT_TARGET 10.9
CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
Many thanks
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
Re: error building molmodel against simbody
Hi, Sam. I think you have to fix this by modifying the Molmodel CMakeLists.txt file to match the Simbody one with respect to the architecture names used -- you can't do it from within CMake. It would be good to check that fix into the Molmodel source also.
Regards,
Sherm
Regards,
Sherm
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: error building molmodel against simbody
Hi Sherm,
I was able to fix this (also removed the FORCE keyword). However this does not seem to have been the problem (error messages unchanged, see below.) I verified that SimTK_INSTALL_DIR is correct:
SimTK_INSTALL_DIR /usr/local/SimTK (also tried /usr/local/SimTK/lib)
SimTK_INSTALL_PREFIX /usr/local/SimTK
.. and that /usr/local/SimTK/lib contains updated dyld's. In fact I had cleaned out this directory previously so it now contains nothing but spanking fresh simbody binaries.
Any ideas? I guess I could just grab everything in the molmodel directory in my other laptop and dump it in this one, but it would be nice to know what's actually happening. That's not necessarily something that should concern you though.
samuel-floress-macbook-pro-2:build Sam$ make -j8
Linking CXX shared library ../libSimTKmolmodel.dylib
Undefined symbols for architecture x86_64:
"SimTK::State::updU()", referenced from:
SimTK::VelocityRescalingThermostat::VelocityRescalingThermostatImpl::rescale(SimTK::State&) in VelocityRescalingThermostat.cpp.o
"SimTK::State::getNUDotErr() const", referenced from:
SimTK::VelocityRescalingThermostat::calcCurrentTemperature(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
SimTK::VelocityRescalingThermostat::calcNumThermalDofs(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
...
"SimTK::Subsystem::getSystem() const", referenced from:
SimTK::VanderWallSphereImpl::calcForce(SimTK::State const&, SimTK::Vector_<SimTK::Vec<2, SimTK::Vec<3, double, 1>, 1> >&, SimTK::Vector_<SimTK::Vec<3, double, 1> >&, SimTK::Vector_<double>&) const in VanderWallSphere.cpp.o
SimTK::VanderWallSphereImpl::calcPotentialEnergy(SimTK::State const&) const in VanderWallSphere.cpp.o
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]: *** [libSimTKmolmodel.dylib] Error 1
make[1]: *** [sharedTarget/CMakeFiles/SimTKmolmodel.dir/all] Error 2
make: *** [all] Error 2
Thanks
I was able to fix this (also removed the FORCE keyword). However this does not seem to have been the problem (error messages unchanged, see below.) I verified that SimTK_INSTALL_DIR is correct:
SimTK_INSTALL_DIR /usr/local/SimTK (also tried /usr/local/SimTK/lib)
SimTK_INSTALL_PREFIX /usr/local/SimTK
.. and that /usr/local/SimTK/lib contains updated dyld's. In fact I had cleaned out this directory previously so it now contains nothing but spanking fresh simbody binaries.
Any ideas? I guess I could just grab everything in the molmodel directory in my other laptop and dump it in this one, but it would be nice to know what's actually happening. That's not necessarily something that should concern you though.
samuel-floress-macbook-pro-2:build Sam$ make -j8
Linking CXX shared library ../libSimTKmolmodel.dylib
Undefined symbols for architecture x86_64:
"SimTK::State::updU()", referenced from:
SimTK::VelocityRescalingThermostat::VelocityRescalingThermostatImpl::rescale(SimTK::State&) in VelocityRescalingThermostat.cpp.o
"SimTK::State::getNUDotErr() const", referenced from:
SimTK::VelocityRescalingThermostat::calcCurrentTemperature(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
SimTK::VelocityRescalingThermostat::calcNumThermalDofs(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
...
"SimTK::Subsystem::getSystem() const", referenced from:
SimTK::VanderWallSphereImpl::calcForce(SimTK::State const&, SimTK::Vector_<SimTK::Vec<2, SimTK::Vec<3, double, 1>, 1> >&, SimTK::Vector_<SimTK::Vec<3, double, 1> >&, SimTK::Vector_<double>&) const in VanderWallSphere.cpp.o
SimTK::VanderWallSphereImpl::calcPotentialEnergy(SimTK::State const&) const in VanderWallSphere.cpp.o
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]: *** [libSimTKmolmodel.dylib] Error 1
make[1]: *** [sharedTarget/CMakeFiles/SimTKmolmodel.dir/all] Error 2
make: *** [all] Error 2
Thanks
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
Re: error building molmodel against simbody
Hi, Sam. I made a bunch of small changes to Molmodel to make it compatible with Simbody 3.5 and later. They are checked in to Molmodel's Subversion trunk. I built and tested on Windows 8.1 (64 bit), Ubuntu 14.04, and OSX 10.9.4. I have not tested with older versions of Simbody; you should probably only use it with 3.5 and later. I did try installing to /usr/local/SimTK and that worked, although the default for Simbody is now /usr/local on Linux and OSX.
I have not attempted to build MMB or to use OpenMM.
I fixed a bunch of compiler warnings that showed up when building Molmodel. There are still some left and some look significant to me. I suggest you investigate all the remaining warnings to see whether they are actually bugs and fix them if so. There were also 6 test failures when I tried "make test" in Molmodel -- 5 were giving the same message when I ran them individually. Not sure whether that's what you expect.
To try this, build and install a Simbody 3.5 release (from GitHub). Update your Molmodel source from Subversion (don't wipe out your local changes if any!). Build and run tests, install. Then tackle MMB.
Regards,
Sherm
I have not attempted to build MMB or to use OpenMM.
I fixed a bunch of compiler warnings that showed up when building Molmodel. There are still some left and some look significant to me. I suggest you investigate all the remaining warnings to see whether they are actually bugs and fix them if so. There were also 6 test failures when I tried "make test" in Molmodel -- 5 were giving the same message when I ran them individually. Not sure whether that's what you expect.
To try this, build and install a Simbody 3.5 release (from GitHub). Update your Molmodel source from Subversion (don't wipe out your local changes if any!). Build and run tests, install. Then tackle MMB.
Regards,
Sherm
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
Re: error building molmodel against simbody
P.S. I also tried it on OSX 10.9.5 and that worked too.
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: error building molmodel against simbody
Hi Sherm,
Thanks for your work. I am using the simbody I downloaded from trunk when I saw you a couple of weeks ago (looks like 3.6). Hopefully that's ok? I updated molmodel as instructed but the error is still the same. But this may be a peculiarity of my home laptop, since it doesn't happen at work, or maybe something old hanging around in the file system. Maybe I should just clone my /usr/local/SimTK and svn/molmodel from my other laptop..? Error message appended below.
Sam
Linking CXX shared library ../libSimTKmolmodel.dylib
Undefined symbols for architecture x86_64:
"SimTK::State::updU()", referenced from:
SimTK::VelocityRescalingThermostat::VelocityRescalingThermostatImpl::rescale(SimTK::State&) in VelocityRescalingThermostat.cpp.o
"SimTK::State::getNUDotErr() const", referenced from:
SimTK::VelocityRescalingThermostat::calcCurrentTemperature(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
SimTK::VelocityRescalingThermostat::calcNumThermalDofs(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
Thanks for your work. I am using the simbody I downloaded from trunk when I saw you a couple of weeks ago (looks like 3.6). Hopefully that's ok? I updated molmodel as instructed but the error is still the same. But this may be a peculiarity of my home laptop, since it doesn't happen at work, or maybe something old hanging around in the file system. Maybe I should just clone my /usr/local/SimTK and svn/molmodel from my other laptop..? Error message appended below.
Sam
Linking CXX shared library ../libSimTKmolmodel.dylib
Undefined symbols for architecture x86_64:
"SimTK::State::updU()", referenced from:
SimTK::VelocityRescalingThermostat::VelocityRescalingThermostatImpl::rescale(SimTK::State&) in VelocityRescalingThermostat.cpp.o
"SimTK::State::getNUDotErr() const", referenced from:
SimTK::VelocityRescalingThermostat::calcCurrentTemperature(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
SimTK::VelocityRescalingThermostat::calcNumThermalDofs(SimTK::State const&) const in VelocityRescalingThermostat.cpp.o
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
Re: error building molmodel against simbody
Most likely you have some old stuff lying around on that laptop which is what you are linking with rather than the new stuff you built. I suggest you clean out /usr/local/SimTK completely, nuke everything in your build directories, make sure you don't have DYLD_LIBRARY_PATH set to something wrong, etc. Then rerun CMake from scratch, rebuild, and reinstall.
The tests I ran used a very old and feeble MacBook Pro with upgraded OS (10.9.5). So I think it should all work on your old machine too.
Regards,
Sherm
The tests I ran used a very old and feeble MacBook Pro with upgraded OS (10.9.5). So I think it should all work on your old machine too.
Regards,
Sherm
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: error building molmodel against simbody
right, I suspect leftover crap is the issue.
* the rest of this message is cancelled, saw the issue now.
* the rest of this message is cancelled, saw the issue now.
Last edited by Samuel Flores on Wed Jan 21, 2015 1:29 am, edited 1 time in total.
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: error building molmodel against simbody
* the rest of this message is cancelled, saw the issue now.
- Michael Sherman
- Posts: 806
- Joined: Fri Apr 01, 2005 6:05 pm
Re: error building molmodel against simbody
Sam, the odd thing about that Body::Rigid(int) problem is that I also saw that and checked in the same fix yesterday. Are you sure you got the latest source from molmodel trunk?