-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
BUG: Cannot build C++ project using MSVC 2019 and OpenBLAS #3661
Comments
Where did you get that lapack.h from? |
The include directory of the install step for OpenBLAS |
Same as what is in Reference-LAPACK actually. No idea why VS2019 does not like it, I'm fairly sure earlier versions did. |
Okay I opened a near-duplicate issue at Reference-LAPACK/lapack#683 |
I guess you could try replacing the |
Not sure why we have this define at https://github.com/xianyi/OpenBLAS/blob/ad4598143bfbf77acd16f4ae884462edc69b496e/lapack-netlib/LAPACKE/include/lapack.h#L7 |
File history suggests it has been this way ever since LAPACKE got integrated into the LAPACK package in 2011 - maybe the ifdef made sense when it was separate |
Also lapacke_config.h woud probably need a |
When I take the 0.3.18 headers and comment out lines 7 and 9 (
One other thing that might be relevant is this in the CMAKE config of the OpenMEEG project:
so maybe this hasn't been noticed because nobody has compiled with MSVC using the c++17 standard...? |
😱 I hope this issue doesn't turn out to be something like that where I missed something in OpenMEEG itself I'll check next time I'm on my Windows boot... |
Okay I changed the lines @brada4 pointed out from their original form:
which show the problem on CIs in openmeeg/openmeeg#454, to a variant of what @martin-frbg originally suggested:
And things compile fine with openmeeg/openmeeg@6eb29e8 locally with MSVC 2017 at least and tests pass, though I still need to convince MSVC 2019 in CIs to accept it! 🚀 I'll close this as fixed, and I've updated the MSVC instruction page to mention this: https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio#visual-studio-2017-c2017-standard |
On VS2019, trying to build using MSVC I get errors like the following:
You can see it on conda-forge here for example, where it uses the OpenBLAS libraries that they build:
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=524975&view=logs&jobId=5be07ae1-d8ba-5406-47b6-8e3a3a12f825&j=5be07ae1-d8ba-5406-47b6-8e3a3a12f825&t=0bf03e01-0bec-5b85-5316-b1633322e895
And on GitHub actions here from earlier this week, same error -- this is using the OpenBLAS builds SciPy makes with mingw64, but I had the same problem when I tried previously just by downloading the 0.3.20 release binaries from GitHub:
I am a bit mystified by this because these lines are protected by an ifdef that should take care of this I think:
https://github.com/xianyi/OpenBLAS/blob/9283c7c0b5a9ec7bbe3b6dfc1a019b29b3e112e5/lapack-netlib/LAPACKE/include/lapack.h#L71-L104
Anyone run into this before? I didn't see any mention of anything like this in the Visual Studio wiki docs, but maybe I just missed it. Perhaps it's a cmake+MSVC+CPP issue, and there is some cmake fix...? Not sure.
An identical build configuration using mingw64 doesn't have this problem... but I think for conda-forge I might need to build with MSVC. And in any case it would be nice if it worked...
The text was updated successfully, but these errors were encountered: