• x86_64 ubuntu22.04 源码编译WebKit-7615.3.12.11.3


    Index of /releases

    https://github.com/WebKit/WebKit

    sudo apt install build-essential

    yeqiang@yeqiang-MS-7B23:/data/WebKit-7615.3.12.11.3/build$ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) 

    1. mkdir build
    2. cd build
    3. cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..

    CMake Error at Source/cmake/WebKitCommon.cmake:197 (message):
      Ruby 1.9 or higher is required.
    Call Stack (most recent call first):
      CMakeLists.txt:25 (include)

     

    sudo apt install ruby


    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find LibGcrypt (missing: LibGcrypt_LIBRARY LibGcrypt_INCLUDE_DIR
      LibGcrypt_GpgError_LIBRARY LibGcrypt_GpgError_INCLUDE_DIR) (Required is at
      least version "1.6.0")
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindLibGcrypt.cmake:115 (find_package_handle_standard_args)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsGTK.cmake:19 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install libgcrypt20-dev

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find SQLite3 (missing: SQLite3_LIBRARY SQLite3_INCLUDE_DIR)
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindSQLite3.cmake:84 (find_package_handle_standard_args)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsGTK.cmake:26 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install -y libsqlite3-dev


     

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Unifdef (missing: UNIFDEF_EXECUTABLE)
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindUnifdef.cmake:12 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsGTK.cmake:28 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install -y unifdef


     

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find WebP (missing: WebP_INCLUDE_DIR WebP_LIBRARY
      _WebP_REQUIRED_LIBS_FOUND)
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindWebP.cmake:133 (find_package_handle_standard_args)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsGTK.cmake:30 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install -y libwebp-dev


    CMake Error at Source/cmake/OptionsGTK.cmake:221 (message):
      libsoup 3 is required.  Enable USE_SOUP2 to use libsoup 2 (disables HTTP/2)
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install -y libsoup-3.0-dev
    

    CMake Error at Source/cmake/OptionsGTK.cmake:314 (message):
      libmanette is required for ENABLE_GAMEPAD
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    1. # sudo apt install udev
    2. sudo apt install -y libmanette-0.2-dev

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find LibXslt (missing: LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
      (Required is at least version "1.1.7")
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      /usr/share/cmake-3.22/Modules/FindLibXslt.cmake:108 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsGTK.cmake:320 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install -y libxslt1-dev

    CMake Error at CMakeLists.txt:14 (project):
      Running

       '/usr/bin/ninja' '--version'

      failed with:

       No such file or directory
     

    sudo apt install ninja-build

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find GBM (missing: GBM_LIBRARIES GBM_INCLUDE_DIR)
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindGBM.cmake:24 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsWPE.cmake:17 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install libgbm-dev

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find LibDRM (missing: LIBDRM_LIBRARIES LIBDRM_INCLUDE_DIR)
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindLibDRM.cmake:25 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsWPE.cmake:21 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install -y libdrm-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:326 (message):
      libsecret is needed for USE_LIBSECRET
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install libsecret-1-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:332 (message):
      GObjectIntrospection is needed for ENABLE_INTROSPECTION.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install gobject-introspection

    CMake Error at Source/cmake/OptionsGTK.cmake:337 (message):
      ENABLE_INTROSPECTION is needed for gi-docgen.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install gi-docgen

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Libtasn1 (missing: LIBTASN1_LIBRARIES)
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindLibtasn1.cmake:45 (find_package_handle_standard_args)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/OptionsGTK.cmake:341 (find_package)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libtasn1-6-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:392 (message):
      libwpe is required for ENABLE_WAYLAND_TARGET
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install libwpe-1.0-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:437 (message):
      Enchant is needed for ENABLE_SPELLCHECK
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     

    sudo apt install libenchant-2-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:460 (message):
      libXt is required for ENABLE_X11_TARGET
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libxt-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:487 (message):
      libhyphen is needed for USE_LIBHYPHEN.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

     sudo apt install libhyphen-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:494 (message):
      libopenjpeg 2.2.0 is required for USE_OPENJPEG.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libopenjp2-7-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:501 (message):
      libwoff2dec is needed for USE_WOFF2.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libwoff-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:508 (message):
      libavif 0.9.0 is required for USE_AVIF.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libavif-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:515 (message):
      libsystemd or libelogind are needed for ENABLE_JOURNALD_LOG
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libsystemd-dev

    CMake Error at Source/cmake/OptionsGTK.cmake:526 (message):
      libcms2 is required for USE_LCMS.
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install liblcms2-dev

    CMake Error at Source/cmake/BubblewrapSandboxChecks.cmake:9 (message):
      libseccomp is needed for ENABLE_BUBBLEWRAP_SANDBOX
    Call Stack (most recent call first):
      Source/cmake/OptionsGTK.cmake:571 (include)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libseccomp-dev

    CMake Error at Source/cmake/GStreamerChecks.cmake:43 (message):
      WebAudio requires the audio and fft GStreamer libraries.  Please check your
      gst-plugins-base installation.
    Call Stack (most recent call first):
      Source/cmake/OptionsGTK.cmake:572 (include)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install -y libgstreamer-plugins-base1.0-dev

    CMake Error at Source/cmake/GStreamerChecks.cmake:62 (message):
      GStreamerTranscoder >= 1.20 is needed for USE_GSTREAMER_TRANSCODER.
    Call Stack (most recent call first):
      Source/cmake/OptionsGTK.cmake:572 (include)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    sudo apt install libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-bad1.0-dev

    CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find Gperf (missing: GPERF_EXECUTABLE) (Required is at least
      version "3.0.1")
    Call Stack (most recent call first):
      /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      Source/cmake/FindGperf.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
      Source/cmake/WebKitCommon.cmake:234 (find_package)
      CMakeLists.txt:25 (include)

    apt install gperf

    CMake Error in Source/WebCore/CMakeLists.txt:
      Imported target "WPE::libwpe" includes non-existent path

        "/usr/include/wpe-1.0"

      in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

      * The path was deleted, renamed, or moved to another location.

      * An install or uninstall procedure did not complete successfully.

      * The installation package was faulty and references files it does not
      provide.

     

    sudo apt install libwpe-1.0-dev

    cmake成功

    yeqiang@yeqiang-MS-7B23:/data/WebKit-7615.3.12.11.3/build$ cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
    -- The CMake build type is: RelWithDebInfo
    -- Could NOT find Ruby (missing: Ruby_INCLUDE_DIR Ruby_LIBRARY Ruby_CONFIG_INCLUDE_DIR) (found suitable version "3.0.2", minimum required is "1.9")
    -- Enabling ccache: Couldn't find ccache program. Not enabling it.
    -- Performing Test C_COMPILER_SUPPORTS_-fmax-errors=20
    -- Performing Test C_COMPILER_SUPPORTS_-fmax-errors=20 - Success
    -- Performing Test CXX_COMPILER_SUPPORTS_-fmax-errors=20
    -- Performing Test CXX_COMPILER_SUPPORTS_-fmax-errors=20 - Success
    -- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always
    -- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
    -- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always
    -- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
    -- Linker variant in use: BFD 
    --   Linker supports thin archives - TRUE
    --   Linker supports split debug info - TRUE
    --   Linker supports --gdb-index - FALSE
    --   Linker supports --disable-new-dtags - TRUE
    -- Archiver variant in use: BFD
    --   Archiver supports thin archives - TRUE
    -- Found the following HarfBuzz libraries:
    --  HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
    --  ICU (required): /usr/lib/x86_64-linux-gnu/libharfbuzz-icu.so
    -- Found the following ICU libraries:
    --   data (required)
    --   i18n (required)
    --   uc (required)
    -- Found the following WebP libraries:
    --  WebP (required): /usr/lib/x86_64-linux-gnu/libwebp.so
    --  demux (required): /usr/lib/x86_64-linux-gnu/libwebpdemux.so
    -- Disabling USE_GSTREAMER_WEBRTC since ENABLE_WEB_RTC is disabled.
    -- Checking for module 'gobject-introspection-1.0'
    --   No package 'gobject-introspection-1.0' found
    -- Checking for module 'gobject-introspection-1.0'
    --   No package 'gobject-introspection-1.0' found
    -- Found the following WOFF2 libraries:
    --  WOFF2 (required): /usr/lib/x86_64-linux-gnu/libwoff2common.so
    --  dec (required): /usr/lib/x86_64-linux-gnu/libwoff2dec.so
    -- Checking for module 'gstreamer-full-1.0>=1.17.0'
    --   No package 'gstreamer-full-1.0' found
    -- Platform-specific CMakeLists not found: /data/WebKit-7615.3.12.11.3/Source/bmalloc/PlatformGTK.cmake
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/WTF/wtf/PlatformGTK.cmake
    -- Copying generate-unified-source-bundles.rb to: /data/WebKit-7615.3.12.11.3/build/WTF/Scripts
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/PlatformGTK.cmake
    -- Performing Test CXX_COMPILER_SUPPORTS_-ffp-contract=off
    -- Performing Test CXX_COMPILER_SUPPORTS_-ffp-contract=off - Success
    -- Enabling asm postprocessing
    -- Using source list file: Sources.txt
    -- Using source list file: inspector/remote/SourcesGLib.txt
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/shell/PlatformGTK.cmake
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/ThirdParty/ANGLE/PlatformGTK.cmake
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/WebInspectorUI/PlatformGTK.cmake
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/WebCore/PAL/pal/PlatformGTK.cmake
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/WebCore/PlatformGTK.cmake
    -- Using source list file: Sources.txt
    -- Using source list file: platform/SourcesCairo.txt
    -- Using source list file: platform/SourcesGCrypt.txt
    -- Using source list file: platform/SourcesSoup.txt
    -- Using source list file: SourcesGTK.txt
    -- Using source list file: platform/SourcesGLib.txt
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/WebKit/PlatformGTK.cmake
    -- Using source list file: Sources.txt
    -- Using source list file: Platform/Sources.txt
    -- Using source list file: SourcesGTK.txt
    -- Using source list file: SourcesGTKDeprecated.txt
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/WebDriver/PlatformGTK.cmake
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Source/PlatformGTK.cmake
    -- Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE) 
    -- Using platform-specific CMakeLists: /data/WebKit-7615.3.12.11.3/Tools/PlatformGTK.cmake
    -- Enabled features:
    --  ENABLE_BUBBLEWRAP_SANDBOX ..................... ON
    --  ENABLE_DOCUMENTATION                            ON
    --  ENABLE_DRAG_SUPPORT ........................... ON
    --  ENABLE_GAMEPAD                                  ON
    --  ENABLE_GLES2 .................................. OFF
    --  ENABLE_INTROSPECTION                            ON
    --  ENABLE_JOURNALD_LOG ........................... ON
    --  ENABLE_MEDIA_SOURCE                             ON
    --  ENABLE_MINIBROWSER ............................ ON
    --  ENABLE_PDFJS                                    ON
    --  ENABLE_QUARTZ_TARGET .......................... OFF
    --  ENABLE_SPELLCHECK                               ON
    --  ENABLE_TOUCH_EVENTS ........................... ON
    --  ENABLE_VIDEO                                    ON
    --  ENABLE_WAYLAND_TARGET ......................... ON
    --  ENABLE_WEBDRIVER                                ON
    --  ENABLE_WEB_AUDIO .............................. ON
    --  ENABLE_WEB_CRYPTO                               ON
    --  ENABLE_X11_TARGET ............................. ON
    --  USE_AVIF                                        ON
    --  USE_GBM ....................................... ON
    --  USE_GTK4                                        OFF
    --  USE_JPEGXL .................................... OFF
    --  USE_LCMS                                        ON
    --  USE_LIBHYPHEN ................................. ON
    --  USE_LIBSECRET                                   ON
    --  USE_OPENGL_OR_ES .............................. ON
    --  USE_OPENJPEG                                    ON
    --  USE_SOUP2 ..................................... OFF
    --  USE_WOFF2                                       ON
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /data/WebKit-7615.3.12.11.3/build
     

    ninja构建

    yeqiang@yeqiang-MS-7B23:/data/WebKit-7615.3.12.11.3/build$ ninja

    ninja: error: '/usr/lib/x86_64-linux-gnu/libWPEBackend-fdo-1.0.so', needed by 'lib/libwebkit2gtk-4.1.so.0.6.2', missing and no known rule to make it
     

    sudo apt install libwpebackend-fdo-1.0-1

    FAILED: Source/WebCore/platform/gtk/po/WebKitGTK-4.1.pot /data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po/WebKitGTK-4.1.pot 
    cd /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/gtk && xgettext --default-domain=WebKitGTK-4.1 --add-comments --msgid-bugs-address="http://bugs.webkit.org" --files-from=/data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po/POTFILES --package-version=2.39.6 --package-name="webkitgtk" --keyword=_ --keyword=N_ --keyword=WEB_UI_FORMAT_STRING:1 --keyword=WEB_UI_STRING:1 --keyword=WEB_UI_STRING_KEY:3c,1 --keyword=WEB_UI_STRING_WITH_MNEMONIC:2 --from-code=UTF-8 -o /data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po/WebKitGTK-4.1.pot
    /bin/sh: 1: xgettext: not found
    [1837/6814] Generate bindings (WebCoreBindings)
    ninja: build stopped: subcommand failed.
     

    sudo apt install gettext

    FAILED: Source/WebCore/platform/gtk/po/ar.gmo /data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po/ar.gmo 
    cd /data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po && : --quiet --update --backup=none -s /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/gtk/po/ar.po /data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po/WebKitGTK-4.1.pot && GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND -o /data/WebKit-7615.3.12.11.3/build/Source/WebCore/platform/gtk/po/ar.gmo /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/gtk/po/ar.po
    /bin/sh: 1: GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND: not found

    1. # 安装完gettext后,重新cmake
    2. yeqiang@yeqiang-MS-7B23:/data/WebKit-7615.3.12.11.3/build$ cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
    3. yeqiang@yeqiang-MS-7B23:/data/WebKit-7615.3.12.11.3/build$ ninja

    FAILED: JavaScriptCore-4.1.gir /data/WebKit-7615.3.12.11.3/build/JavaScriptCore-4.1.gir 
    cd /data/WebKit-7615.3.12.11.3 && /usr/bin/cmake -E env CC=/usr/bin/cc "CFLAGS=-fdiagnostics-color=always -Wextra -Wall -pipe -fmax-errors=20 -Wno-expansion-to-defined -Wno-uninitialized -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare  -fno-strict-aliasing -fno-exceptions" /usr/bin/g-ir-scanner --quiet --warn-all --warn-error --no-libtool --output=/data/WebKit-7615.3.12.11.3/build/JavaScriptCore-4.1.gir --library=javascriptcoregtk-4.1 --library-path=/data/WebKit-7615.3.12.11.3/build/lib --namespace=JavaScriptCore --nsversion=4.1 --c-include=jsc/jsc.h --identifier-prefix=JSC --symbol-prefix=jsc --pkg-export=javascriptcoregtk-4.1 -DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DBUILDING_WEBKIT=1 -DHAVE_CONFIG_H=1 -DPAS_BMALLOC=1 -DBUILDING_GTK__=1 -DGETTEXT_PACKAGE=\"WebKitGTK-4.1\" -DJSC_GLIB_API_ENABLED -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DSTATICALLY_LINKED_WITH_WTF -DSTATICALLY_LINKED_WITH_bmalloc -I/data/WebKit-7615.3.12.11.3/build/JavaScriptCore/Headers --include=GObject-2.0 --pkg=gobject-2.0 -I/data/WebKit-7615.3.12.11.3/build/JavaScriptCore/Headers -I/data/WebKit-7615.3.12.11.3/build/JavaScriptCore/PrivateHeaders -I/data/WebKit-7615.3.12.11.3/build/JavaScriptCoreGLib/Headers -I/data/WebKit-7615.3.12.11.3/build/JavaScriptCoreGLib/DerivedSources /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCAutocleanups.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCClass.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCContext.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCDefines.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCException.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCOptions.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCValue.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCVirtualMachine.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCWeakValue.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/jsc.h /data/WebKit-7615.3.12.11.3/build/JavaScriptCoreGLib/DerivedSources/jsc/JSCVersion.h /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/runtime/CachedTypes.cpp /data/WebKit-7615.3.12.11.3/build/JavaScriptCore/DerivedSources/JSCBytecodeCacheVersion.cpp /data/WebKit-7615.3.12.11.3/build/JavaScriptCore/DerivedSources/JSCBuiltins.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSAPIWrapperGlobalObject.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSAPIWrapperObjectGLib.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCCallbackFunction.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCClass.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCContext.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCException.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCOptions.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCValue.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCVersion.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCVirtualMachine.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCWeakValue.cpp /data/WebKit-7615.3.12.11.3/Source/JavaScriptCore/API/glib/JSCWrapperMap.cpp
    Couldn't find include 'GObject-2.0.gir' (search path: '['/usr/share', '/usr/share/ubuntu/gir-1.0', '/usr/share/gnome/gir-1.0', '/usr/local/share/gir-1.0', '/usr/share/gir-1.0', '/var/lib/snapd/desktop/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gir-1.0']')
    [476/4982] Generating ../../JavaScriptCore/PrivateHeaders/JavaScriptCore/CallFrameShuffleData.h
    ninja: build stopped: subcommand failed.
     

    1. sudo apt install libgirepository1.0-dev
    2. cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
    3. ninja

    注,搜索方法

    1. yeqiang@yeqiang-MS-7B23:/data/WebKit-7615.3.12.11.3/build$ apt-file search gir-1.0 | grep -i gobj
    2. libgirepository1.0-dev: /usr/share/gir-1.0/GObject-2.0.gir

    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:849:73: error: cannot convert ‘WTF::WeakPtr’ to ‘WebCore::MediaPlayer*’
      849 |         webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), m_player, m_referrer);
          |                                                                         ^~~~~~~~
          |                                                                         |
          |                                                                         WTF::WeakPtr
    In file included from /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:48:
    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:56:48: note:   initializing argument 2 of ‘void webKitWebSrcSetMediaPlayer(WebKitWebSrc*, WebCore::MediaPlayer*, const WTF::String&)’
       56 | void webKitWebSrcSetMediaPlayer(WebKitWebSrc*, WebCore::MediaPlayer*, const String&);
     

    1. sudo apt install gcc-10 g++-10
    2. cd ..
    3. rm build -rf
    4. cd build
    5. export CC=/usr/bin/gcc-10
    6. export CXX=/usr/bin/g++-10
    7. cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
    8. ninja

    CMake Error at Source/cmake/OptionsGTK.cmake:397 (message):
      WPEBackend-fdo is required for ENABLE_WAYLAND_TARGET
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)
     

    sudo apt install -y libwpebackend-fdo-1.0-dev

    故障依旧

    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:849:73: error: cannot convert ‘WTF::WeakPtr’ to ‘WebCore::MediaPlayer*’
      849 |         webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), m_player, m_referrer);

          |                                                                         ^~~~~~~~
          |                                                                         |
          |                                                                         WTF::WeakPtr
    In file included from /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:48:
    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:56:48: note:   initializing argument 2 of ‘void webKitWebSrcSetMediaPlayer(WebKitWebSrc*, WebCore::MediaPlayer*, const WTF::String&)’
       56 | void webKitWebSrcSetMediaPlayer(WebKitWebSrc*, WebCore::MediaPlayer*, const String&);
          |                                                ^~~~~~~~~~~~~~~~~~~~~
    [36/3666] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/image-decoders/bmp/BMPImageDecoder.cpp.o
     

    修改849行代码

    webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), WeakPtr(m_player).get(), m_referrer);

    换clang-16

    CMake Error at Source/cmake/GStreamerChecks.cmake:43 (message):
      WebAudio requires the audio and fft GStreamer libraries.  Please check your
      gst-plugins-base installation.

    Call Stack (most recent call first):
      Source/cmake/OptionsGTK.cmake:572 (include)
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:25 (include)

    1. sudo apt install libunwind-dev
    2. sudo apt install libgstreamer-plugins-base1.0-dev

    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:849:9: error: no matching function for call to 'webKitWebSrcSetMediaPlayer'
            webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), m_player, m_referrer);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:56:6: note: candidate function not viable: no known conversion from 'WeakPtr' to 'WebCore::MediaPlayer *' for 2nd argument
    void webKitWebSrcSetMediaPlayer(WebKitWebSrc*, WebCore::MediaPlayer*, const String&);
         ^

    /data/WebKit-7615.3.12.11.3/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1519:71: error: cannot pass object of non-trivial type 'WeakPtr' through variadic function; call will abort at runtime [-Wnon-pod-varargs]
            gst_structure_set(contextStructure, "player", G_TYPE_POINTER, m_player, nullptr);
                                                                          ^
    2 errors generated.
    [69/3677] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/texmap/TextureMapperGL.cpp.o
    ninja: build stopped: subcommand failed.
     

    修改源码,差异如下

    diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    index 5cdbb96cc6..335406c6c0 100644
    --- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    +++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    @@ -846,7 +846,7 @@ void MediaPlayerPrivateGStreamer::sourceSetup(GstElement* sourceElement)
         m_source = sourceElement;
     
         if (WEBKIT_IS_WEB_SRC(m_source.get())) {
    -        webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), m_player, m_referrer);
    +        webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), m_player.get(), m_referrer);
     #if ENABLE(MEDIA_STREAM)
         } else if (WEBKIT_IS_MEDIA_STREAM_SRC(sourceElement)) {
             auto stream = m_streamPrivate.get();
    @@ -1516,7 +1516,7 @@ bool MediaPlayerPrivateGStreamer::handleNeedContextMessage(GstMessage* message)
             GstStructure* contextStructure = gst_context_writable_structure(context.get());
     
             ASSERT(m_player);
    -        gst_structure_set(contextStructure, "player", G_TYPE_POINTER, m_player, nullptr);
    +        gst_structure_set(contextStructure, "player", G_TYPE_POINTER, m_player.get(), nullptr);
             gst_element_set_context(GST_ELEMENT(GST_MESSAGE_SRC(message)), context.get());
             return true;
         }
     

    CMake Error at Source/cmake/OptionsGTK.cmake:424 (message):
      libjxl is required for USE_JPEGXL
    Call Stack (most recent call first):
      Source/cmake/WebKitCommon.cmake:228 (include)
      CMakeLists.txt:21 (include)
    手动编译

    https://github.com/libjxl/libjxl

    或者安装包

    https://github.com/libjxl/libjxl/releases/download/v0.8.2/jxl-debs-amd64-ubuntu-22.04-v0.8.2.tar.gz

    成功编译

    https://webkitgtk.org/releases/webkitgtk-2.42.1.tar.xz

    以后找代码第一时间还是看官网,github上说明太少,一开始就用错了分支。

  • 相关阅读:
    (附源码)计算机毕业设计SSM基于的楼盘销售系统的设计与实现
    elasticsearch基本操作
    基于JAVA基于Web的社区商超系统的设计与实现计算机毕业设计源码+系统+mysql数据库+lw文档+部署
    NLP领域可以投稿的期刊(2022整理)
    OpenCV图像特征提取学习三,LBP图像特征检测算法
    官宣!CNCF 正式接受 Istio 成为孵化项目
    原型制作的软件 Experience Design mac( XD ) 中文版软件特色
    第 3 章 栈和队列 (非循环队列)
    docker 部署springboot(成功、截图)
    【JAVA】Web服务器—Tomcat
  • 原文地址:https://blog.csdn.net/hknaruto/article/details/133156857