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

Define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR #21005

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

baijumeswani
Copy link
Contributor

@baijumeswani baijumeswani commented Jun 11, 2024

microsoft/STL#3824 introduces constexpr mutex. An older version of msvcp140.dll will lead to A dynamic link library (DLL) initialization routine failed.

This error can be encountered if using conda Python since conda packages msvc dlls and these are older right now.

This PR disables the constexpr mutex so that ort package can work with older msvc dlls.

Thanks @snnn for the discovery.

@tianleiwu tianleiwu merged commit 94aa21c into main Jun 12, 2024
170 checks passed
@tianleiwu tianleiwu deleted the baijumeswani/non-constexpr-mutex branch June 12, 2024 05:23
@sophies927 sophies927 added the triage:approved Approved for cherrypicks for release label Jun 12, 2024
@snnn
Copy link
Member

snnn commented Jun 13, 2024

It cannot completely solve the problem. It only adds compatibility in a way that the built binaries will be not just compatible with 17.10 runtime but also 17.8 runtime. Just these two. The latest msvc runtime dll in the latest conda is 17.9. So this change is enough for solving that particular problem.

@sophies927 sophies927 removed the triage:approved Approved for cherrypicks for release label Jun 17, 2024
baijumeswani added a commit that referenced this pull request Jun 20, 2024
microsoft/STL#3824 introduces constexpr mutex.
An older version of msvcp140.dll will lead to ```A dynamic link library
(DLL) initialization routine failed```.

This error can be encountered if using conda Python since conda packages
msvc dlls and these are older right now.

This PR disables the constexpr mutex so that ort package can work with
older msvc dlls.

Thanks @snnn for the discovery.
@jywu-msft jywu-msft added the 1.18.1 essential Essential for rel-1.18.1 branch label Jun 21, 2024
yf711 pushed a commit that referenced this pull request Jun 21, 2024
microsoft/STL#3824 introduces constexpr mutex.
An older version of msvcp140.dll will lead to ```A dynamic link library
(DLL) initialization routine failed```.

This error can be encountered if using conda Python since conda packages
msvc dlls and these are older right now.

This PR disables the constexpr mutex so that ort package can work with
older msvc dlls.

Thanks @snnn for the discovery.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.18.1 essential Essential for rel-1.18.1 branch release:1.18.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants