Ok, I've added some functionality to a linux library.
However even after 'make install' the program I'm trying to confirm functionality is linking to the previous version.
开发者_如何转开发So 'make install' puts my libraries here: '/usr/local/lib' and '/usr/local/include'
I used the following on configure: ./configure --enable-maintainer-mode --enable-uninstalled-build 'CFLAGS=-g -O0' 'CXXFLAGS=-g -O0' 'JFLAGS=-g -O0' 'FFLAGS=-g -O0' CPPFLAGS='-L /usr/local/lib/ -I /usr/local/include/gpod-1.0/'
But when I try to execute the program I get 'Symbol not found' and 'Plugin can not load'
When I ldd the produced plugin so: ~/Development/rhythmbox/plugins/ipod/.libs$ ldd libipod.so
linux-gate.so.1 => (0x00d97000)
librhythmbox-core.so.1 => /home/gary/Development/rhythmbox/shell/.libs/librhythmbox core.so.1 (0x009ad000)
libgpod.so.4 => /usr/lib/libgpod.so.4 (0x00509000)
The emphasis being stressed because it's obviously linking to the wrong library... When I look in the make file I see the following:
IPOD_CFLAGS = -pthread -I/usr/local/include/gpod-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12
IPOD_LIBS = -pthread -L/usr/local/lib -lgpod -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng12 -lgthread-2.0 -lrt -lglib-2.0
So the CPPFLAGS are being passed through to the plugin, and in .deps I see the proper header file being included... IE:
~/Development/rhythmbox/plugins/ipod/.deps$ less rb-ipod-source.Po | grep gpod
/usr/local/include/gpod-1.0/gpod/itdb.h ../../lib/eel-gconf-extensions.h
/usr/local/include/gpod-1.0/gpod/itdb.h:
Ubuntu 10.10
Any ideas?
You need to set LD_RUN_PATH
to /usr/local/lib
before running configure
and make
. This will embed /usr/local/lib
as a shared library search path into the executable.
libgpod.so
is pointing to the old version of the library.
精彩评论