Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fails to compile with gold linker: ld: SetBG.o: undefined reference to symbol 'XFreeStringList' #19

Closed
jer-gentoo opened this issue Aug 19, 2012 · 1 comment

Comments

@jer-gentoo
Copy link
Contributor

https://bugs.gentoo.org/show_bug.cgi?id=431882

g++ -march=native -Os -fomit-frame-pointer -pipe -mfpmath=sse -o nitrogen main.o SetBG.o Thumbview.o Config.o NWindow.o md5.o ArgParser.o ImageCombo.o Inotify.o Util.o NPrefsWindow.o -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lgtkmm-2.4 -latkmm-1.6 -lgdkmm-2.4 -lgiomm-2.4 -lpangomm-1.4 -lgtk-x11-2.0 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -pthread -lgthread-2.0 -lrt -lglib-2.0
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../i686-pc-linux-gnu/bin/ld: SetBG.o: undefined reference to symbol 'XFreeStringList'
/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/../../../../i686-pc-linux-gnu/bin/ld: note: 'XFreeStringList' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [nitrogen] Error 1

--- a/configure.ac
+++ b/configure.ac
@@ -34,10 +34,11 @@
PKG_CHECK_MODULES(GTK2,[gtk+-2.0 >= $GTK2_VERSION])
PKG_CHECK_MODULES(GTKMM2, [gtkmm-2.4 >= $GTKMM2_VERSION])
PKG_CHECK_MODULES(GTHREAD2, [gthread-2.0 >= $GTHREAD2_VERSION])
+PKG_CHECK_MODULES(X11, x11)

-NITROGEN_LIBS="$GLIB2_LIBS $GTK2_LIBS $GTKMM2_LIBS $GTHREAD2_LIBS"
-NITROGEN_CFLAGS="$GLIB2_CFLAGS $GTK2_CFLAGS $GTKMM2_CFLAGS $GTHREAD2_CFLAGS"
+NITROGEN_LIBS="$GLIB2_LIBS $GTK2_LIBS $GTKMM2_LIBS $GTHREAD2_LIBS $X11_LIBS"
+NITROGEN_CFLAGS="$GLIB2_CFLAGS $GTK2_CFLAGS $GTKMM2_CFLAGS $GTHREAD2_CFLAGS $X11_CFLAGS"

dnl do some autotools picen to get inotify
AC_ARG_ENABLE(inotify, [ --disable-inotify disable support for inotify watching of dirs (default: enabled)], [enable_inotify=$enableval],[enable_inotify=yes])

@daf
Copy link
Member

daf commented Sep 12, 2012

I thought this sounded familiar! Duplicate of #12

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants