-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fail to compile v2.0.0 with MSVC #518
Comments
Yeah. This was mentioned in the latest talk: #451 (comment). |
@nniclausse, you can find the list of supported compilers at https://mpusz.github.io/mp-units/2.1/getting_started/installation_and_usage/. Unfortunately, MSVC is the worst one with C++20 support now. We submitted many bugs to MSVC teams, and we are waiting for them to be resolved so we may continue our efforts to make the project compile on it. |
ok, thanks for your feedback, i'll try clang on windows |
Hi, is MSVC still out of the list? (a list of supported compilers in the GitHub page would help). |
Yes, MSVC still does not properly support C++20. The list of supported compilers is provided on the main page of our docs (https://mpusz.github.io/mp-units/2.2). |
Thanks a lot. It seems to me there is no way to bypass the problem, I have significant issues with the concepts that are not properly evaluated... |
Is there a list with corresponding bugs you submitted? Having this list would enable me to track them and give them a vote. |
Unfortunately, there is no list, and I did not submit the bugs. Also, many bugs are still not submitted as no one had time to investigate and isolate them. Diagnostics (error messages) suck in MSVC, so it is not easy to find the root cause of the problem. |
However, one of the MSVC developers promised that they would try to enable mp-units internally for their CI. Hopefully, this will push things forward. |
My team is also blocked by this; using Unreal Engine 5.4 locks us into MSVC for Windows. |
Here's the relevant part of my error log:
Referenced line: mp-units/src/core/include/mp-units/framework/reference.h Lines 89 to 93 in ab51b47
|
I have created a fork of mp-units where I fixed all the bugs that occur with MSVC. These fixes are for version 2.2 and can be found in the branch 2.2-msvc-194: mp-units branch. Most of the fixes are due to bugs in the MSVC compiler. Whenever I was able to reproduce the behavior in a small snippet, I created an issue to report it. Here are the links to the issues:
However, there are still some bugs that I could not reproduce and do not understand well enough to report an issue. Additionally, I have found some issues in mp-units that will not be solved with a new MSVC compiler version. Should we discuss these issues here, or should I open separate issues?" |
@czjhoppe, WOW, that is excellent news and huge work! Thank you! Could you please provide a PR with those? It would be great if MSVC workarounds could be somehow marked with a preprocessor macro (like others already provided in Regarding "issues in mp-units that will not be solved with a new MSVC compiler version", I would like to understand it a bit more. Is it a bug in mp-units, or is it just a feature that is not in the MSVC roadmap for now? If those are mp-units bugs, you can open PRs right away. We may discuss the rest here if needed. Thanks again! |
@mpusz Happy to contribute to this project :) Of course, I can create a PR with those changes. Those issues can be considered as 'bugs' in mp-units. I will open PRs for those. |
Right, we do not have to make all the repo look really bad 😉 Maybe we should just scope on the library part and leave tests and examples without those workarounds. Hopefully, MSVC will improve soon and then we will be able to compile the entire repo with it as well. |
The main library compiles with MSVC now. Examples and unit tests will need to wait for MSVC to fix their bugs. I listed them on the compiler conformance page in our docs. |
@czjhoppe, did you rebase your MSVC branches to the mp-units master? I tried to compile a simple application on the latest MSVC with the current master, but there were still too many issues for it to build completely. Maybe we need to provide more workarounds in order for mp-units to compile successfully on MSVC? BTW, I hoped to work with MSVC devs at CppCon but they did not arrive here :-( |
Hi @mpusz, just to clarify, I made changes only to the library part as we had discussed earlier. Perhaps there was a misunderstanding? You can review all the changes that would have been required otherwise by checking out the following branch on my fork: https://github.com/czjhoppe/mp-units/tree/master-msvc-194. This branch successfully compiles all examples and unit tests. |
Sure, this is what we have agreed. However, I tried to write a simplest application, compile and link it but it didn't work. I had many new errors. For example about I will review your branch today. I just wanted to check if it is already rebased on the master. |
Maybe reviewing my branch will help. Otherwise feel free to reach out to me once more. |
OK, I found the issue. With modules disabled, my compilation works. Enabling modules surfaces another massive set of issues :-( |
Hello everyone. Thank you for the amazing work. Do I understand correctly that:
|
I would say there is no risk. mp-units is always tested on all other compilers. @czjhoppe also proved that when the workarounds are applied to tests, they will also compile and pass. If you want to have tests on your side, you can take the tests with workarounds applied from @czjhoppe repository. Hopefully, the MSVC team will fix those 3 bugs soon, and then our entire master branch will compile as well. |
I decided to keep this issue open until all the MSVC bugs, including the modules ones, are fixed. |
That's great! Will you proceed with a new release anytime soon, now that MSVC is (somewhat) supported? |
Yes, I plan to release mp-units 2.3 soon. |
Hi
I'm trying to compile mp-units 2.0.0 on windows with Visual Studio (tried with 16 and 17), but it fails. It was working well with v0.8.0
I'm using cmake directly (i'm building a conda package of mp-units btw), and got a lot of compilers errors:
Do you plan to support Visual studio again ? Or did i miss something ? Thanks.
The text was updated successfully, but these errors were encountered: