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

Compatibility issue with latest Microsoft C++ Library on Windows #1469

Open
blinkfrog opened this issue Jun 1, 2024 · 2 comments
Open

Compatibility issue with latest Microsoft C++ Library on Windows #1469

blinkfrog opened this issue Jun 1, 2024 · 2 comments
Labels
discussion General discussion about something

Comments

@blinkfrog
Copy link
Contributor

Hello. Thank you again for amazing SYCL implementation!

Recently I was using VS 17.8.3 with MSVC 14.38.33130. AdaptiveCpp was compiled using LLVM v17.0.4, and all worked just fine.
However, I decided to update VS to the latest 17.10.1 with MSVC 14.40.33807. After this AdaptiveCpp stopped to compile programs, targeted OpenMP.

Specifically, I got a lot of error messages like this:

 In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\chrono:25:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\format(3204,54): error GBC023BAB: capturing a structured binding is not yet supported in OpenMP
   3204 |         return _STD _Widen_and_copy<_CharT>(_Buffer, _End, _STD move(_Out));

I suppose the problem is in updated C++ library?

The thing I tried to do the first was recompiling LLVM, boost and AdaptiveCpp with this new MS C++ library, but this didn't help.

After some search I found this bugreport: https://www.mail-archive.com/[email protected]/msg69040.html
Then I tried the godbolt code by the link on that page, and discovered that there is no such error when using LLVM 19 trunk.

Then I tried to build LLVM 19.0.0git, boost, and AdaptiveCpp, but got a lot of errors. I suppose AdaptiveCpp is not guaranteed to be built with pre-release versions of LLVM?

So, the only solution which worked was reverting VS to 17.8.3. On this version, I also tried to build LLVM 18.1.6 and AdaptiveCpp, and can confirm that this combination works on Windows.

However, I am wondering if there is a way to make AdaptiveCpp to work with the latest MS C++ library?

Thanks.

@blinkfrog blinkfrog added the discussion General discussion about something label Jun 1, 2024
@nilsfriess
Copy link
Collaborator

I'm afraid there's not a lot we can do here (as you've already observed). It seems that MSVC started to use structured bindings somewhere which are not yet supported in Clang OpenMP. The reason that the small godbolt example works with clang 19 seems to be this PR, so it's actually still not implemented, but clang now only shows the diagnostic if you're actually using the structured binding inside a #pragma omp parallel or similar.

So this will probably work as soon as AdaptiveCpp can be compiled with LLVM 19 (which we don't test yet since we generally only test with released LLVM versions).

@blinkfrog
Copy link
Contributor Author

blinkfrog commented Jun 11, 2024

So this will probably work as soon as AdaptiveCpp can be compiled with LLVM 19 (which we don't test yet since we generally only test with released LLVM versions).

Thank you very much. I won't close this issue yet then and will close it after I confirm that this issue is solved (likely after AdaptiveCpp can be compiled with LLVM 19).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General discussion about something
Projects
None yet
Development

No branches or pull requests

2 participants