[Webkit-unassigned] [Bug 183595] New: Cmake for static build of libjavascriptcoregtk and libwebkit2gtk fails: install TARGETS given no ARCHIVE DESTINATION for static library target "WebKit".

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 13 08:07:06 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=183595

            Bug ID: 183595
           Summary: Cmake for static build of  libjavascriptcoregtk and
                    libwebkit2gtk fails: install TARGETS given no ARCHIVE
                    DESTINATION for static library target  "WebKit".
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: didier at slint.fr
                CC: bugs-noreply at webkitgtk.org

Created attachment 335694

  --> https://bugs.webkit.org/attachment.cgi?id=335694&action=review

log of Cmake

Version: 2.20.0

I maintain the Slint distribution, cf. http://slint.fr

I want to make a bundle of yelp + a stripped down webkitgtk because Slint is a stable distribution thus I can't upgrade webkit often but don't want to put users at risk no doing so. I assume that there are few risks is webkit is only used by yelp, aka gnome-help, as we ship MATE of which several components can benefit

In that aim I tried to statically build striped down libjavascriptcoregtk and libwebkit2gtk.

Having read https://bugs.webkit.org/show_bug.cgi?id=181695 I patch the source files as in the patch pasted below:
==================================
diff -Naur webkitgtk-2.20.0/CMakeLists.txt webkitgtk-2.20.0.new/CMakeLists.txt
--- webkitgtk-2.20.0/CMakeLists.txt     2018-02-19 08:44:43.000000000 +0100
+++ webkitgtk-2.20.0.new/CMakeLists.txt 2018-03-13 10:26:05.257118833 +0100
@@ -129,10 +129,10 @@
 set(PAL_LIBRARY_TYPE STATIC)
 set(WebCore_LIBRARY_TYPE STATIC)
 set(WebKitLegacy_LIBRARY_TYPE SHARED)
-set(WebKit_LIBRARY_TYPE SHARED)
+set(WebKit_LIBRARY_TYPE STATIC)
 set(WebCoreTestSupport_LIBRARY_TYPE STATIC)

-set(CMAKE_POSITION_INDEPENDENT_CODE True)
+# set(CMAKE_POSITION_INDEPENDENT_CODE True)

 # -----------------------------------------------------------------------------
 # Install JavaScript shell
diff -Naur webkitgtk-2.20.0/Source/cmake/OptionsGTK.cmake webkitgtk-2.20.0.new/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.20.0/Source/cmake/OptionsGTK.cmake      2018-03-12 10:28:34.000000000 +0100
+++ webkitgtk-2.20.0.new/Source/cmake/OptionsGTK.cmake  2018-03-13 10:27:58.120795554 +0100
@@ -72,7 +72,7 @@
 # and the option is not relevant to any other WebKit ports.
 WEBKIT_OPTION_DEFINE(ENABLE_GLES2 "Whether to enable OpenGL ES 2.0." PUBLIC ${ENABLE_GLES2_DEFAULT})
 WEBKIT_OPTION_DEFINE(ENABLE_GTKDOC "Whether or not to use generate gtkdoc." PUBLIC OFF)
-WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC ON)
+WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC OFF)
 WEBKIT_OPTION_DEFINE(ENABLE_OPENGL "Whether to use OpenGL." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 "Whether to build WebKitPluginProcess2 to load GTK2 based plugins." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK3_SUPPORTS_QUARTZ})
@@ -374,7 +374,7 @@
 set(WebKit2_PKGCONFIG_FILE ${CMAKE_BINARY_DIR}/Source/WebKit/webkit2gtk-${WEBKITGTK_API_VERSION}.pc)
 set(WebKit2WebExtension_PKGCONFIG_FILE ${CMAKE_BINARY_DIR}/Source/WebKit/webkit2gtk-web-extension-${WEBKITGTK_API_VERSION}.pc)

-set(JavaScriptCore_LIBRARY_TYPE SHARED)
+# set(JavaScriptCore_LIBRARY_TYPE SHARED)
 set(SHOULD_INSTALL_JS_SHELL ON)

 # Add a typelib file to the list of all typelib dependencies. This makes it easy to
========================
I try then to configure as below:
========================
LIBDIRSUFFIX="64"
CFLAGS="-Wno-expansion-to-defined"
CXXFLAGS="-Wno-expansion-to-defined"
CXXFLAGS+=" -fno-delete-null-pointer-checks"
CFLAGS+=" -fno-delete-null-pointer-checks"
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=ON \
-DENABLE_DRAG_SUPPORT=OFF \
-DENABLE_GEOLOCATION=OFF \
-DENABLE_ICONDATABASE=OFF \
-DENABLE_INDEXED_DATABASE=OFF \
-DENABLE_NOTIFICATIONS=OFF \
-DENABLE_PLUGIN_PROCESS_GTK2=OFF \
-DENABLE_SPELLCHECK=OFF \
-DENABLE_VIDEO=OFF \
-DENABLE_WEBDRIVER=OFF \
-DENABLE_WEB_AUDIO=OFF \
-DENABLE_WEB_CRYPTO=OFF \
-DLIBEXEC_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}/webkit2gtk-4.0 \
-DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
-DPORT=GTK \
-DSHARED_CORE=OFF \
-DUSE_LIBHYPHEN=OFF \
-DUSE_LIBNOTIFY=OFF \
-DUSE_LIBSECRET=OFF \
-DUSE_SYSTEM_MALLOC=ON \
-DUSE_WOFF2=OFF \
.. 2>&1| tee ../../CONFIGLOGSTATIC-2.20.0
===================
But this fails with this error message:
===================
CMake Error at Source/WebKit/CMakeLists.txt:996 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "WebKit".
===================
I attach the output CONFIGLOGSTATIC-2.20.0.

Please advise, bearing in mind that I am not a developer, so do not hesitate to state the obvious.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180313/47caafe3/attachment-0001.html>


More information about the webkit-unassigned mailing list