RESOLVED FIXED 66365
[EFL] fail to link with symbol uncompress
https://bugs.webkit.org/show_bug.cgi?id=66365
Summary [EFL] fail to link with symbol uncompress
Halton Huo
Reported 2011-08-17 00:54:09 PDT
OS: Ubuntu 11.04 Code base: http://svn.webkit.org/repository/webkit/trunk@93032 error log: $ make -j6 VERBOSE=1 [...] Linking CXX executable Programs/EWebLauncher /usr/bin/cmake -E cmake_link_script CMakeFiles/Programs/EWebLauncher.dir/link.txt --verbose=1 /usr/bin/c++ -O3 -DNDEBUG -L/opt/e/lib -lecore_x -L/opt/e/lib -ledje -L/opt/e/lib -leina -levas -lecore -lecore_file -lecore_evas -ledje -L/opt/e/lib -levas -pthread -L/usr/lib/i386-linux-gnu -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 CMakeFiles/Programs/EWebLauncher.dir/home/halton/work/projects/enlightenment/e/WebKit/Tools/EWebLauncher/main.c.o -o Programs/EWebLauncher -rdynamic JavaScriptCore/libjavascriptcore_efl.a WebCore/libwebcore_efl.a WebKit/libewebkit.so.0.1.0 -lcairo -lfreetype -lecore_x -ledje -leina -levas -lecore -lecore_file -lecore_evas -ledje -levas -lxml2 -lxslt -lsqlite3 -lglib-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 WebCore/libwebcore_efl.a JavaScriptCore/libjavascriptcore_efl.a JavaScriptCore/wtf/libwtf_efl.a -lpthread -licui18n -lxslt -licuuc -lgstapp-0.10 -lgstreamer-0.10 -lgstbase-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -lgstvideo-0.10 -lgstreamer-0.10 -lgstbase-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -lgstvideo-0.10 -lcairo -lfreetype -lecore_x -leina -levas -lecore -lecore_file -ledje -lecore_evas -lxml2 -lsqlite3 -lfontconfig -lpng -ljpeg -ldl -lglib-2.0 -lgobject-2.0 -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -Wl,-rpath,/home/halton/work/projects/enlightenment/e/WebKit/build/WebKit /usr/bin/ld.gold.real: WebKit/libewebkit.so.0.1.0: error: undefined reference to 'uncompress' collect2: ld returned 1 exit status
Attachments
add -lz (688 bytes, patch)
2011-08-17 01:30 PDT, Halton Huo
no flags
Add ZLIB as required for libwebcore (716 bytes, patch)
2011-08-18 01:52 PDT, Halton Huo
no flags
new patch to add zlib when freetype is used (2.00 KB, patch)
2011-08-18 22:59 PDT, Halton Huo
no flags
patch to add zlib when freetype is used (2.38 KB, patch)
2011-08-18 23:36 PDT, Halton Huo
no flags
Patch for landing (2.61 KB, patch)
2011-11-23 05:58 PST, Lucas De Marchi
no flags
Halton Huo
Comment 1 2011-08-17 01:30:51 PDT
Created attachment 104157 [details] add -lz add -lz can fix this bug, please review.
Gyuyoung Kim
Comment 2 2011-08-17 21:30:54 PDT
WebKit-EFL succeeded to be built on r93032 You are able to see the build result below url, http://build.webkit.org/builders/EFL%20Linux%20Release%20%28Build%29/builds/19775 In addition, WebKit EFL is built on latest WebKit trunk successfully. Did you build WebKit-EFL according to instruction below ? http://trac.webkit.org/wiki/EFLWebKit
Halton Huo
Comment 3 2011-08-17 21:53:00 PDT
(In reply to comment #2) > WebKit-EFL succeeded to be built on r93032 > > You are able to see the build result below url, > http://build.webkit.org/builders/EFL%20Linux%20Release%20%28Build%29/builds/19775 > > In addition, WebKit EFL is built on latest WebKit trunk successfully. > > Did you build WebKit-EFL according to instruction below ? > http://trac.webkit.org/wiki/EFLWebKit Yes. And it is Ubnutu 11.04 , I've tried on several boxes, all has this problem.
Ryuan Choi
Comment 4 2011-08-17 22:02:11 PDT
(In reply to comment #3) > (In reply to comment #2) > > WebKit-EFL succeeded to be built on r93032 > > > > You are able to see the build result below url, > > http://build.webkit.org/builders/EFL%20Linux%20Release%20%28Build%29/builds/19775 > > > > In addition, WebKit EFL is built on latest WebKit trunk successfully. > > > > Did you build WebKit-EFL according to instruction below ? > > http://trac.webkit.org/wiki/EFLWebKit > > Yes. And it is Ubnutu 11.04 , I've tried on several boxes, all has this problem. It looks reasonable for me. WOFFFileFormat.cpp use uncompress() of libz(for WOFF support) In case of build bot, some packages in build bot may include it. (On my pc, cairo.pc(1.8.10), libpng.pc(1.2.42) include it)
Gyuyoung Kim
Comment 5 2011-08-17 22:53:12 PDT
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > WebKit-EFL succeeded to be built on r93032 > > > > > > You are able to see the build result below url, > > > http://build.webkit.org/builders/EFL%20Linux%20Release%20%28Build%29/builds/19775 > > > > > > In addition, WebKit EFL is built on latest WebKit trunk successfully. > > > > > > Did you build WebKit-EFL according to instruction below ? > > > http://trac.webkit.org/wiki/EFLWebKit > > > > Yes. And it is Ubnutu 11.04 , I've tried on several boxes, all has this problem. > > It looks reasonable for me. > WOFFFileFormat.cpp use uncompress() of libz(for WOFF support) > > In case of build bot, some packages in build bot may include it. > (On my pc, cairo.pc(1.8.10), libpng.pc(1.2.42) include it) I also using Ubuntu 11.04. There is no build break. It looks some packages include it as Ryuan said. If so, it seems to me it is better to add libz to linking library explicitly. To add new package is not simple in WebKit EFL. First, you have to make FindXXX.cmake file for new library. Then, you have to add a code to find the library to Source/cmake/OptionEfl.cmake file as below, FIND_PACKAGE(Cairo 1.6 REQUIRED) FIND_PACKAGE(EFL REQUIRED) And then, you're able to use XXX_LIBRARIES macro in CMakeListEfl.txt like other libraries. BTW, I'm still wondering why your development environment make this linking error. We don't have this error so far. You built WebKit-EFL according to build instruction I mention, right ?
Gyuyoung Kim
Comment 6 2011-08-17 23:05:00 PDT
I find zlib usage in CMakeListEfl.txt. ZLIB_LIBRARIES is used by curl network backend. However, we're using libsoup for network backend. If you want to add zlib, I think it is better to use ZLIB_LIBRARIES.
Halton Huo
Comment 7 2011-08-18 01:28:34 PDT
(In reply to comment #6) > I find zlib usage in CMakeListEfl.txt. ZLIB_LIBRARIES is used by curl network backend. However, we're using libsoup for network backend. If you want to add zlib, I think it is better to use ZLIB_LIBRARIES. Kim, I think I'm using libsoup rather than curl. $ ldd WebKit/libewebkit.so.0.1.0 |grep soup libsoup-2.4.so.1 => /usr/lib/libsoup-2.4.so.1 (0xb5e4d000) And seems libsoup does not depend on libz $ pkg-config --libs libsoup-2.4 -pthread -L/usr/lib/i386-linux-gnu -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 Actually I go through all dependencies of libewebkit.so, no one will contain -lz if we use "pkg-config --libs". While "pkg-config --libs --static" will give -lz. So seems zlib need to be added for the libsoup backend also. Is that correct? If so, I can new patch with your suggestion as comment #5.
Halton Huo
Comment 8 2011-08-18 01:52:50 PDT
Created attachment 104314 [details] Add ZLIB as required for libwebcore new patch, please review. Since zlib is needed whatever for libsoup or libcurl backend, so add it globally.
Gyuyoung Kim
Comment 9 2011-08-18 01:55:28 PDT
uncompress() function is used by WOFFFileFormat.cpp, which is used by freetype. So, if we need to add zlib dependency, I think we add it when freetype only is enabled. For example, = Source/cmake/OptionEfl.cmake = IF (FONT_BACKEND STREQUAL "freetype") FIND_PACKAGE(Freetype 9.0 REQUIRED) FIND_PACKAGE(ZLIB REQUIRED) SET(WTF_USE_FREETYPE 1) ADD_DEFINITIONS(-DWTF_USE_FREETYPE=1) ELSE () = Source/WebCore/CMakeListEfl.txt = IF (WTF_USE_FREETYPE) LIST(APPEND WebCore_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/graphics/freetype" ) LIST(APPEND WebCore_SOURCES platform/graphics/WOFFFileFormat.cpp platform/graphics/freetype/FontCacheFreeType.cpp platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp platform/graphics/freetype/FontPlatformDataFreeType.cpp platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp platform/graphics/freetype/SimpleFontDataFreeType.cpp ) LIST(APPEND WebCore_LIBRARIES ${ZLIB_LIBRARIES} ) ENDIF ()
Gyuyoung Kim
Comment 10 2011-08-18 01:57:22 PDT
Comment on attachment 104314 [details] Add ZLIB as required for libwebcore Informal r-. Missing ChangeLog. You should read http://www.webkit.org/coding/contributing.html first before making a patch.
Halton Huo
Comment 11 2011-08-18 22:59:29 PDT
Created attachment 104464 [details] new patch to add zlib when freetype is used rework patch with comment #9 and #10.
Gyuyoung Kim
Comment 12 2011-08-18 23:02:58 PDT
Comment on attachment 104464 [details] new patch to add zlib when freetype is used View in context: https://bugs.webkit.org/attachment.cgi?id=104464&action=review > ChangeLog:7 > + Please add description about this patch > Source/WebCore/ChangeLog:7 > + ditto.
Halton Huo
Comment 13 2011-08-18 23:36:12 PDT
Created attachment 104467 [details] patch to add zlib when freetype is used rework patch as comment #11.
Gyuyoung Kim
Comment 14 2011-08-18 23:38:37 PDT
Comment on attachment 104467 [details] patch to add zlib when freetype is used LGTM.
Lucas De Marchi
Comment 15 2011-09-21 12:52:00 PDT
Looks good. Thanks. CC'ing reviewers
Ryuan Choi
Comment 16 2011-11-03 18:07:12 PDT
*** Bug 71482 has been marked as a duplicate of this bug. ***
Lucas De Marchi
Comment 17 2011-11-23 05:58:05 PST
Created attachment 116346 [details] Patch for landing
WebKit Review Bot
Comment 18 2011-11-23 06:26:00 PST
Comment on attachment 116346 [details] Patch for landing Clearing flags on attachment: 116346 Committed r101079: <http://trac.webkit.org/changeset/101079>
WebKit Review Bot
Comment 19 2011-11-23 06:26:06 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.