! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
tumbler fails to build with -z,defs
Status:
RESOLVED: FIXED
Product:
Tumbler
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2012-12-11 21:09:56 CET
Using LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,-z,defs" Tumbler fails to build with:

  CCLD     tumbler-gst-thumbnailer.la
.libs/tumbler_gst_thumbnailer_la-gst-thumbnailer.o: In function `gst_thumbnailer_cover_from_tags':
/tmp/buildd/tumbler-0.1.26/plugins/gst-thumbnailer/gst-thumbnailer.c:159: undefined reference to `gst_tag_image_type_get_type'
.libs/tumbler_gst_thumbnailer_la-gst-thumbnailer.o: In function `gst_thumbnailer_scale_pixbuf':
/tmp/buildd/tumbler-0.1.26/plugins/gst-thumbnailer/gst-thumbnailer.c:542: undefined reference to `rint'
/tmp/buildd/tumbler-0.1.26/plugins/gst-thumbnailer/gst-thumbnailer.c:544: undefined reference to `rint'

With V=1:

/bin/bash ../../libtool  --tag=CC   --mode=link gcc -I../.. -I../../plugins -I../.. -I../../plugins -DG_LOG_DOMAIN=\"tumbler-gst-thumbnailer\" -DPACKAGE_LOCALE_DIR=\"/usr/share/locale\" -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include     -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -avoid-version -export-dynamic -module  -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -Wl,-O1 -Wl,-z,defs -Wl,--as-needed -Wl,-O1 -o tumbler-gst-thumbnailer.la -rpath /usr/lib/x86_64-linux-gnu/tumbler-1/plugins tumbler_gst_thumbnailer_la-gst-thumbnailer-plugin.lo tumbler_gst_thumbnailer_la-gst-thumbnailer-provider.lo tumbler_gst_thumbnailer_la-gst-thumbnailer.lo ../../tumbler/libtumbler-1.la -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0   -pthread -lgstreamer-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lgio-2.0 -lgobject-2.0 -lglib-2.0   -lglib-2.0   
libtool: link: gcc -shared  -fPIC -DPIC  .libs/tumbler_gst_thumbnailer_la-gst-thumbnailer-plugin.o .libs/tumbler_gst_thumbnailer_la-gst-thumbnailer-provider.o .libs/tumbler_gst_thumbnailer_la-gst-thumbnailer.o   -Wl,-rpath -Wl,/tmp/buildd/tumbler-0.1.26/tumbler/.libs ../../tumbler/.libs/libtumbler-1.so -lgdk_pixbuf-2.0 -lgstreamer-1.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lgio-2.0 -lgobject-2.0 -lglib-2.0  -pthread -pthread -pthread -O2 -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -Wl,-O1 -Wl,-z -Wl,defs -Wl,--as-needed -Wl,-O1 -pthread   -pthread -Wl,-soname -Wl,tumbler-gst-thumbnailer.so -o .libs/tumbler-gst-thumbnailer.so
.libs/tumbler_gst_thumbnailer_la-gst-thumbnailer.o: In function `gst_thumbnailer_cover_from_tags':
/tmp/buildd/tumbler-0.1.26/plugins/gst-thumbnailer/gst-thumbnailer.c:159: undefined reference to `gst_tag_image_type_get_type'
.libs/tumbler_gst_thumbnailer_la-gst-thumbnailer.o: In function `gst_thumbnailer_scale_pixbuf':
/tmp/buildd/tumbler-0.1.26/plugins/gst-thumbnailer/gst-thumbnailer.c:542: undefined reference to `rint'
/tmp/buildd/tumbler-0.1.26/plugins/gst-thumbnailer/gst-thumbnailer.c:544: undefined reference to `rint'
collect2: error: ld returned 1 exit status
make: *** [tumbler-gst-thumbnailer.la] Error 1

rint one is fixed by linking with libmath (-lm), the first one by linking with gst-tags (-lgsttag-1.0 and pkg-config --libs gstreamer-tag-1.0).

I'll try to look at the sources and provide a patch but you might be quicker on this :)
Comment 1 Yves-Alexis Perez editbugs 2012-12-11 21:38:13 CET
Created attachment 4792 
tentative patch

Here's a tentative patch.

I seem to remember there was a better way to fix -lm part but I can't remember it right now.
Comment 2 Nick Schermer editbugs 2012-12-11 21:55:49 CET
Applied in f2dba50.

Bug #9623

Reported by:
Yves-Alexis Perez
Reported on: 2012-12-11
Last modified on: 2012-12-11

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
0.1.26

Attachments

tentative patch (2.17 KB, patch)
2012-12-11 21:38 CET , Yves-Alexis Perez
no flags

Additional information