libtool
[Top][All Lists]
Advanced

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

Re: unexpected emergence of --whole-archive


From: Matěj Týč
Subject: Re: unexpected emergence of --whole-archive
Date: Sun, 15 Mar 2009 17:55:04 +0100

> > /bin/sh ../libtool --tag=CC   --mode=link gcc  -DNOINLINE -Wextra -g -O0
> > -module  -lpng12   -o png.la -rpath /usr/local/lib/IL png_la-il_png.lo
> > -lm -lz
> > results in:
> > libtool: link: gcc -shared  .libs/png_la-il_png.o   -lpng12 -lm -lz
> > -Wl,-soname -Wl,png.so.0 -o .libs/png.so.0.0.0
> > That is OK. However:
> > 
> > /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
> > 
> > To have something to start with, you have an idea where does that
> > -Wl,--whole-archive <bla bla> -Wl,--no-whole-archive section come from?
> 
> /home/bubla/projects/devil_modular/lib/libjpeg.la is a libtool
> convenience library (or at least libtool thinks it is). How was it
> created? What is the Makefile.am rule for it?

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





reply via email to

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