Skip to content

Add macOS and aarch64 platform branches#97

Merged
robbr48 merged 2 commits into
robbr48:mainfrom
slitvinov:experimental-macos-arm64
May 20, 2026
Merged

Add macOS and aarch64 platform branches#97
robbr48 merged 2 commits into
robbr48:mainfrom
slitvinov:experimental-macos-arm64

Conversation

@slitvinov
Copy link
Copy Markdown
Contributor

Fixes #96.

Detect __APPLE__ for OS string and __aarch64__/__arm64__ for arch string and bits, mirroring what fmpy, fmi-library, FMI4j, and Reference-FMUs already do. Without this, on Apple Silicon both axes fall through to the defaults (linux + 32) and the loader looks for binaries/linux32/*.so instead of binaries/darwin64/*.dylib.

Verified by rebuilding OMSimulator (which vendors fmi4c) on macOS arm64 and running it on a ChuaCircuit FMU built by omc: simulates to completion and writes the result file. Repro steps and full analysis in #96.

Detect __APPLE__ for OS string and __aarch64__/__arm64__ for arch
string and bits, mirroring fmpy, fmi-library, and FMI4j. Without
this, on Apple Silicon both axes fall through to defaults
(linux + 32) and the loader looks for binaries/linux32/*.so
instead of binaries/darwin64/*.dylib.

Reported as robbr48#96.
Without this, test FMUs are written to binaries/linux64 (FMI 1/2) or
binaries/x86_64-linux (FMI 3) on macOS, while the patched fmi4c
reader correctly looks under binaries/darwin64 / aarch64-darwin.

With this commit and the reader fix applied, all 6 ctest cases pass
on macOS 26.4.1 arm64 (Apple M5):

  Test #1: fmi1cs ........... Passed    1.05 sec
  Test robbr48#2: fmi1me ........... Passed    0.36 sec
  Test robbr48#3: fmi2cs ........... Passed    0.44 sec
  Test robbr48#4: fmi2me ........... Passed    0.46 sec
  Test robbr48#5: fmi3cs ........... Passed    0.42 sec
  Test robbr48#6: fmi3me ........... Passed    0.33 sec

  100% tests passed, 0 tests failed out of 6
@jschueller
Copy link
Copy Markdown
Contributor

hi, I'm packaging openmodelica for conda, I confirm this fixes OMSimulator

@robbr48
Copy link
Copy Markdown
Owner

robbr48 commented May 18, 2026

Looks great! But I would really prefer to keep "on: [pull_request]" rather than workflow_dispatch. Was this change accidental?

@jschueller
Copy link
Copy Markdown
Contributor

yes, the "ci" commits look unrelated
maybe the first 2 commits can be cherry-picked ?

@slitvinov slitvinov force-pushed the experimental-macos-arm64 branch from 3cad7fb to 6153abb Compare May 19, 2026 08:26
@slitvinov
Copy link
Copy Markdown
Contributor Author

Thanks @jschueller, dropped the ci noise.

@robbr48 robbr48 merged commit 8eab18f into robbr48:main May 20, 2026
8 checks passed
@jschueller
Copy link
Copy Markdown
Contributor

is there a new release planned ?

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

Successfully merging this pull request may close these issues.

fmi4c on macOS arm64 looks for binaries/linux32/*.so instead of binaries/darwin64/*.dylib

3 participants