Skip to content

Conversation

@moluopro
Copy link
Contributor

@moluopro moluopro commented Jan 9, 2026

The original script had an invalid CFLAGS assignment (CFLAGS= -O2 ...), which caused zsh to treat -O2 as a command and fail with:

zsh: command not found: -O2

It also hardcoded the iPhoneOS SDK and Xcode toolchain paths, which may not exist on all machines and can prevent the build from running successfully.

This update:

  1. Fix the shell syntax by assigning CFLAGS correctly

  2. Use xcrun --sdk iphoneos --show-sdk-path to resolve the active iOS SDK dynamically

  3. Build only the libraries (make libs) to avoid running iOS test binaries on macOS

I have tested this on a real macOS machine and the build completes successfully.

docs/install.md Outdated
CFLAGS="-O2 -Wno-macro-redefined -isysroot $SDKROOT -arch arm64 -miphoneos-version-min=10.0"
make TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
make libs TARGET=ARMV8 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this change is correct - why would you want to make "libs" only instead of a full build ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build only the libraries (make libs) to avoid running iOS test binaries on macOS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think make libs is wrong, I can roll it back. Are there any other problems?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-build condition should already prevent running the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@martin-frbg martin-frbg added this to the 0.3.31 milestone Jan 10, 2026
@martin-frbg martin-frbg merged commit e5aebea into OpenMathLib:develop Jan 10, 2026
29 of 31 checks passed
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.

2 participants