Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8306887

Error C2327 while compiling WebKit on Windows with Visual Studio 2022 17.5

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • tbd
    • jfx21
    • javafx
    • None
    • web
    • x86_64
    • windows_10

      Recent releases of Visual Studio 2022, currently at version 17.5.4, print the following error when compiling WebKit on Windows for the gradle task ':web:compileNativeWin':

        MediaCapabilities.cpp(324): error C2327:
          'WebCore::MediaCapabilities::m_encodingTasks':
            is not a type name, static, or enumerator

      The build fails due to the error.

      SYSTEM / OS / JAVA RUNTIME INFORMATION

      The following build tools were used:

      - cmake version 3.26.3
      - Visual Studio Community 2022 version 17.5.4, build number 17.5.33530.505
      - OpenJDK Runtime Environment (build 19.0.2+7-44)
      - Apache Ant(TM) version 1.10.13 compiled on January 4 2023

      STEPS TO REPRODUCE

      Build a simulated release of JavaFX as follows:

      $ bash gradlew --no-daemon -PCONF=Release -PPROMOTED_BUILD_NUMBER=12 \
        -PHUDSON_BUILD_NUMBER=101 -PHUDSON_JOB_NAME=jfx -PCOMPILE_WEBKIT=true \
        -PCOMPILE_MEDIA=true -PBUILD_LIBAV_STUBS=true sdk jmods javadoc

      EXPECTED RESULTS

      The build should succeed.

      ACTUAL RESULT

      The build fails with the messages:

      ----------
      > Task :web:compileNativeWin FAILED

      FAILURE: Build failed with an exception.

      * Where:
      Build file 'C:\cygwin64\home\john\src\jfx\build.gradle' line: 3628

      * What went wrong:
      Execution failed for task ':web:compileNativeWin'.
      > Process 'command 'perl'' finished with non-zero exit value 1

        ...

      BUILD FAILED in 2m 12s
      65 actionable tasks: 13 executed, 52 up-to-date
      ----------

      See the attached log file for details.

      SOURCE CODE FOR AN EXECUTABLE TEST CASE

      None.

      WORKAROUND

      One workaround is to downgrade to Visual Studio Build Tools 2022 version 17.1.0, build number 17.1.32210.238, which builds the WebKit library without errors. This version is available on the following page in the table entry dated February 15, 2022:

      Visual Studio 2022 Release History: Fixed version bootstrappers
      https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history#fixed-version-bootstrappers

            hmeda Hima Bindu Meda
            jgneff John Neffenger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: