-
Notifications
You must be signed in to change notification settings - Fork 69
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
Still cannot build mdspan under MSVC 2019 #26
Comments
We didn't tet figure out how to get gtest on Windows so we disabled the tests which need that and only compiled the rest (which according to Bob didn't work, and we then fixed). So our json looked like this:
|
Can you check out the https://github.com/kokkos/mdspan/tree/fix-msvc-gtest-tests branch and see if it works for you? |
At least for my installation, it doesn't work with >------ Build All started: Project: mdspan, Configuration: x64-Debug ------
Microsoft (R) Build Engine version 16.6.0-preview-20208-15+2f58c1427 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/examples/tiled_layout/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/examples/dot_product/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/examples/subspan/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
Building Custom Rule C:/work/vs2019-x64-Debug/mdspan/tests/googletest-src/googletest/CMakeLists.txt
dot_product.cpp
simple_tiled_layout.cpp
ctest_no_unique_address.cpp
ctest_constructor_sfinae.cpp
ctest_constexpr_dereference.cpp
ctest_extents_ctors.cpp
ctest_standard_layout.cpp
subspan.cpp
C:\work\kinetictheory\mdspan\compilation_tests\ctest_constexpr_dereference.cpp(80,1): fatal error C1001: Internal compiler error.
(compiler file 'msc1.cpp', line 1533)
To work around this problem, try simplifying or changing the program near the locations listed above.
If possible please provide a repro here: https://developercommunity.visualstudio.com
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
C:\work\kinetictheory\mdspan\compilation_tests\ctest_constexpr_dereference.cpp(77,1): message : while evaluating constexpr function 'simple_static_sum_test_1' [C:\work\vs2019-x64-Debug\mdspan\compilation_tests\ctest_constexpr_dereference.vcxproj]
INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\CL.exe'
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
ctest_constexpr_subspan.cpp |
@crtrott I appreciate you looking at this. I have an appveyor MSVC build that shows the build issues I'm hitting at lanl/Draco#814. Scroll down to the "AppVeyor build failed" block and dive on that hyper link to see the compile line and fatal error. If you are interested, I can probably help you setup a similar MSVC2019 CI for mdspan. |
Hm maybe this is the difference between MSVC 16.5 and 16.6 |
For the record here is my json file:
|
This is with tests enabled and version 16.5.0 of MSVC. I am not 100% sure if I want to look at previews of MSVC, since it is already a painful compiler :-P |
I am installing 16.5.4 now see if this still works. |
Sorry if I miscommunicated on that. You shouldn't do this by hand. We've fixed that part at least.
Yeah this failure is effectively a stress test of the compiler, not really a test of correct functionality. It's more or less meant to see what the compiler can do without crashing. I should move this to a different section or something, but my CMake isn't really good enough to figure out how to do that. For now, we need to just put in a way to enable compilation tests separately from runtime tests (this was in there at some point; @crtrott did you mean to exclude that change from the pull request?). |
@dhollman I didn't exclude anything. We already merged the original stuff, but @KineticTheory enabled all tests, so I did too and commented the stuff out which failed. This still works with 16.5.4 btw. Configure
Build:
Test:
|
Another data point: I get build errors when I try to build
|
My previous comment may have been an issue with |
I've created a mini-repository that shows the build issues we are having with MSVC 2019 (our compiles are limited to C++14, see #ifdef keepthis
/* disable for msvc, gcc needs these */
_MDSPAN_BACKPORT_TRAIT(is_assignable)
_MDSPAN_BACKPORT_TRAIT(is_constructible)
_MDSPAN_BACKPORT_TRAIT(is_convertible)
_MDSPAN_BACKPORT_TRAIT(is_default_constructible)
_MDSPAN_BACKPORT_TRAIT(is_trivially_destructible)
_MDSPAN_BACKPORT_TRAIT(is_same)
_MDSPAN_BACKPORT_TRAIT(is_empty)
_MDSPAN_BACKPORT_TRAIT(is_void)
#endif When I add the
I'm not sure how to debug this one. Any suggestions? |
I will look into this. |
The upstream has a build issues with certain MSVC versions. See kokkos/mdspan#26 for details.
The upstream has a build issues with certain MSVC versions. See kokkos/mdspan#26 for details.
The upstream has a build issues with certain MSVC versions. See kokkos/mdspan#26 for details.
@dhollman In the conclusion to our discussion related to issue #22, you expressed that you have a version of mdspan (master?) working in Visual Studio. You expressed the need to set the compiler option
/Zc:__cplusplus
, which I have done. Can you provide details concerning the working setup that you are using? I am still unable to build mdspan from Visual Studio 2019.I am using
Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28804.1 for x64
under Visual Studio 2019 v. 16.6.0 Preview 4.0.CMAKE_CXX_STANDARD 14
).CXX FLAGS
are/Gy /fp:precise /DWIN32 /D_WINDOWS /MP /wd4251 /arch:AVX2 /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /EHa /Zc:__cplusplus -openmp /W4
The error I see is:
I also attempted to build the examples provided in the mdspan repository. Using the attached
CMakeSettings.json
for optionx64-Debug
, I ran into the following errors:CMakeSettings.json.txt
The text was updated successfully, but these errors were encountered: