GNOME Bugzilla – Bug 655699
Instead of linking zlib, port to GZlibCompresor/Decompressor
Last modified: 2017-10-03 20:26:14 UTC
When using binutils-gold fails to build from source (introspection). The missing symbols are from zlib. It fail in two modules: libview and libdocument. [...] GEN EvinceDocument-3.0.gir g-ir-scanner: warning: Option --strip-prefix has been deprecated; see --identifier-prefix and --symbol-prefix. g-ir-scanner: compile: gcc -Wall -pthread -DGSEAL_ENABLE -I/home/gpoo/code/gnome3.2/install/include/evince/3.0 -I/home/gpoo/code/gnome3.2/install/include/glib-2.0 -I/home/gpoo/code/gnome3.2/install/lib/glib-2.0/include -I/home/gpoo/code/gnome3.2/install/include/gtk-3.0 -I/home/gpoo/code/gnome3.2/install/include/atk-1.0 -I/home/gpoo/code/gnome3.2/install/include/gdk-pixbuf-2.0 -I/home/gpoo/code/gnome3.2/install/include/pango-1.0 -I/home/gpoo/code/gnome3.2/install/include/pixman-1 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I.. -I.. -I. -I. -I/home/gpoo/code/gnome3.2/install/include/evince/3.0 -I/home/gpoo/code/gnome3.2/install/include/glib-2.0 -I/home/gpoo/code/gnome3.2/install/lib/glib-2.0/include -I/home/gpoo/code/gnome3.2/install/include/gio-unix-2.0/ -I/home/gpoo/code/gnome3.2/install/include/gdk-pixbuf-2.0 -I/home/gpoo/code/gnome3.2/install/include/atk-1.0 -I/home/gpoo/code/gnome3.2/install/include/gtk-3.0 -I/home/gpoo/code/gnome3.2/install/include/pango-1.0 -I/home/gpoo/code/gnome3.2/install/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/cairo -I/usr/include/freetype2 -c -o /home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0.o /home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0.c g-ir-scanner: link: libtool --mode=link --tag=CC gcc -o /home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0 -export-dynamic -L. -levdocument3 -pthread -L/home/gpoo/code/gnome3.2/install/lib -levdocument3 -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo-gobject -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 /home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0.o libtool: link: gcc -o /home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/.libs/EvinceDocument-3.0 -pthread /home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0.o -Wl,--export-dynamic -L/home/gpoo/code/gnome3.2/checkout/evince/libdocument -L/home/gpoo/code/gnome3.2/install/lib /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm /usr/lib/libcairo-gobject.so /usr/lib/libcairo.so -lpango-1.0 /usr/lib/libfreetype.so -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -pthread -Wl,-rpath -Wl,/home/gpoo/code/gnome3.2/install/lib /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gzclose' /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gzopen' /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gzprintf' /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gzread' /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gzerror' /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gztell' /usr/bin/ld: /home/gpoo/code/gnome3.2/checkout/evince/libdocument/.libs/libevdocument3.so: error: undefined reference to 'gzseek' collect2: ld returned 1 exit status linking of temporary binary failed: Command '['libtool', '--mode=link', '--tag=CC', 'gcc', '-o', '/home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0', '-export-dynamic', '-L.', '-levdocument3', '-pthread', '-L/home/gpoo/code/gnome3.2/install/lib', '-levdocument3', '-lgtk-3', '-lgdk-3', '-latk-1.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpangocairo-1.0', '-lgdk_pixbuf-2.0', '-lm', '-lcairo-gobject', '-lcairo', '-lpango-1.0', '-lfreetype', '-lfontconfig', '-lgobject-2.0', '-lgmodule-2.0', '-lgthread-2.0', '-lrt', '-lglib-2.0', '/home/gpoo/code/gnome3.2/checkout/evince/libdocument/tmp-introspectzBOizh/EvinceDocument-3.0.o']' returned non-zero exit status 1 make[3]: *** [EvinceDocument-3.0.gir] Error 1 make[3]: Leaving directory `/home/gpoo/code/gnome3.2/checkout/evince/libdocument' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/gpoo/code/gnome3.2/checkout/evince/libdocument' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/gpoo/code/gnome3.2/checkout/evince' make: *** [all] Error 2
Created attachment 192970 [details] [review] Fixes build
Instead of linking zlib, should port to using GZlibCompresor/Decompressor.
Something similar (with more lines) was applied in http://git.gnome.org/browse/evince/commit/?id=19490059 I am changing the summary to reflect the comment #c2
Review of attachment 192970 [details] [review]: marking as rejected as this is not needed anymore as per comment #c3
zlib is also used in the cut'n'paste unarr to provide crc32 (see bug 785141). Is this still a problem? Where exactly is zlib used in evince, other than in the copy/paste synctex parser? The code in libdocument/ev-file-helpers.c uses bzip2/gzip/xz command-line programs.
It does not worth the hassle to port it only for synctex if it is cut-n-paste code.