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

[Build] Run build script build_apple_framework.py error #21249

Closed
tqtifnypmb opened this issue Jul 4, 2024 · 1 comment
Closed

[Build] Run build script build_apple_framework.py error #21249

tqtifnypmb opened this issue Jul 4, 2024 · 1 comment
Labels
build build issues; typically submitted using template platform:mobile issues related to ONNX Runtime mobile; typically submitted using template

Comments

@tqtifnypmb
Copy link

tqtifnypmb commented Jul 4, 2024

Describe the issue

How to reproduce:

I simply cloned the repo switch to v1.18.1, and run python tools/ci_build/github/apple/build_apple_framework.py tools/ci_build/github/apple/default_full_apple_framework_build_settings.json --config Release, and got the error while compiling for OSX (iOS is fine).

I tried several times, they all failed in building same target 'onnxruntime_common', but different files.

Urgency

No response

Target platform

macOS 14.2.1 M2

Build script

python tools/ci_build/github/apple/build_apple_framework.py tools/ci_build/github/apple/default_full_apple_framework_build_settings.json --config Release

Error / output

Error logs:

note: Run script build phase 'Generate CMakeFiles/ALL_BUILD' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'ALL_BUILD' from project 'onnxruntime')
note: Run script build phase 'Generate CMakeFiles/ZERO_CHECK' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'ZERO_CHECK' from project 'onnxruntime')
note: Run script build phase 'Generate _deps/onnx-build/CMakeFiles/gen_onnx_proto' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'gen_onnx_proto' from project 'onnxruntime')
note: Run script build phase 'CMake PreBuild Rules' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'onnxruntime' from project 'onnxruntime')
note: Run script build phase 'CMake PostBuild Rules' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'onnxruntime' from project 'onnxruntime')
note: Run script build phase 'Generate CMakeFiles/onnxruntime_generate_def' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'onnxruntime_generate_def' from project 'onnxruntime')
note: Run script build phase 'Generate _deps/onnx-build/CMakeFiles/gen_onnx_operators_proto' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'gen_onnx_operators_proto' from project 'onnxruntime')
note: Run script build phase 'Generate _deps/onnx-build/CMakeFiles/gen_onnx_data_proto' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'gen_onnx_data_proto' from project 'onnxruntime')
** BUILD FAILED **

The following build commands failed:
CompileC /Users/tqtifnypmb/Downloads/onnxruntime/build/apple_framework/intermediates/macosx_arm64/Release/build/onnxruntime_common.build/Release/Objects-normal/arm64/apple_log_sink.o /Users/tqtifnypmb/Downloads/onnxruntime/onnxruntime/core/platform/apple/logging/apple_log_sink.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'onnxruntime_common' from project 'onnxruntime')
(1 failure)
Traceback (most recent call last):
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/build.py", line 2955, in
sys.exit(main())
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/build.py", line 2847, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/build.py", line 1736, in build_targets
run_subprocess(cmd_args, env=env)
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/build.py", line 861, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/python/util/run.py", line 49, in run
completed_process = subprocess.run(
File "/opt/homebrew/Caskroom/miniconda/base/envs/onnx/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/homebrew/Caskroom/miniconda/base/envs/onnx/bin/cmake', '--build', '/Users/tqtifnypmb/Downloads/onnxruntime/build/apple_framework/intermediates/macosx_arm64/Release', '--config', 'Release', '--', '-parallelizeTargets', '-jobs', '8']' returned non-zero exit status 65.
Traceback (most recent call last):
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/github/apple/build_apple_framework.py", line 248, in
main()
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/github/apple/build_apple_framework.py", line 244, in main
_build_package(args)
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/github/apple/build_apple_framework.py", line 148, in _build_package
framework_dir = _build_for_apple_sysroot(
File "/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/github/apple/build_apple_framework.py", line 63, in _build_for_apple_sysroot
subprocess.run(build_command, shell=False, check=True, cwd=REPO_DIR)
File "/opt/homebrew/Caskroom/miniconda/base/envs/onnx/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/homebrew/Caskroom/miniconda/base/envs/onnx/bin/python', '/Users/tqtifnypmb/Downloads/onnxruntime/tools/ci_build/build.py', '--parallel', '--use_xcode', '--build_apple_framework', '--use_coreml', '--use_xnnpack', '--skip_tests', '--cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF', '--macos=MacOSX', '--apple_deploy_target=11.0', '--config=Release', '--apple_sysroot=macosx', '--osx_arch=arm64', '--build_dir=/Users/tqtifnypmb/Downloads/onnxruntime/build/apple_framework/intermediates/macosx_arm64']' returned non-zero exit status 1.

Visual Studio Version

No response

GCC / Compiler Version

Xcode 15.3

@tqtifnypmb tqtifnypmb added the build build issues; typically submitted using template label Jul 4, 2024
@github-actions github-actions bot added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Jul 4, 2024
@tqtifnypmb
Copy link
Author

set --apple_deploy_target to 13.3 solve this issue

ref: #21033

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 platform:mobile issues related to ONNX Runtime mobile; typically submitted using template
Projects
None yet
Development

No branches or pull requests

1 participant