Running Simbody on Apple Silicon

Simbody is useful for internal coordinate and coarse grained molecule modeling, large scale mechanical models like skeletons, and anything else that can be modeled as bodies interconnected by joints, acted upon by forces, and restricted by constraints.
POST REPLY
User avatar
Lazar Jovanovic
Posts: 2
Joined: Mon Oct 03, 2022 8:41 pm

Running Simbody on Apple Silicon

Post by Lazar Jovanovic » Mon Feb 06, 2023 9:56 pm

Hey,

Did anyone recently try to install and use Simbody on Macs with the new Apple Silicon (M1/M2) CPUs? I was able to install simbody using homebrew, but I was unable to compile the double pendulum example. Whenever I try to compile a .cpp file that contains any of the objects from the simbody package, I am getting the following message in the terminal:

Code: Select all

Undefined symbols for architecture arm64:
  "SimTK::MultibodySystem::MultibodySystem()", referenced from:
      _main in double-pendulum-example-ede80c.o
  "SimTK::System::~System()", referenced from:
      SimTK::MultibodySystem::~MultibodySystem() in double-pendulum-example-ede80c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any feedback is welcome.

Thank you.

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

Re: Running Simbody on Apple Silicon

Post by Michael Sherman » Tue Feb 21, 2023 5:05 pm

Possible workaround: grab the latest Simbody source from GitHub and build it locally.

User avatar
Lazar Jovanovic
Posts: 2
Joined: Mon Oct 03, 2022 8:41 pm

Re: Running Simbody on Apple Silicon

Post by Lazar Jovanovic » Fri Feb 24, 2023 11:37 am

Hi Michael,

Thank you for getting back to me.

I had no problems installing it the first time using homebrew. Nonetheless, I removed that installation and tried building it from source as you suggested.

I successfully built it from source and added appropriate folders to CPLUS paths. I can confirm this as my IDE (VS Code) does not raise import errors and it links to Simbody classes. However, I am still getting the same error as the one I mentioned in my first message.

Is it possible that the current version of Simbody C++ code does not run on arm64 architecture (present in Macs with Apple Silicon) out of the box?

Thanks,
Lazar

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

Re: Running Simbody on Apple Silicon

Post by Michael Sherman » Fri Feb 24, 2023 11:53 am

Definitely possible since we don't currently build Simbody on arm64 Macs in CI. If you have access to one and are able to find the problem we would welcome a pull request so others can benefit!

POST REPLY