[Top][All Lists]

[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 (X11/20090105)

Matěj Týč wrote:

>>> /bin/sh ../libtool --tag=CC   --mode=link gcc  -DNOINLINE -Wextra -g -O0
>>> -module  -ljpeg   -o -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, -o 
>>> .libs/
>>> 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!
> 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
> Matej

In the directory /home/bubla/projects/devil_modular/lib/ you have a 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 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, in the directory
/home/bubla/projects/devil_modular/lib created?

Peter O'Gorman

reply via email to

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