Skip to content

[Build] Build fails in DEBUG mode: number of sections exceeded object file format limit #26852

@AndreyOrb

Description

@AndreyOrb

Describe the issue

Unable to build the Debug version of the ORT.

Urgency

No response

Target platform

Windows 11

Build script

.\build.bat --config Debug --build_shared_lib --parallel 6 --nvcc_threads 4 --use_cuda --cuda_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8" --cudnn_home "C:\Program Files\NVIDIA GPU Computing Toolkit\cuDNN\cudnn-windows-x86_64-9.17.0.29_cuda12-archive" --cuda_version 12.8 --skip_tests --use_mimalloc --enable_nvtx_profile

Error / output

E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\onnxruntime\contrib_ops\cuda\bert\cudnn_fmha\cudnn_flash_attention.cc(1,1): error C1128: number of sections exceeded object file format limit: compile with /bigob
j [E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\build\Windows\Debug\onnxruntime_providers_cuda.vcxproj]
Traceback (most recent call last):
File "E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\tools\ci_build\build.py", line 2670, in
sys.exit(main())
File "E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\tools\ci_build\build.py", line 2571, in main
build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
File "E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\tools\ci_build\build.py", line 1363, in build_targets
run_subprocess(cmd_args, env=env)
File "E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\tools\ci_build\build.py", line 148, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\tools\python\util\run.py", line 50, in run
completed_process = subprocess.run(
File "C:\Program Files\Python310\lib\subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\Program Files\CMake\bin\cmake.EXE', '--build', 'E:\3rdParties\onnxruntime\onnxruntime_v1.23.2\\build\Windows\Debug', '--config', 'Debug', '--', '/maxcpucount:6', '/p:CL_MPCount=5', '/nodeReuse:False']' returned non-zero exit status 1.

Visual Studio Version

VS 2022

GCC / Compiler Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions