Title: [149169] trunk/Source/WebKit2
Revision
149169
Author
zandober...@gmail.com
Date
2013-04-25 23:50:05 -0700 (Thu, 25 Apr 2013)

Log Message

[GTK] Plugin process broken due to a missing symbol
https://bugs.webkit.org/show_bug.cgi?id=114901

Reviewed by Gustavo Noronha Silva.

Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
are specified in various ways.

The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
gamepad dependencies' libraries are also added to the binary's LDADD list.

* GNUmakefile.am:
* GNUmakefile.list.am: Add a few missing files to the build.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (149168 => 149169)


--- trunk/Source/WebKit2/ChangeLog	2013-04-26 06:23:53 UTC (rev 149168)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-26 06:50:05 UTC (rev 149169)
@@ -1,3 +1,22 @@
+2013-04-25  Zan Dobersek  <zdober...@igalia.com>
+
+        [GTK] Plugin process broken due to a missing symbol
+        https://bugs.webkit.org/show_bug.cgi?id=114901
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
+        multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
+        references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
+        are specified in various ways.
+
+        The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
+        this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
+        gamepad dependencies' libraries are also added to the binary's LDADD list.
+
+        * GNUmakefile.am:
+        * GNUmakefile.list.am: Add a few missing files to the build.
+
 2013-04-24  Chris Fleizach  <cfleiz...@apple.com>
 
         WEB SPEECH: language support does not work as expected

Modified: trunk/Source/WebKit2/GNUmakefile.am (149168 => 149169)


--- trunk/Source/WebKit2/GNUmakefile.am	2013-04-26 06:23:53 UTC (rev 149168)
+++ trunk/Source/WebKit2/GNUmakefile.am	2013-04-26 06:50:05 UTC (rev 149169)
@@ -649,23 +649,63 @@
 
 Programs_WebKitPluginProcess_LDADD = \
 	-lpthread \
-	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
-	libWebCore.la
+	libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la
 
+# FIXME: Due to layer violations and circular dependencies all these libraries have to be specified multiple times
+# when invoking the linker. This ensures any undefined symbols are resolved when linking. See wkb.ug/114901 for more detail.
+# First time around these libraries are simply listed by their file name that's later resolved to the path of the *.a archive
+# (i.e. .libs/libPlatformGtk2.a) by libtool.
+Programs_WebKitPluginProcess_LDADD += \
+	libPlatformGtk2.la \
+	libWebCoreGtk2.la \
+	libPlatform.la \
+	libWebCorePlatform.la \
+	libWebCore.la \
+	libWebCoreModules.la \
+	libWebKit2Platform.la
+if ENABLE_INDEXED_DATABASE
+Programs_WebKitPluginProcess_LDADD += \
+	libLevelDB.la
+endif
+if USE_OPENGL
+Programs_WebKitPluginProcess_LDADD += \
+	libANGLE.la
+endif
 if ENABLE_SVG
 Programs_WebKitPluginProcess_LDADD += \
 	libWebCoreSVG.la
 endif
 
+# FIXME: Second time around all the libraries are relisted, this time in the -lNAME form. Listed items are resolved into the
+# absolute paths to the *.a archive (i.e. $(abs_builddir)/.libs.libPlatformGtk2.a) by libtool.
 Programs_WebKitPluginProcess_LDADD += \
-	libPlatform.la \
-	libPlatformGtk2.la \
-	libWebCoreModules.la \
-	libWebCoreGtk2.la \
-	libWebCorePlatform.la \
-	libWebKit2Platform.la \
+	-lPlatformGtk2 -lWebCoreGtk2 -lPlatform -lWebCorePlatform -lWebCore -lWebCoreModules
+if ENABLE_INDEXED_DATABASE
+Programs_WebKitPluginProcess_LDADD += \
+	-lLevelDB
+endif
+if USE_OPENGL
+Programs_WebKitPluginProcess_LDADD += \
+	-lANGLE
+endif
+if ENABLE_SVG
+Programs_WebKitPluginProcess_LDADD += \
+	-lWebCoreSVG
+endif
+
+# FIXME: To make the matter worse, these four libraries are again required to be listed for linking. This time they're added by
+# specifying the symbolic link that points back to the ./lib*.la libtool archives which are again resolved into paths to the
+# *.a archives (i.e. .libs/libPlatformGtk2.la) by libtool. Phony targets are added for these files to prevent Automake to try
+# to build them as these symlinks are just a byproduct of libtool.
+.PHONY : .libs/libPlatformGtk2.la .libs/libWebCoreGtk2.la .libs/libPlatform.la .libs/libWebCorePlatform.la
+Programs_WebKitPluginProcess_LDADD += \
+	.libs/libPlatformGtk2.la .libs/libWebCoreGtk2.la .libs/libPlatform.la .libs/libWebCorePlatform.la
+
+Programs_WebKitPluginProcess_LDADD += \
 	$(CAIRO_LIBS) \
 	$(COVERAGE_LDFLAGS) \
+	$(FREETYPE_LIBS) \
+	$(GAMEPAD_LIBS) \
 	$(GEOCLUE_LIBS) \
 	$(GLIB_LIBS) \
 	$(GSTREAMER_LIBS) \
@@ -689,13 +729,6 @@
 	$(WINMM_LIBS) \
 	$(ZLIB_LIBS)
 
-# libWebCore and libWebCoreModules have circular dependencies that only seem to
-# be a problem when linking the plugin process; we don't really care about
-# modules for the plugin process, though, so to work around that we ignore
-# internal unresolved symbols
-Programs_WebKitPluginProcess_LDFLAGS = \
-	-Wl,--unresolved-symbols=ignore-in-object-files
-
 Programs_WebKitPluginProcess_CXXFLAGS = \
 	-fvisibility-inlines-hidden \
 	$(global_cxxflags)

Modified: trunk/Source/WebKit2/GNUmakefile.list.am (149168 => 149169)


--- trunk/Source/WebKit2/GNUmakefile.list.am	2013-04-26 06:23:53 UTC (rev 149168)
+++ trunk/Source/WebKit2/GNUmakefile.list.am	2013-04-26 06:50:05 UTC (rev 149169)
@@ -1300,7 +1300,12 @@
 	Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp \
 	Source/WebKit2/Shared/gtk/WebEventFactory.cpp \
 	Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp \
+	Source/WebKit2/Shared/soup/PlatformCertificateInfo.cpp \
+	Source/WebKit2/Shared/soup/PlatformCertificateInfo.h \
 	Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp \
+	Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp \
+	Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h \
+	Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp \
 	Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp \
 	Source/WebKit2/WebProcess/Plugins/Plugin.cpp \
 	Source/WebKit2/WebProcess/Plugins/Plugin.h \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to