[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Failure to link multiple libraries.

From: Roger Leigh
Subject: Failure to link multiple libraries.
Date: 13 Jan 2003 13:27:29 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

I have two shared libraries, each made in a separate subdirectory.
Both are made with automake and libtool.

One library depends on the other, and I've used

libgimpprintui_la_LIBADD = $(GIMPPRINT_UI_LIBDEPS)

to indicate this ($(GIMPPRINT_UI_LIBDEPS) includes

This seems to work when building, although libgimpprintui has the path
to the build tree hard-coded in.  However, when I
install, all libgimpprintui-using binaries are relinked incorrectly,
so that they now use *two* binary-incompatible's:

libtool: install: warning: relinking `'

(cd /home/roger/gimp-print/current/src/libgimpprintui; /bin/sh
../../libtool --mode=relink gcc -Wall -Wcast-align -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-Wwrite-strings -pedantic -I../../include -I../../include -I../../intl
-g -O2 -o -rpath /usr/local/lib -release 4.3.7
-rpath /usr/local/lib panel.lo plist.lo ui-utils.lo
print-image-thumbnail.lo ../../src/main/ -L/usr/lib
-L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi
-lXext -lX11 -lm -inst-prefix-dir /tmp/inst)

gcc -shared panel.lo plist.lo ui-utils.lo print-image-thumbnail.lo
-Wl,--rpath -Wl,/usr/local/lib -L/usr/lib -L/usr/local/lib
-L/tmp/inst/usr/local/lib -lgimpprint -L/usr/X11R6/lib
                          ^^^^^^^^^^^ why!!!

-L/tmp/inst/usr/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext
-lX11 -lm -Wl,-soname -Wl, -o

$ ldd /usr/lib/ | grep libgimpprint => /usr/lib/ (0x40028000)

address@hidden:/usr/lib/gimp/1.2/plug-ins$ ldd print  | grep libgimpprint => /usr/lib/ (0x4007a000) => /usr/lib/ (0x4008f000) => /usr/lib/ (0x40574000)

The installed version of libgimpprint ( is linked
to, but the development version is versioned with
-release, and called  Somehow, *both* versions
are getting linked in...  In the above example, I'm installing into a

I think a problem similar to this has been posted before to the list,
but I'm not sure this is the same issue.  I'm using libtool 4.2.3
(Debian unstable).  Is there a way around this problem?


Roger Leigh

                Printing on GNU/Linux?
                GPG Public Key: 0x25BFB848 available on public keyservers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]