Skip to content

Add macOS and aarch64 platform branches#97

Open
slitvinov wants to merge 5 commits into
robbr48:mainfrom
slitvinov:experimental-macos-arm64
Open

Add macOS and aarch64 platform branches#97
slitvinov wants to merge 5 commits into
robbr48:mainfrom
slitvinov:experimental-macos-arm64

Conversation

@slitvinov
Copy link
Copy Markdown

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
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

1 participant