! 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 !
parole uses symbols from libX11 without linking directly to it
Status:
RESOLVED: FIXED

Comments

Description Kevin Fenzi 2010-02-18 22:29:09 CET
parole uses some symbols from the libX11 library, without directly linking to it. 
This currently works on most linkers, but will failed on newer ones and possibly with gnuld soon upstream too. 

/usr/bin/ld: parole-button.o: undefined reference to symbol 'XGrabKey'
/usr/bin/ld: note: 'XGrabKey' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line

/usr/bin/ld: ../../common/.libs/libparolescreensaver.a(libparolescreensaver_la-parole-screensaver.o): undefined reference to symbol 'XResetScreenSaver'
/usr/bin/ld: note: 'XResetScreenSaver' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line

Here's a hacky fix to Makefile.in that fixes it. You will want to make a better fix in the autotools files. 

diff -Nur parole-0.2.0.2.orig/browser-plugin/media-plugin/Makefile.in parole-0.2.0.2/browser-plugin/media-plugin/Makefile.in
--- parole-0.2.0.2.orig/browser-plugin/media-plugin/Makefile.in	2010-01-25 04:47:24.000000000 -0700
+++ parole-0.2.0.2/browser-plugin/media-plugin/Makefile.in	2010-02-18 15:16:52.000000000 -0700
@@ -198,7 +198,7 @@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 LD = @LD@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ -lX11
 LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@
 LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@
 LIBNOTIFY_REQUIRED_VERSION = @LIBNOTIFY_REQUIRED_VERSION@
diff -Nur parole-0.2.0.2.orig/src/Makefile.in parole-0.2.0.2/src/Makefile.in
--- parole-0.2.0.2.orig/src/Makefile.in	2010-01-25 04:47:27.000000000 -0700
+++ parole-0.2.0.2/src/Makefile.in	2010-02-18 13:55:57.000000000 -0700
@@ -205,7 +205,7 @@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 LD = @LD@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ -lX11
 LIBNOTIFY_CFLAGS = @LIBNOTIFY_CFLAGS@
 LIBNOTIFY_LIBS = @LIBNOTIFY_LIBS@
 LIBNOTIFY_REQUIRED_VERSION = @LIBNOTIFY_REQUIRED_VERSION@
Comment 1 Jérôme Guelfucci editbugs 2011-02-27 17:55:53 CET
Created attachment 3532 
Link to libX11 using autotools

The following patch fixes the issue for me.
Comment 2 Kevin Fenzi 2011-02-27 19:48:43 CET
Looks good to me.
Comment 3 Christoph Mende 2011-05-17 10:46:20 CEST
that fixes linking with stricter linkers, but it should prolly also add LIBX11_CFLAGS to INCLUDES
Comment 4 Christian Dywan 2012-07-19 18:48:24 CEST
Fixes the linking for me, with gold on Ubuntu 12.04
Comment 5 Simon Steinbeiss editbugs 2012-07-23 01:45:01 CEST
Thanks for the patch, applied it (http://git.xfce.org/apps/parole/commit/?id=c7f57add6f9c31e8f59888514d107fcb520830f5).

Bug #6244

Reported by:
Kevin Fenzi
Reported on: 2010-02-18
Last modified on: 2012-07-23

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Version:
0.2.0.2

Attachments

Link to libX11 using autotools (3.45 KB, patch)
2011-02-27 17:55 CET , Jérôme Guelfucci
no flags

Additional information