Skip to content

[Build] onnxruntime with tag 1.20.* build failed on Windows after VS upgrade to 17.13.* #23911

Closed
@mslichao

Description

@mslichao

Describe the issue

https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-13/
VS 17.13.* have a breaking change:

We’ve improved the build throughput of , , , and by not including all of . For the same reason, we’ve moved system_clock, high_resolution_clock, and chrono_literals from a commonly-included internal header to . This has source-breaking impact. If you see compiler errors complaining that it doesn’t recognize chrono types like system_clock or UDLs like 1729ms, you need to include specifically, instead of assuming that headers like will drag it in.

This breaking change caused the https://github.com/microsoft/onnxruntime/blob/v1.20.2/include/onnxruntime/core/platform/ort_mutex.h build failed.

Add #include <chrono> can fix this issue, can we patch the 1.20.* to fix this build failure?

Urgency

No response

Target platform

Windows

Build script

Default build

Error / output

system_clock not defined

Visual Studio Version

17.13.*

GCC / Compiler Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateplatform:windowsissues related to the Windows platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions