-
Notifications
You must be signed in to change notification settings - Fork 3k
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] /usr/bin/ld: failed to set dynamic section sizes: memory exhausted #22550
Comments
Typically building the main unit tests (onnxruntime_test_all) takes a huge amount of memory to link. You could try adding |
Thank you! I'm trying it now.
|
Use cross-compiling please. A 32-bit process can only use at most 2GB memory, which is not enough for a modern compiler. |
BUILD_UNIT_TESTS=OFF helped. |
Describe the issue
Unable to build onnxruntime on ubuntu 22 for armv7.
During the last failed build I had 16GB of swap. Now I've doubled it.
Linux pynq 5.15.19-xilinx-v2022.1 #1 SMP PREEMPT Mon Apr 11 17:52:14 UTC 2022 armv7l armv7l armv7l GNU/Linux
GNU ld (GNU Binutils for Ubuntu) 2.38
cmake version 3.31.20241016-gee2eadb
Urgency
No response
Target platform
armv7l
Build script
cd onnxruntime
./build.sh --config Release --parallel --skip_submodule_sync --skip_tests --use_xnnpack --build_wheel --cmake_extra_defines CMAKE_CXX_FLAGS="-Wno-dev -Wall -Wextra -O3 -g3 -mfloat-abi=hard -mfpu=neon-vfpv3 -mcpu=cortex-a9 -mfloat-abi=hard" CMAKE_C_FLAGS="-Wno-dev -Wall -Wextra -O3 -g3 -mfloat-abi=hard -mfpu=neon-vfpv3 -mcpu=cortex-a9 -mfloat-abi=hard"
Error / output
gmake[2]: *** [CMakeFiles/onnxruntime_pybind11_state.dir/build.make:205: CMakeFiles/onnxruntime_pybind11_state.dir/home/xilinx/onnxruntime/onnxruntime/python/onnxruntime_pybind_state.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3127: CMakeFiles/onnxruntime_pybind11_state.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: failed to set dynamic section sizes: memory exhausted
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/onnxruntime_test_all.dir/build.make:5243: onnxruntime_test_all] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3334: CMakeFiles/onnxruntime_test_all.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Traceback (most recent call last):
File "/home/xilinx/onnxruntime/tools/ci_build/build.py", line 2998, in
sys.exit(main())
File "/home/xilinx/onnxruntime/tools/ci_build/build.py", line 2888, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "/home/xilinx/onnxruntime/tools/ci_build/build.py", line 1739, in build_targets
run_subprocess(cmd_args, env=env)
File "/home/xilinx/onnxruntime/tools/ci_build/build.py", line 867, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "/home/xilinx/onnxruntime/tools/python/util/run.py", line 49, in run
completed_process = subprocess.run(
File "/usr/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '--build', '/home/xilinx/onnxruntime/build/Linux/Release', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
Visual Studio Version
No response
GCC / Compiler Version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
The text was updated successfully, but these errors were encountered: