Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake compiler error in example_kinetics.py #136

Open
mattpetrucci opened this issue Dec 9, 2024 · 13 comments
Open

Cmake compiler error in example_kinetics.py #136

mattpetrucci opened this issue Dec 9, 2024 · 13 comments
Assignees

Comments

@mattpetrucci
Copy link
Collaborator

mattpetrucci commented Dec 9, 2024

Users are running into a cmake compiler error on Mac OS Sonoma as well as within a Linux.

https://simtk.org/plugins/phpBB/viewtopicPhpbb.php?f=2385&t=19158&p=0&start=0&view=&sid=439a26f62161a6257d5ce058d21127d2

@aymanhab
Copy link
Contributor

@mattpetrucci what's the minimal setup to reproduce the user's environment (as I'm nsetting new one up on a mac sequoia or linux) a link to the proper page on opencap side would be a good place to start. Thank you

@carmichaelong
Copy link
Contributor

@aymanhab Good question, the expectation is that the instructions from the README for the repo (https://github.com/stanfordnmbl/opencap-processing) should work out of the box

@aymanhab
Copy link
Contributor

@mattpetrucci quick follow up:/update

  1. I tried the instructions on a clean ubuntu 22.04 and the example_kinetics.py as well as example.py ran to completion.
  2. Do you know what version had problems (either straight ubuntu or in Docker)?
  3. My macbook is on latest version Sequoia while the error above was reported on Sonoma. Do you know if Sequoia has been tested (an OS upgrade by user would solve the problem if true)?

@mattpetrucci
Copy link
Collaborator Author

@aymanhab The cluster is on Ubuntu 24.04 per the user.

@aymanhab
Copy link
Contributor

Thanks @mattpetrucci I don't have access to that linux version, so I'm trying the mac version now. Do you know if the opensimAD stack works in native arm64 environment or only on intel x86_64 on osx?

@mattpetrucci
Copy link
Collaborator Author

@aymanhab It should work on arm64.

@aymanhab
Copy link
Contributor

On arm64 osx Sequoia, I can install OpenSim, run example.py successfully but running example_kinetics.py fails with the following compile time errors
ld: warning: ignoring file '/Users/ayman/opencap/opencap-processing/UtilsDynamicSimulations/OpenSimAD/opensimAD-install/macOS/lib/libosimCommon_recorder.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/ayman/opencap/opencap-processing/UtilsDynamicSimulations/OpenSimAD/opensimAD-install/macOS/lib/libosimSimulation_recorder.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/ayman/opencap/opencap-processing/UtilsDynamicSimulations/OpenSimAD/opensimAD-install/macOS/lib/libSimTKcommon_recorder.3.6.dylib': found architecture 'x86_64', required architecture 'arm64'
... more errors and failure downstream.

Not sure if there's an OpenSimAD on arm64 that's not picked up, or if no such build for OpenSimAD exists.
@antoinefalisse can you comment?

@antoinefalisse
Copy link
Collaborator

@aymanhab I don't have a build for arm64. Would you like to help build one?
Here is the source code: https://github.com/antoinefalisse/opensim-core/tree/AD-recorder-work-py-install.
Maybe it just works our of the box? i works on Windows, Linux, and Max x86_64.

Let me know if a call would be helpful.

@carmichaelong
Copy link
Contributor

An arm64 build would be awesome, but if it's easier for now, might want to see if making an x86_64 conda environment works first (https://stackoverflow.com/questions/71515117/how-to-set-up-a-conda-osx-64-environment-on-arm-mac). I wonder if that's what folks on mac have been doing, since there's no arm64 build for opensimAD.

@aymanhab
Copy link
Contributor

Thanks @carmichaelong and @antoinefalisse I'll try x86_64 first and update the readme page with the status on mac, then try to build arm64 per @antoinefalisse but at least we set the expectations for users on mac osx with currently available tools.
@antoinefalisse I'll let you know if I get stuck or have issues building on arm64, thanks for your offer to help 👍

@aymanhab
Copy link
Contributor

aymanhab commented Dec 19, 2024

Update, even with x86_64 environment on Apple silicon, kinetics still fails since cmake which uses its own logic, defaults to arm64 build environment. So practically kinetics is broken on all recent macs. I'll document this before moving to solutions or workarounds. I realize we can force cmake to use x86_64 and will try that but would be good to document what we have as of now.

@aymanhab
Copy link
Contributor

PR to update README is here #137
PR to successfully build x86_64 stack is here #138
next up is building OpenSimAD natively on arm64 and updating the scripts accordingly

@aymanhab
Copy link
Contributor

aymanhab commented Jan 8, 2025

The immediate issue with osx -x86_64 has been resolved in PR #138, documentation updated, the remaining items are in separate issues. so this issue can be closed AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants