RESOLVED FIXED 275735
REGRESSION(280217@main) CMake build failure after bump to cmake 3.20
https://bugs.webkit.org/show_bug.cgi?id=275735
Summary REGRESSION(280217@main) CMake build failure after bump to cmake 3.20
Lauro Moura
Reported 2024-06-21 06:59:12 PDT
280217@main added support for C++23 and bumped the minimum required CMake version to 3.20. This might have introduced some side effect, breaking the CMake in some conditions. For example: cd /app/webkit && /usr/bin/cmake -E env CC=/usr/bin/cc ... /app/webkit/Source/JavaScriptCore/API/glib/JSCWrapperMap.cpp /usr/lib/gcc/x86_64-unknown-linux-gnu/13.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lWPEWebKit-2.0: No such file or directory collect2: error: ld returned 1 exit status At first, I thought it could be related to this change from 3.20: https://cmake.org/cmake/help/latest/release/3.20.html#other-changes > Ninja generators now transform the DEPFILE generated by an add_custom_command(). See policy CMP0116 for details. But CMP0116 is already set to NEW in the root CMakeLists.txt (and changing to OLD does not change error).
Attachments
Lauro Moura
Comment 1 2024-06-21 07:46:48 PDT
Update: 3.19 is the first required cmake version that triggers the issue. Inspecting the generated build.ninja, there are a number of dependencies missing from a number of targets (generated headers, GIR files, etc). For example (< is 3.19, and > is 3.18): < build DerivedSources/WebKit/wpe/WebKitDefines.h | ${cmake_ninja_workdir}DerivedSources/WebKit/wpe/WebKitDefines.h: CUSTOM_COMMAND /app/webkit/Source/WebKit/UIProcess/API/glib/WebKitDefines.h.in /app/webkit/Source/WebKit/Scripts/glib/generate-api-header.py > build DerivedSources/WebKit/wpe/WebKitDefines.h | ${cmake_ninja_workdir}DerivedSources/WebKit/wpe/WebKitDefines.h: CUSTOM_COMMAND /app/webkit/Source/WebKit/UIProcess/API/glib/WebKitDefines.h.in /app/webkit/Source/WebKit/Scripts/glib/generate-api-header.py || Source/JavaScriptCore/Bytecodes Source/JavaScriptCore/JSC-fake-api-headers Source/JavaScriptCore/JSCBuiltins Source/JavaScriptCore/JavaScriptCore Source/JavaScriptCore/JavaScriptCoreSharedScripts Source/JavaScriptCore/JavaScriptCore_CopyHeaders Source/JavaScriptCore/JavaScriptCore_CopyPrivateHeaders Source/JavaScriptCore/LowLevelInterpreterLib Source/ThirdParty/ANGLE/ANGLE-webgl-headers Source/ThirdParty/ANGLE/LibGLESv2EntryPointsHeaders Source/ThirdParty/ANGLE/include/ANGLEWebGLHeaders Source/WTF/wtf/WTF Source/WTF/wtf/WTF_CopyHeaders Source/WTF/wtf/WTF_CopyPreferences Source/WebCore/PAL/pal/PAL_CopyHeaders Source/WebCore/WebCore Source/WebCore/WebCoreBindings Source/WebCore/WebCore_CopyPrivateHeaders Source/WebInspectorUI/WebInspectorUI Source/WebKit/WPEPlatform/WPEPlatformGeneratedEnumTypesHeader Source/WebKit/WPEPlatform/wpe/drm/WPEPlatformDRM Source/WebKit/WPEPlatform/wpe/headless/WPEPlatformHeadless Source/WebKit/WPEPlatform/wpe/wayland/WPEPlatformWayland Source/WebKit/WebKit-build-revision Source/WebKit/webkitwpe-fake-api-headers Source/WebKit/webkitwpe-forwarding-headers Source/bmalloc/bmalloc Source/bmalloc/bmalloc_CopyHeaders bin/LLIntOffsetsExtractor bin/LLIntSettingsExtractor lib/libANGLE.a lib/libGLESv2.a lib/libPAL.a lib/libSkia.a lib/libSysProfCapture.a lib/libWPEPlatform-2.0.so lib/libxdgmime.a
Lauro Moura
Comment 2 2024-06-21 08:00:19 PDT
It's related to CMP0112, enforced by CMake minimum 3.19: https://cmake.org/cmake/help/latest/policy/CMP0112.html#policy:CMP0112 > Target file component generator expressions do not add target dependencies. I'm opening a separate issue to properly fix this and will submit a patch reverting CMP0112 to the OLD behavior for now.
Lauro Moura
Comment 3 2024-06-21 08:20:44 PDT
EWS
Comment 4 2024-06-21 08:36:04 PDT
Committed 280248@main (f282a958f4e4): <https://commits.webkit.org/280248@main> Reviewed commits have been landed. Closing PR #30044 and removing active labels.
Lauro Moura
Comment 5 2024-06-21 08:40:01 PDT
*** Bug 275736 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.