Skip to content

[Build] MacOS universal binary build failure: "error: unknown target CPU 'armv8-a'" #24152

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

Open
edgchen1 opened this issue Mar 24, 2025 · 1 comment
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@edgchen1
Copy link
Contributor

edgchen1 commented Mar 24, 2025

Describe the issue

Building a MacOS universal binary (i.e., with CMAKE_OSX_ARCHITECTURES=arm64;x86_64) fails. The build machine is an Intel Mac on MacOS 15.3 with Xcode 16.0. See the build script and error output for details.

Urgency

No response

Target platform

MacOS

Build script

% ./build.sh --build_dir ./build/test_universal2 --cmake_extra_defines 'CMAKE_OSX_ARCHITECTURES=arm64;x86_64' 'CMAKE_VERBOSE_MAKEFILE=ON' --build_shared_lib --config Release --update --build --target onnxruntime_mlas

Error / output

[  0%] Building C object _deps/kleidiai-build/CMakeFiles/kleidiai.dir/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c.o
cd /Users/edch2/source/onnxruntime/build/test_universal2/Release/_deps/kleidiai-build && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DEIGEN_MPL2_ONLY -I/Users/edch2/source/onnxruntime/include/onnxruntime -I/Users/edch2/source/onnxruntime/include/onnxruntime/core/session -I/Users/edch2/source/onnxruntime/build/test_universal2/Release/_deps/kleidiai-src -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c99 -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -fPIC -Wpedantic -Wall -Wdisabled-optimization -Wextra -Wformat-security -Wformat=2 -Winit-self -Wstrict-overflow=2 -Wswitch-default -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes -march=armv8-a -MD -MT _deps/kleidiai-build/CMakeFiles/kleidiai.dir/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c.o -MF CMakeFiles/kleidiai.dir/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c.o.d -o CMakeFiles/kleidiai.dir/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c.o -c /Users/edch2/source/onnxruntime/build/test_universal2/Release/_deps/kleidiai-src/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c
error: unknown target CPU 'armv8-a'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, raptorlake, meteorlake, sierraforest, grandridge, graniterapids, graniterapids-d, emeraldrapids, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, znver4, x86-64, x86-64-v2, x86-64-v3, x86-64-v4
make[3]: *** [_deps/kleidiai-build/CMakeFiles/kleidiai.dir/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c.o] Error 1
make[2]: *** [_deps/kleidiai-build/CMakeFiles/kleidiai.dir/all] Error 2
make[1]: *** [CMakeFiles/onnxruntime_mlas.dir/rule] Error 2
make: *** [onnxruntime_mlas] Error 2

Visual Studio Version

No response

GCC / Compiler Version

Xcode 16 / Apple clang version 16.0.0 (clang-1600.0.26.3)

@edgchen1 edgchen1 added the build build issues; typically submitted using template label Mar 24, 2025
@edgchen1 edgchen1 changed the title [Build] MacOS universal binary build failure [Build] MacOS universal binary build failure: "error: unknown target CPU 'armv8-a'" Mar 24, 2025
jchen351 added a commit that referenced this issue Mar 25, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…disabled in MacOS and iOS packaging stage due to (#24152) (#24153)

NuGet_Packaging_CPU is broken due to similar issue from #23923
### Description
Migrate [Zip-Nuget Package
Pipeline](https://aiinfra.visualstudio.com/Lotus/_build?definitionId=940&_a=summary)
to 1ES



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

### Check list

- [x] Issue with onnxruntime-Win-CPU-2022
- [x] [Spot
Bug](https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=697830&view=logs&j=6c6a898f-bbbb-5c72-8695-82b606149fa2&t=433f102b-5ed3-5fed-87a0-6107744ce9b1&l=81)
edgchen1 added a commit that referenced this issue Mar 26, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
This is a workaround for a build error. See #24152.
edgchen1 added a commit that referenced this issue Mar 27, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
This is a workaround for a build error. See #24152.
quic-zhaoxul pushed a commit to CodeLinaro/onnxruntime that referenced this issue Apr 17, 2025
…idail is disabled in MacOS and iOS packaging stage due to (microsoft#24152) (microsoft#24153)

NuGet_Packaging_CPU is broken due to similar issue from microsoft#23923
### Description
Migrate [Zip-Nuget Package
Pipeline](https://aiinfra.visualstudio.com/Lotus/_build?definitionId=940&_a=summary)
to 1ES



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

### Check list

- [x] Issue with onnxruntime-Win-CPU-2022
- [x] [Spot
Bug](https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=697830&view=logs&j=6c6a898f-bbbb-5c72-8695-82b606149fa2&t=433f102b-5ed3-5fed-87a0-6107744ce9b1&l=81)
quic-zhaoxul pushed a commit to CodeLinaro/onnxruntime that referenced this issue Apr 17, 2025
Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

1 participant