Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 1998 20:53:22 -0500
From:      Mark Coletti <mcoletti@clark.net>
To:        questions@FreeBSD.ORG (FreeBSD Questions)
Subject:   libtool, the Gimp, and ld: the Good, the Bad, & the Ugly
Message-ID:  <199812220153.UAA07771@laputa.clark.net>

next in thread | raw e-mail | index | archive | help
I am having all manner of problems in building the Gimp, most of which
seem to do with the ld blissfully ignoring the LD_LIBRARY_PATH that
libtool generates for linking executables.

That is (I used -Xlinker -t to dump out the search paths):

Making all in aa
gmake[3]: Entering directory `/usr/home/mcoletti/build/gnome/gimp/plug-ins/aa'
/bin/sh ../../libtool --mode=link gcc -O2 -Xlinker -t  -o aa  aa.o ../../libgimp/libgimp.la  -laa 
LD_LIBRARY_PATH="../../libgimp/.libs:$LD_LIBRARY_PATH" gcc -O2 -Xlinker -t -o .libs/aa aa.o -R/usr/local/lib -lgimp -lm -laa
Loading symbols:

/usr/lib/crt0.o
aa.o
ld: -lgimp: no match
collect2: ld returned 1 exit status
gmake[3]: *** [aa] Error 1
gmake[3]: Leaving directory `/usr/home/mcoletti/build/gnome/gimp/plug-ins/aa'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/home/mcoletti/build/gnome/gimp/plug-ins'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/mcoletti/build/gnome/gimp'
gmake: *** [all-recursive-am] Error 2


Hmm.  Odd.  Very strange, because:

mcoletti@laputa~/build/gnome/gimp:180> ls -l libgimp/.libs/
total 112
-rwxrwxr-x  1 mcoletti  mcoletti  79038 Dec 20 01:38 libgimp-1.1.so.0.0
lrwxrwxrwx  1 mcoletti  mcoletti     13 Dec 20 01:38 libgimp.la -> ../libgimp.la
lrwxrwxrwx  1 mcoletti  mcoletti     18 Dec 20 01:38 libgimp.so -> libgimp-1.1.so.0.0
-rwxrwxr-x  1 mcoletti  mcoletti  34058 Dec 20 01:39 libgimpui-1.1.so.0.0
lrwxrwxrwx  1 mcoletti  mcoletti     15 Dec 20 01:39 libgimpui.la -> ../libgimpui.la
lrwxrwxrwx  1 mcoletti  mcoletti     20 Dec 20 01:39 libgimpui.so -> libgimpui-1.1.so.0.0


... the library **IS** there.

So ld _should_ have cheerfully found the aforesaid libraries and
linked away.  And, according to the linker output, it didn't even
bother looking in the ``.libs'' directory to find the library at all.
What gives?


So.  I built binutils hoping that the GNU linker would be a bit
smarter.  Um, well, it was worse than being dumb: it didn't work at
all.  It apparently was unable to deal with the a.out binary type,
even though it would seem that it _should_ based on the numerous BFD
a.out support files:

configure:1031: gcc -o conftest    conftest.c  1>&5
/var/tmp/ccKwEZe9.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status


*auuuuuuUUUUUUUUUUGH*

What the hell is going wrong and what can I do to fix it?  ~~~:(

Specs:

mcoletti@laputa~/build/gnome/gimp:213> uname -a
FreeBSD laputa 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0: Mon Dec 14 22:40:57 EST 1998     root@laputa:/usr/src/sys/compile/LAPUTA  i386
mcoletti@laputa~/build/gnome/gimp:214> gcc --version
egcs-2.91.57



*auuuuUUUUUUGH*

Mark
-- 
   Mark Coletti | mailto:mcoletti@clark.net | http://www.clark.net/~mcoletti/
                      I'm too sexy for mitosis.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812220153.UAA07771>