RESOLVED FIXED 79877
[GTK] zlib link error with --enable-webkit2
https://bugs.webkit.org/show_bug.cgi?id=79877
Summary [GTK] zlib link error with --enable-webkit2
Joone Hur
Reported 2012-02-28 23:09:54 PST
I'm not sure if this is a common problem for all. /bin/mkdir -p ./.deps/DerivedSources CXXLD Programs/WebKitWebProcess ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateReset' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateBound' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'uncompress' collect2: ld returned 1 exit status make[1]: *** [Programs/WebKitWebProcess] Error 1
Attachments
Proposed Patch (2.10 KB, patch)
2012-03-04 07:08 PST, Joone Hur
pnormand: review+
webkit.review.bot: commit-queue-
Updated Patch2 (2.57 KB, patch)
2012-03-04 20:18 PST, Joone Hur
no flags
Proposed Patch3 (1.58 KB, patch)
2012-03-05 06:24 PST, Joone Hur
no flags
Joone Hur
Comment 1 2012-03-04 06:42:55 PST
When running make -j4, CXXLD Programs/WebKit2APITests/TestPrinting ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateReset' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateBound' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'uncompress' collect2: ld returned 1 exit status make[1]: *** [Programs/WebKit2APITests/TestBackForwardList] Error 1 make[1]: *** Waiting for unfinished jobs.... ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateReset' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateBound' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'uncompress' collect2: ld returned 1 exit status make[1]: *** [Programs/WebKit2APITests/TestDownloads] Error 1 ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateReset' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateBound' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'uncompress' collect2: ld returned 1 exit status make[1]: *** [Programs/WebKit2APITests/TestLoaderClient] Error 1 ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateReset' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateInit2_' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflateEnd' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'inflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflateBound' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'deflate' ./.libs/libwebkit2gtk-3.0.so: error: undefined reference to 'uncompress' collect2: ld returned 1 exit status make[1]: *** [Programs/WebKit2APITests/TestPrinting] Error 1
Joone Hur
Comment 2 2012-03-04 07:08:09 PST
Created attachment 130024 [details] Proposed Patch My linker version is GNU gold (GNU Binutils for Ubuntu 2.21.53.20110810) 1.11
WebKit Review Bot
Comment 3 2012-03-04 07:10:52 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
WebKit Review Bot
Comment 4 2012-03-04 08:06:16 PST
Comment on attachment 130024 [details] Proposed Patch Attachment 130024 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11807427 New failing tests: editing/selection/select-line-break-with-opposite-directionality.html
WebKit Review Bot
Comment 5 2012-03-04 08:58:13 PST
Comment on attachment 130024 [details] Proposed Patch Attachment 130024 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11807440 New failing tests: editing/selection/select-line-break-with-opposite-directionality.html
Martin Robinson
Comment 6 2012-03-04 09:15:15 PST
Comment on attachment 130024 [details] Proposed Patch Is it enough to add it to webkit2_tests_ldadd and not Programs_WebKitTestRunner_LDADD? It's weird that we need to keep adding these libraries to WebKitTestRunner since it doesn't use them directly.
Philippe Normand
Comment 7 2012-03-04 10:02:19 PST
(In reply to comment #6) > (From update of attachment 130024 [details]) > Is it enough to add it to webkit2_tests_ldadd and not Programs_WebKitTestRunner_LDADD? It's weird that we need to keep adding these libraries to WebKitTestRunner since it doesn't use them directly. Oh yes, right! For instance the gst libs are in webkit2_tests_ldadd but not in Programs_WebKitTestRunner_LDADD. Joone, can you double-check the WebKitTestRunner/GNUmakefile.am is not needed please?
Joone Hur
Comment 8 2012-03-04 20:17:24 PST
(In reply to comment #7) > (In reply to comment #6) > > (From update of attachment 130024 [details] [details]) > > Is it enough to add it to webkit2_tests_ldadd and not Programs_WebKitTestRunner_LDADD? It's weird that we need to keep adding these libraries to WebKitTestRunner since it doesn't use them directly. > > Oh yes, right! For instance the gst libs are in webkit2_tests_ldadd but not in Programs_WebKitTestRunner_LDADD. > > Joone, can you double-check the WebKitTestRunner/GNUmakefile.am is not needed please? I've found another link problem in Source/WebKit2/GNUmakefile.am as follows: --- a/Source/WebKit2/GNUmakefile.am +++ b/Source/WebKit2/GNUmakefile.am @@ -1325,8 +1325,7 @@ libWebCoreGtk2_la_CPPFLAGS = \ $(SQLITE3_CFLAGS) \ $(UNICODE_CFLAGS) \ $(XRENDER_CFLAGS) \ - $(XT_CFLAGS) \ - $(ZLIB_LIBS) + $(XT_CFLAGS) ZLIB_LIBS is added improperly to here. So if we remove it, we should add it to Programs_WebKitTestRunner_LDADD
Joone Hur
Comment 9 2012-03-04 20:18:43 PST
Created attachment 130049 [details] Updated Patch2
Martin Robinson
Comment 10 2012-03-04 20:23:19 PST
(In reply to comment #8) > ZLIB_LIBS is added improperly to here. So if we remove it, we should add it to Programs_WebKitTestRunner_LDADD I'm not sure I understand. If anything it seems like it should be linked to libWebCore, but not TestRunner, since TestRunner does not use it directly.
Joone Hur
Comment 11 2012-03-04 22:47:35 PST
(In reply to comment #10) > (In reply to comment #8) > > > ZLIB_LIBS is added improperly to here. So if we remove it, we should add it to Programs_WebKitTestRunner_LDADD > > I'm not sure I understand. If anything it seems like it should be linked to libWebCore, but not TestRunner, since TestRunner does not use it directly. zlib is not linked with libWebCore, so each executable needs to link with it. Otherwise, zlib should be linked with libWebCore.
Martin Robinson
Comment 12 2012-03-04 22:54:12 PST
(In reply to comment #11) > zlib is not linked with libWebCore, so each executable needs to link with it. Otherwise, zlib should be linked with libWebCore. It seems better to link libWebCore with zlib.
Joone Hur
Comment 13 2012-03-05 06:24:01 PST
Created attachment 130111 [details] Proposed Patch3 I've updated the patch which is simpler than before.
WebKit Review Bot
Comment 14 2012-03-05 08:56:03 PST
Comment on attachment 130111 [details] Proposed Patch3 Clearing flags on attachment: 130111 Committed r109754: <http://trac.webkit.org/changeset/109754>
WebKit Review Bot
Comment 15 2012-03-05 08:56:12 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.