libtool
[Top][All Lists]
Advanced

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

Re: unexpected emergence of --whole-archive


From: Peter O'Gorman
Subject: Re: unexpected emergence of --whole-archive
Date: Sun, 15 Mar 2009 12:26:56 -0500
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Matěj Týč wrote:

>>> /bin/sh ../libtool --tag=CC   --mode=link gcc  -DNOINLINE -Wextra -g -O0
>>> -module  -ljpeg   -o jpeg.la -rpath /usr/local/lib/IL jpeg_la-il_jpeg.lo
>>> -lm -lz 
>>> results in:
>>> libtool: link: gcc -shared  .libs/jpeg_la-il_jpeg.o
>>> -Wl,--whole-archive /home/bubla/projects/devil_modular/lib/.libs/libjpeg.a 
>>> -Wl,--no-whole-archive  -ljpeg -lm -lz    -Wl,-soname -Wl,jpeg.so.0 -o 
>>> .libs/jpeg.so.0.0.0
>>> and consequently an error occurs:
>>> gcc: /home/bubla/projects/devil_modular/lib/.libs/libjpeg.a: No such
>>> file or directory

> The funny and mysterious thing about this is that it should not be
> created. Actually, it is not created, but it is somehow required in the
> linking phase.
> The rules to create the 'png' and 'jpeg' modules are exactly the same in
> the Makefile.am!
> I can't understand at all how come that it is different in the end...
> It would be good to know what makes libtool to come up with that idea
> about the convenience library...
> Also notice that libtool demands libjpeg.a, not libjpeg.la
> Matej

In the directory /home/bubla/projects/devil_modular/lib/ you have a
libjpeg.la file. This is not the jpeg module that you are creating, it
is a different library. libtool finds this when you pass -ljpeg (not
sure why, as there is no -L flag for that directory). This libjpeg.la is
a libtool created file that instructs libtool that the libjpeg.a sitting
next to it is a libtool convenience archive.

How was the file libjpeg.la, in the directory
/home/bubla/projects/devil_modular/lib created?

Peter
-- 
Peter O'Gorman
http://pogma.com




reply via email to

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