Hi garnome-list, I have a Garnome install in /opt/gnome2.12 and recently tried to install some addon software using libs in /opt/gnome2.12/lib - this works fine for *most* apps. I have set the following environment variables:
CFLAGS="-O2 -pipe -march=athlon-xp -m3dnow -I/opt/gnome2.12/include/ -L/opt/gnome2.12/lib/" CPPFLAGS=$CFLAGS CXXFLAGS=$CFLAGS ACLOCAL_FLAGS="-I /opt/gnome2.12/share/aclocal -I /usr/share/aclocal" PATH=$HOME/bin:/opt/gnome2.12/bin:$PATH LD_LIBRARY_PATH=/opt/gnome2.12/lib:/usr/lib/mozilla PKG_CONFIG_PATH=/opt/gnome2.12/lib/pkgconfig:/usr/lib/pkgconfig As said, most apps compile just fine against this setup but I get "undefined reference" errors when compiling the latest ooo-build or gnome-screensaver. After investigating a bit It seems that the problem is the following: gcc -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -march=athlon-xp -m3dnow -I/opt/gnome2.12/include/ -Wno-strict-aliasing -Wno-sign-compare -o gnome-screensaver gnome-screensaver.o gs-monitor.o gs-watcher-x11.o gs-listener-dbus.o gs-manager.o gs-window-x11.o gs-prefs.o gs-job.o subprocs.o gs-grab-x11.o dpms.o -Wl,--rpath -Wl,/opt/gnome2.12/lib -pthread -Wl,--export-dynamic -L/opt/gnome2.12/lib/ -L/opt/gnome2.12/lib /opt/gnome2.12/lib/libgtk-x11-2.0.so /opt/gnome2.12/lib/libxml2.so -lz /usr/lib/libdbus-glib-1.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libdbus-1.so -lnsl /opt/gnome2.12/lib/libgconf-2.so /opt/gnome2.12/lib/libORBit-2.so /opt/gnome2.12/lib/libgmodule-2.0.so -ldl /usr/lib/libpopt.so /opt/gnome2.12/lib/libgobject-2.0.so /opt/gnome2.12/lib/libgthread-2.0.so -lpthread /opt/gnome2.12/lib/libglib-2.0.so -lm -lXss -lXinerama -lXxf86vm -lXrandr /usr/lib/libXrender.so -L/usr/X11R6/lib -lX11 -lXxf86misc -Wl,--rpath -Wl,/opt/gnome2.12/lib -Wl,--rpath -Wl,/opt/gnome2.12/lib /opt/gnome2.12/lib/libgtk-x11-2.0.so: undefined reference to `g_mapped_file_free' /opt/gnome2.12/lib/libgtk-x11-2.0.so: undefined reference to `g_mapped_file_new'/opt/gnome2.12/lib/libgtk-x11-2.0.so: undefined reference to `g_mapped_file_get_contents' collect2: ld returned 1 exit status So there are 3 undefined references to symbols found in libglib-2.0.so, as shown here: $ nm /opt/gnome2.12/lib/libglib-2.0.so | grep g_mapped_file_free 000297d0 T g_mapped_file_free 000297d0 t IA__g_mapped_file_free The relevant line in the Makefile is: GNOME_SCREENSAVER_LIBS = -Wl,--rpath -Wl,/opt/gnome2.12/lib -pthread -L/opt/gnome2.12/lib -lgtk-x11-2.0 -lxml2 -lpthread -lz -lm -ldbus-glib-1 -lgconf-2 So, if I'm interpretating right, -ldbus-glib-1 is pulling in /usr/lib/libglib-2.0.so as a dependency. Unfortunatly, libglib-2.0.so as shipped by ubuntu doesn't contain symbols and the build fails: $ nm /usr/lib/libglib-2.0.so | grep g_mapped_file_free nm: /usr/lib/libglib-2.0.so: no symbols Editing the Makefile to GNOME_SCREENSAVER_LIBS = -Wl,--rpath -Wl,/opt/gnome2.12/lib -pthread -L/opt/gnome2.12/lib -lgtk-x11-2.0 -lxml2 -lpthread -lz -lm -lgconf-2 -ldbus-glib-1 solves the problem, I guess installing dbus to /opt/gnome2.12 would do so, too, but this would mean I was forced to always be in sync with the ubuntu version, as replacing the dbus deamon is a no-no. Does anyone have an idea how I can solve this mess? Is there a way to tell the system not to use libs from a given directory? Naturally I need most libs tom /usr/lib, but I don't want those used that I also have in my Garnome install... Thx, Michi -- garnome-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/garnome-list
