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] Warnings Treated as Errors in Windows Build for x86 platform on ORT Version 1.10.0 #23160

Open
HenrryQin opened this issue Dec 20, 2024 · 0 comments
Labels
build build issues; typically submitted using template platform:windows issues related to the Windows platform

Comments

@HenrryQin
Copy link

Describe the issue

I am facing an issue where warnings are being treated as errors during the build process on the Windows platform targeting the x86 architecture with ONNX Runtime version 1.10.0(I need to support Windows 7-32bit). Upon investigating the build.py script, I found that the use_dev_mode(args) function sets onnxruntime_DEV_MODE to ON, which seems to be causing the warnings to be treated as errors. I have not been able to find a parameter to pass to disable this behavior.

I have checked the higher versions of ONNX Runtime and noticed that the compile_no_warning_as_error parameter was introduced in version 1.14.0 to address this issue. However, I am wondering if there is a way to achieve the same effect in version 1.10.0 by passing a parameter to build.bat.

As a workaround, I have tried setting use_dev_mode(args) to return OFF directly, which resolved my issue. However, I would like to know if there is an official parameter that can be used for this purpose in the 1.10.0 version.

I have reviewed the documentation and existing issues but did not find a solution for this specific version.
I am aware of the compile_no_warning_as_error parameter in version 1.14.0, but I need a solution for version 1.10.0.
Is there a parameter that can be passed to build.bat in version 1.10.0 to treat warnings as informational messages instead of errors? Any guidance on this matter would be greatly appreciated.

Thank you for your attention to this issue.

Urgency

Low or Middle

Target platform

Windows-x86

Build script

.\build.bat --build_dir .\build --update --config RelWithDebInfo --build_shared_lib --parallel --x86 --skip_submodule_sync --cmake_generator "Visual Studio 17 2022" --enable_msvc_static_runtime

Error / output

Image

Visual Studio Version

2022

GCC / Compiler Version

No response

@HenrryQin HenrryQin added the build build issues; typically submitted using template label Dec 20, 2024
@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Dec 20, 2024
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:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

1 participant