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 11:27:00 -0500
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Matěj Týč wrote:
> Hello,
> I use autotools libtool to make a library. That library consists of the
> main shared library file and a set of dynamically loadable modules.
> Those modules depend on external shared libraries.
> I have written configure.ac and Makefile.am that are quite complex and
> some things are generated during the configure time (it is an image
> loading library supporting quite a lot of formats). So I can't post
> stuff here, there is too much of it.
> 
> The problem is: During the build of libraries, some modules refuse to
> build. The cause is, however, absolutely strange.
> During the 'make' phase, the following happens:
> 
> /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?

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




reply via email to

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