[Clfs-dev] Help cross coimpiling libvorbis to ARM

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Feb 7 04:08:45 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Your issue is because it's using libtool.  Edited output:

Ivan Kabaivanov wrote:
> On Thursday 07 February 2008, Luís Vitório Cargnini wrote:
>> /bin/sh ../libtool  --mode=link arm-linux-gnueabi-gcc  <flags>
>>   -o libvorbis.la <flags> <.lo files> -logg   -lm

This is telling libtool to link using that particular gcc, sending its
output to libvorbis.la, embedding each of the .lo files, and also
linking against -logg and -lm.  When libtool sees -logg, it looks for a
libogg.la file, not libogg.so (like the compiler).  It then uses the
contents of libogg.la to build the real link command.  (It also does
this with -lm, if a libm.la exists.  It falls back to .so if the .la
doesn't exist.)

Your issue is that the libogg.la file that it's using has
/usr/lib/libogg.so in it.  I'm guessing that's because it's picking up
the libogg.la from your host, not the cross-compiled one?  There may not
even be a cross-compiled one; it would depend on whether libtool was
used in the libogg cross-compile.

> Do you have anything in LDFLAGS?  Is /usr/lib/libogg.so in the
> Makefile?  If yes, remove it.

/usr/lib/libogg.so won't be in the Makefile; it'll be in a .la file
somewhere on the host that libtool is picking up.  libtool should be
finding /opt/arm-linux/arm-linux-gnueabi/usr/lib/libogg.la, but if that
file doesn't exist, it'll fall back to /usr/lib/libogg.la (which is the
wrong file, obviously).

I'm not sure how to fix it if the .la file doesn't exist.  You could
manually run the link command (not the libtool version, but the "raw"
version that calls arm-linux-gnueabi-gcc directly), replacing the
incorrect libogg.so with the correct one.  But that will only work this
time around; it won't fix other programs that try to use libtool to link
against this cross-compiled libogg.

If the .la file does exist in /opt, then I'm guessing something is wrong
with libtool's search path?  Or the .la file in /opt refers to /usr/lib
instead of /opt/.../lib; that could be too.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHqvTMS5vET1Wea5wRA8WJAJ0Z8t4KMhaDNt2F9HyDFW6+ShNNeACgv/t9
VMhBGntiH14vRTlrQGT3moU=
=G6lF
-----END PGP SIGNATURE-----



More information about the Clfs-dev mailing list