Page 1 of 1

Running Simbody on Apple Silicon

Posted: Mon Feb 06, 2023 9:56 pm
by lazarjov
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.

Re: Running Simbody on Apple Silicon

Posted: Tue Feb 21, 2023 5:05 pm
by sherm
Possible workaround: grab the latest Simbody source from GitHub and build it locally.

Re: Running Simbody on Apple Silicon

Posted: Fri Feb 24, 2023 11:37 am
by lazarjov
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

Re: Running Simbody on Apple Silicon

Posted: Fri Feb 24, 2023 11:53 am
by sherm
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!