Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#42435 - [gtk3] `gdk_keyval_from_name` symbol present in *.h file but not in *.so (bad packaging?)

Attached to Project: Arch Linux
Opened by Michal Rus (michalrus) - Saturday, 18 October 2014, 14:10 GMT
Last edited by Jan de Groot (JGC) - Monday, 17 November 2014, 19:52 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When compiling gnome-3.14 branch of https://github.com/codito/gnome-shell-pomodoro , the following happens:


make[3]: Entering directory '/tmp/yaourt-tmp-m/aur-gnome-shell-pomodoro-git/src/gnome-shell-pomodoro-git/src'
VALAC gnome_pomodoro_vala.stamp
CC gnome_pomodoro-main.o
CC gnome_pomodoro-resources.o
CCLD gnome-pomodoro
/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/libgtk-3.so: undefined reference to symbol 'gdk_keyval_from_name'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/libgdk-3.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:469: recipe for target 'gnome-pomodoro' failed
make[3]: *** [gnome-pomodoro] Error 1


So, the symbol—`gdk_keyval_from_name`—is present in header file, but not in libgtk-3.so.

Author's comment: https://github.com/codito/gnome-shell-pomodoro/issues/159#issuecomment-59517239

Using up-to-date Arch (gtk3 3.14.3-2).

Steps to reproduce:

Try to compile https://aur.archlinux.org/packages/gnome-shell-pomodoro-git/ → especially after adding `#branch=gnome-3.14` to the git URL in the `source` array.
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 17 November 2014, 19:52 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Not a gtk3 bug.
Comment by Jan de Groot (JGC) - Wednesday, 22 October 2014, 11:16 GMT
I don't know how to fix this, but nothing looks wrong with gtk3 here.
gdk_keyval_from_name is in libgdk-3.so.0, which is marked as NEEDED by libgtk-3.so.0, so libgtk-3.so.0 is not underlinked.

On Archlinux and Ubuntu the default LDFLAGS contain -as-needed. This causes problems with gnome-shell-pomodoro:

libtool: link: gcc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -o gnome-pomodoro gnome_pomodoro-main.o gnome_pomodoro-resources.o -pthread -pthread -lgthread-2.0 -lgmodule-2.0 -lgnome-desktop-3 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -ldbus-glib-1 -ldbus-1 -lgom-1.0 -lsqlite3 -lupower-glib /usr/lib/libcanberra.so -lvorbisfile -lvorbis -logg -ltdb -lltdl -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 ../lib/.libs/libgnome-pomodoro.a -lm -pthread

as-needed discards libgdk-3, causing the undefined symbols. Unsetting LDFLAGS in PKGBUILD fixes the compile issue, but that looks more like a workaround to me.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 22 October 2014, 15:05 GMT
In src/Makefile.am, try changing:

gnome_pomodoro_LDADD = \
$(GNOME_POMODORO_LIBS) \
$(top_builddir)/lib/libgnome-pomodoro.la

To read:

gnome_pomodoro_LDADD = \
$(top_builddir)/lib/libgnome-pomodoro.la \
$(GNOME_POMODORO_LIBS)

That is, swap the two lines and transfer the backslash.
Comment by Michal Rus (michalrus) - Wednesday, 22 October 2014, 19:42 GMT

Loading...