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

[skia] Fix vulkan feature #32740

Merged
merged 4 commits into from
Jul 27, 2023
Merged

[skia] Fix vulkan feature #32740

merged 4 commits into from
Jul 27, 2023

Conversation

dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Jul 25, 2023

Use vcpkg port vulkan-headers instead of vendored copy.
Use vendored copies of headers and tools for feature vulkan, as already done by feature dawn.
Fix in-source location of vulkanmemoryallocator.
Guard vulkan inclusion in vulkanmemoryallocator as would be done in the vendored copy:
https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/+/7de5cc00de50e71a3aab22dea52fbb7ff4efceb6/include/vk_mem_alloc.h#129
Fixes #32706. Amends #29448. Alternative to #32715.

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

Use vendored copies of headers and tools, as already done by feature 'dawn'.
Guard vulkan inclusion in vulkanmemoryallocator as would be done in vendored copy.
@dg0yt dg0yt mentioned this pull request Jul 25, 2023
@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 25, 2023

CC @jimwang118

@JonLiu1993 JonLiu1993 added the category:port-bug The issue is with a library, which is something the port should already support label Jul 25, 2023
@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 25, 2023

I have an idea how to devendor vulkan-headers.

@dg0yt dg0yt marked this pull request as draft July 25, 2023 06:00
Comment on lines +188 to +191
vcpkg_replace_string("${SOURCE_PATH}/third_party/externals/vulkanmemoryallocator/include/vk_mem_alloc.h"
"#include <vulkan/vulkan.h>"
"#ifndef VULKAN_H_\n #include <vulkan/vulkan.h>\n#endif"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check third_party\vulkanmemoryallocator\BUILD.gn, the #include <vulkan/vulkan.h> used in vk_mem_alloc.h should come from the /include/third_party/vulkan path, but it is strange that the header file inclusion path is set in .gn, but it does not work during the compilation process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the link in the initial post why this is needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the link in the initial post why this is needed.

Actually not that link, but the comment in front of these lines:

Cf. third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.h:25

which is

https://github.com/google/skia/blob/fc260b97046d28a82403248ddd561f7cc396ed58/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.h#L25-L38

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then I have no problem.

@dg0yt dg0yt marked this pull request as ready for review July 25, 2023 06:11
@dg0yt dg0yt marked this pull request as draft July 25, 2023 07:19
@dg0yt dg0yt marked this pull request as ready for review July 25, 2023 07:31
@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 25, 2023

Testing skia[core,dawn] showed a few more build quirks with vulkan-headers, but this should be solved now.
And there is now a pattern how to de-vendor other dependencies (but not in this PR).

@JonLiu1993
Copy link
Member

@dg0yt, thanks for your contribution, when I test the usage of skia[vulan,dawn], I got this error, please have a look:
CMakeLists:

cmake_minimum_required (VERSION 3.8)

project(test)

# Add source to this project's executable.
add_executable (test "usageTest.cpp")

find_package(unofficial-skia CONFIG REQUIRED)

target_link_libraries(test PRIVATE unofficial::skia::skia)

usageTest.cpp

#include <stdio.h>
#include <sksl/DSL.h>

int main()
{
    printf("%s\n", "HELLO WORLD");
    return 0;
}

Config:

1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Visual Studio 17 2022" -A x64  -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\usageTest\out\install\x64-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/Feature-test/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\usageTest" 2>&1"
1> Working directory: C:\Users\test\source\repos\usageTest\out\build\x64-Debug
1> [CMake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
1> [CMake] -- The C compiler identification is MSVC 19.36.32537.0
1> [CMake] -- The CXX compiler identification is MSVC 19.36.32537.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Configuring done (14.2s)
1> [CMake] -- Generating done (0.5s)
1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/usageTest/out/build/x64-debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.

build:

>------ Build All started: Project: usageTest, Configuration: x64-Debug ------
  MSBuild version 17.6.3+07e294721 for .NET Framework
  
    Checking Build System
    Building Custom Rule C:/Users/test/source/repos/usageTest/usageTest/CMakeLists.txt
    usageTest.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\string_view(13): warning STL4038: The contents of <string_view> are available only with C++17 or later. 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLString.h(20,16): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\string(24,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLString.h(20,28): error C2065: 'string_view': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLString.h(20,28): error C2146: syntax error: missing ')' before identifier 's' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLString.h(21,16): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\string(24,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLString.h(21,28): error C2065: 'string_view': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLString.h(21,28): error C2146: syntax error: missing ')' before identifier 's' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\SkSLPosition.h(38,19): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\string(24,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\SkSLPosition.h(38,31): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLLexer.h(126,21): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\string(24,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLLexer.h(126,33): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLLexer.h(142,10): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\string(24,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLLexer.h(142,22): error C3646: 'fText': unknown override specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLLexer.h(127,9): error C2065: 'fText': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLLexer.h(127,17): error C2065: 'text': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\sksl\SkSLModifiersPool.h(24,15): error C2429: language feature 'structured bindings' requires compiler flag '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\core\SkBlockAllocator.h(57,33): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\core\SkBlockAllocator.h(66,33): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\core\SkBlockAllocator.h(406,38): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\core\SkBlockAllocator.h(407,38): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\core\SkBlockAllocator.h(416,33): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\core\SkBlockAllocator.h(429,40): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkString.h(126,31): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\atomic(296,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkString.h(126,25): error C2460: 'SkString::string_view': uses 'SkString', which is being defined 
  F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkString.h(117,14): message : see declaration of 'SkString' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkString.h(126,25): error C2178: 'SkString::string_view' cannot be declared with 'explicit' specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkChecksum.h(72,30): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\atomic(296,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkChecksum.h(72,42): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkChecksum.h(73,32): error C2065: 'k': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkChecksum.h(73,42): error C2065: 'k': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkChecksum.h(73,24): error C2198: 'uint32_t (__cdecl *)(const void *,size_t,uint32_t)': too few arguments for call 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\gpu\ganesh\GrMemoryPool.h(34,36): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\src\gpu\ganesh\GrMemoryPool.h(38,36): error C7525: inline variables require at least '/std:c++17' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(33,42): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\atomic(296,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(33,11): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(51,10): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\atomic(296,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(51,22): error C3646: 'name': unknown override specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(51,26): error C2059: syntax error: '(' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(51,35): error C2334: unexpected token(s) preceding '{'; skipping apparent function body 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(80,10): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\atomic(296,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(80,22): error C3646: 'fName': unknown override specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(35,17): error C2065: 'name': undeclared identifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(36,1): error C3867: 'SkSL::Symbol::type': non-standard syntax; use '&' to create a pointer to member 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\private\SkSLSymbol.h(35,11): error C2614: 'SkSL::Symbol': illegal member initialization: 'fName' is not a base or member 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\SkSLOperator.h(93,10): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\SkSLOperator.h(93,22): error C3646: 'tightOperatorName': unknown override specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\SkSLOperator.h(93,39): error C2059: syntax error: '(' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\SkSLOperator.h(93,47): error C2238: unexpected token(s) preceding ';' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLExpression.h(124,30): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLExpression.h(124,42): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLExpression.h(124,63): error C2143: syntax error: missing ')' before '{' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLExpression.h(124,65): error C2059: syntax error: ')' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114,17): error C2988: unrecognizable template declaration/definition 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114,17): error C2143: syntax error: missing ')' before '&' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114,17): error C2143: syntax error: missing ';' before '&' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114,8): error C2365: 'Container': redefinition; previous definition was 'template parameter' 
  F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(113,29): message : see declaration of 'Container' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114): error C2059: syntax error: ')' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114,20): error C2988: unrecognizable template declaration/definition 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(114,20): error C2059: syntax error: '->' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(115,80): error C2760: syntax error: '>' was unexpected here; expected 'expression' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\core\SkSpan.h(118,13): error C3928: '->': trailing return type is not allowed after a parenthesized declarator 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLModifiers.h(54,32): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLModifiers.h(54,44): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(90,18): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(90,12): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(90,51): error C2143: syntax error: missing ')' before '{' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(90,12): error C2059: syntax error: ')' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(92,18): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(92,12): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(94,28): error C2143: syntax error: missing ')' before '{' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(92,5): error C2535: 'SkSL::dsl::DSLType::DSLType(void)': member function already defined or declared 
  F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(90,5): message : see declaration of 'SkSL::dsl::DSLType::DSLType' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(92,12): error C2059: syntax error: ')' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(184,32): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(184,44): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(237,39): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(237,13): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(238,29): error C2143: syntax error: missing ')' before '{' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(237,13): error C2059: syntax error: ')' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(239,9): error C2059: syntax error: ':' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(237,13): error C2334: unexpected token(s) preceding ':'; skipping apparent function body 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(258,21): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(258,33): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(259,31): error C2143: syntax error: missing ')' before '{' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(259,33): error C2059: syntax error: ')' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(262,21): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(262): error C2061: syntax error: identifier 'string_view' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(269,1): error C2059: syntax error: '}' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLType.h(269,1): error C2143: syntax error: missing ';' before '}' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(38,41): error C2061: syntax error: identifier 'DSLType' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(41,59): error C2143: syntax error: missing ',' before '&' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(46,10): error C2039: 'string_view': is not a member of 'std' 
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cinttypes(22,1): message : see declaration of 'std' [C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\test.vcxproj]
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(46,22): error C3646: 'name': unknown override specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(46,26): error C2059: syntax error: '(' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(46,35): error C2334: unexpected token(s) preceding '{'; skipping apparent function body 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(50,23): error C2143: syntax error: missing ';' before '&' 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(50,43): error C2334: unexpected token(s) preceding '{'; skipping apparent function body 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(58,19): error C3646: 'x': unknown override specifier 
F:\Feature-test\vcpkg\installed\x64-windows\include\skia\include\sksl\DSLVar.h(58,20): fatal error C1003: error count exceeds 100; stopping compilation 

Build All failed.

@JonLiu1993
Copy link
Member

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@JonLiu1993 JonLiu1993 marked this pull request as draft July 26, 2023 09:57
@JonLiu1993
Copy link
Member

JonLiu1993 commented Jul 26, 2023

Test feature skia[dawn,vulkan] successfully in the following triplet:

  • x64-windows
  • x64-windows-static

@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 26, 2023

@JonLiu1993 Error or successful? AFAIU you need to use C++17 - this is what the error message says, and this is what skia is using. This usage requirement isn't exposed by the CMake config, but this is not a regression.

@dg0yt dg0yt marked this pull request as ready for review July 26, 2023 13:35
@JonLiu1993
Copy link
Member

JonLiu1993 commented Jul 27, 2023

Ok, I successfully tested usage when I added set(CMAKE_CXX_STANDARD 17) to CMakeLists.txt :

1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Visual Studio 17 2022" -A x64  -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\usageTest\out\install\x64-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/Feature-test/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\usageTest" 2>&1"
1> Working directory: C:\Users\test\source\repos\usageTest\out\build\x64-Debug
1> [CMake] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
1> [CMake] -- The C compiler identification is MSVC 19.36.32537.0
1> [CMake] -- The CXX compiler identification is MSVC 19.36.32537.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Configuring done (7.4s)
1> [CMake] -- Generating done (0.0s)
1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/usageTest/out/build/x64-debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.

>------ Build All started: Project: usageTest, Configuration: x64-Debug ------
  MSBuild version 17.6.3+07e294721 for .NET Framework
  
    Checking Build System
    Building Custom Rule C:/Users/test/source/repos/usageTest/usageTest/CMakeLists.txt
    usageTest.cpp
    test.vcxproj -> C:\Users\test\source\repos\usageTest\out\build\x64-debug\usageTest\Debug\test.exe
    Building Custom Rule C:/Users/test/source/repos/usageTest/CMakeLists.txt

Build All succeeded.

@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label Jul 27, 2023
@BillyONeal BillyONeal merged commit f204b54 into microsoft:master Jul 27, 2023
15 checks passed
@BillyONeal
Copy link
Member

Thanks for debugging tricky cases for us @dg0yt @jimwang118 and @JonLiu1993 !

@dg0yt dg0yt deleted the skia branch July 27, 2023 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[skia] Build error
4 participants