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] error: Multiple commands produce when targeting iOS with Xcode 16 #22356

Closed
skyline75489 opened this issue Oct 8, 2024 · 2 comments
Closed
Labels
build build issues; typically submitted using template platform:mobile issues related to ONNX Runtime mobile; typically submitted using template

Comments

@skyline75489
Copy link
Contributor

Describe the issue

I was under the impression that #22168 fixes build on Xcode 16, but I'm able to reproduce this error on my environment. I think this is hidden by the fact that the iOS CI on AzDevOps still uses Xcode 14.3

Urgency

No response

Target platform

iOS

Build script

./build.sh --parallel --build_dir ./build_ios_simulator --ios --apple_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 --cmake_generator Xcode

Error / output

CreateBuildDescription

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -x c++ -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -x c -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -V

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -x c -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -x objective-c -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -version_details

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -x objective-c++ -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -x assembler-with-cpp -c /dev/null

Build description signature: dfabe5037ee03d606ef04d1dfd4fa01a
Build description path: /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/build/XCBuildData/dfabe5037ee03d606ef04d1dfd4fa01a.xcbuilddata
error: Multiple commands produce '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_customopregistration_test.app/PlugIns'
note: CreateBuildDirectory /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_customopregistration_test.app/PlugIns
note: Target 'onnxruntime_customopregistration_test' (project 'onnxruntime') has create directory command with output '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_customopregistration_test.app/PlugIns'
error: Multiple commands produce '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_logging_apis_test.app/PlugIns'
note: CreateBuildDirectory /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_logging_apis_test.app/PlugIns
note: Target 'onnxruntime_logging_apis_test' (project 'onnxruntime') has create directory command with output '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_logging_apis_test.app/PlugIns'
error: Multiple commands produce '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_shared_lib_test.app/PlugIns'
note: CreateBuildDirectory /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_shared_lib_test.app/PlugIns
note: Target 'onnxruntime_shared_lib_test' (project 'onnxruntime') has create directory command with output '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_shared_lib_test.app/PlugIns'
error: Multiple commands produce '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_test_all.app/PlugIns'
note: CreateBuildDirectory /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_test_all.app/PlugIns
note: Target 'onnxruntime_test_all' (project 'onnxruntime') has create directory command with output '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_test_all.app/PlugIns'
ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk /var/folders/30/_z07890n3bz5n60rg4jkjgyr0000gn/C/com.apple.DeveloperTools/16.0-16A242d/Xcode/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache
cd /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/onnxruntime.xcodeproj
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -o /var/folders/30/_z07890n3bz5n60rg4jkjgyr0000gn/C/com.apple.DeveloperTools/16.0-16A242d/Xcode/SDKStatCaches.noindex/iphonesimulator18.0-22A3362-db63dc9361471f152f572502bdbfe70a.sdkstatcache

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_shared_lib_test' from project 'onnxruntime')
warning: duplicate output file '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_shared_lib_test.app/PlugIns' on task: MkDir /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_shared_lib_test.app/PlugIns (in target 'onnxruntime_shared_lib_test' 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 PostBuild Rules' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'custom_op_invalid_library' 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 'custom_op_library' 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 '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_customopregistration_test' from project 'onnxruntime')
warning: duplicate output file '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_customopregistration_test.app/PlugIns' on task: MkDir /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_customopregistration_test.app/PlugIns (in target 'onnxruntime_customopregistration_test' 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 'custom_op_local_function' 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_test_all' from project 'onnxruntime')
warning: duplicate output file '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_test_all.app/PlugIns' on task: MkDir /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_test_all.app/PlugIns (in target 'onnxruntime_test_all' from project 'onnxruntime')
warning: duplicate output file '/Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_logging_apis_test.app/PlugIns' on task: MkDir /Users/skyline/Projects/onnxruntime/build_ios_simulator/Debug/Debug-iphonesimulator/onnxruntime_logging_apis_test.app/PlugIns (in target 'onnxruntime_logging_apis_test' 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 'custom_op_get_const_input_test_library' from project 'onnxruntime')
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_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')
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 _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')
** BUILD FAILED **

Traceback (most recent call last):
File "/Users/skyline/Projects/onnxruntime/tools/ci_build/build.py", line 2972, in
sys.exit(main())
^^^^^^
File "/Users/skyline/Projects/onnxruntime/tools/ci_build/build.py", line 2862, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/Users/skyline/Projects/onnxruntime/tools/ci_build/build.py", line 1730, in build_targets
run_subprocess(cmd_args, env=env)
File "/Users/skyline/Projects/onnxruntime/tools/ci_build/build.py", line 865, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/skyline/Projects/onnxruntime/tools/python/util/run.py", line 49, in run
completed_process = subprocess.run(
^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/ort-genai/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,

Visual Studio Version

No response

GCC / Compiler Version

No response

@skyline75489 skyline75489 added the build build issues; typically submitted using template label Oct 8, 2024
@github-actions github-actions bot added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Oct 8, 2024
@edgchen1
Copy link
Contributor

edgchen1 commented Oct 9, 2024

duplicate of #22245

@skyline75489
Copy link
Contributor Author

Thanks @edgchen1 . I'll close this and redirect the discussions there.

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

2 participants