libtool
[Top][All Lists]
Advanced

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

Re: static lib with libtool 1.5


From: Jeremie LE HEN
Subject: Re: static lib with libtool 1.5
Date: Tue, 28 Jun 2005 17:14:14 +0200
User-agent: Mutt/1.5.9i

Hi Ralf,

thanks for your fast reply.

> > This might be a very common question ; I checked the archives, but
> > didn't find anything relevant, unfortunately.
> 
> Hmm, don't know.  The problem is under-determined (read: we need more
> information to give an answer).

Yes sorry.

> > I'm trying to build both a static and a shared library.  This used to
> > work fine with libtool-1.4, but since I upgraded to libtool-1.5, I can't
> > build a static library any more.  I gave a try to the Changelog, but it
> > is too heavy, IMO.
> 
> Which exact libtool version, on which system, what does configure
> output, what's in config.log, how does the `libtool --mode=link' line
> look like and what does it output?  With all this information, we might
> be able to say where the problem is.  You may pack (bzip2, gzip) long
> files.
> 
> In general, it should be possible to build both static and shared with
> branch-1-5 as well; I do it all the time.  :)

I'm sure it possible and I'm currently missing something.  I don't use
autotools, I just use libtool manually, as explained in the
documentation.

I attached my Makefile, I hope this mailing-list doesn't get rid of
MIME attachement.

Here is the output with libtool-1.4.3 :
%%%
    droopy:Sitalibs-C$ make
    libtool --mode=compile cc -c  -W -Werror -Wall -std=c99 -posix -g -o 
socket.o socket.c
    rm -f .libs/socket.lo
    cc -c -W -Werror -Wall -std=c99 -posix -g socket.c  -fPIC -DPIC -o socket.o
    mv -f socket.o .libs/socket.lo
    cc -c -W -Werror -Wall -std=c99 -posix -g socket.c -o socket.o >/dev/null 
2>&1
    mv -f .libs/socket.lo socket.lo
    libtool --mode=compile cc -c  -W -Werror -Wall -std=c99 -posix -g -o strl.o 
strl.c
    rm -f .libs/strl.lo
    cc -c -W -Werror -Wall -std=c99 -posix -g strl.c  -fPIC -DPIC -o strl.o
    mv -f strl.o .libs/strl.lo
    cc -c -W -Werror -Wall -std=c99 -posix -g strl.c -o strl.o >/dev/null 2>&1
    mv -f .libs/strl.lo strl.lo
    libtool --mode=link cc -o libsitalibs.a socket.o strl.o Makefile -static
    ar cru libsitalibs.a socket.o strl.o  
    ranlib libsitalibs.a
    libtool --mode=link cc -o libsitalibs.la socket.lo strl.lo Makefile 
-version-number 1 -rpath /usr/lib
    rm -fr .libs/libsitalibs.la .libs/libsitalibs.* .libs/libsitalibs.*
    gcc -shared  socket.lo strl.lo   -Wl,-soname -Wl,libsitalibs.so.0 -o 
.libs/libsitalibs.so.0.0.0
    (cd .libs && rm -f libsitalibs.so.0 && ln -s libsitalibs.so.0.0.0 
libsitalibs.so.0)
    (cd .libs && rm -f libsitalibs.so && ln -s libsitalibs.so.0.0.0 
libsitalibs.so)
    ar cru .libs/libsitalibs.a  socket.o strl.o 
    ranlib .libs/libsitalibs.a
    creating libsitalibs.la
    (cd .libs && rm -f libsitalibs.la && ln -s ../libsitalibs.la libsitalibs.la)
%%%


And the output with libtool-1.5.6 :
%%%
    libtool --mode=compile cc -c  -W -Werror -Wall -std=c99 -posix -g -o 
socket.o socket.c
     cc -c -W -Werror -Wall -std=c99 -posix -g socket.c 
    mv -f socket.o .libs/socket.o
     cc -c -W -Werror -Wall -std=c99 -posix -g socket.c >/dev/null 2>&1
    libtool --mode=compile cc -c  -W -Werror -Wall -std=c99 -posix -g -o strl.o 
strl.c
     cc -c -W -Werror -Wall -std=c99 -posix -g strl.c 
    mv -f strl.o .libs/strl.o
     cc -c -W -Werror -Wall -std=c99 -posix -g strl.c >/dev/null 2>&1
    libtool --mode=link cc -o libsitalibs.a socket.o strl.o Makefile -static
    libtool --mode=link cc -o libsitalibs.la socket.lo strl.lo Makefile 
-version-number 1 -rpath /usr/lib
    rm -fr  .libs/libsitalibs.la .libs/libsitalibs.lai .libs/libsitalibs.so 
.libs/libsitalibs.so.1 .libs/libsitalibs.so.1.0.0
    cc -shared  .libs/socket.o .libs/strl.o    -Wl,-soname -Wl,libsitalibs.so.1 
-o .libs/libsitalibs.so.1.0.0
    (cd .libs && rm -f libsitalibs.so.1 && ln -s libsitalibs.so.1.0.0 
libsitalibs.so.1)
    (cd .libs && rm -f libsitalibs.so && ln -s libsitalibs.so.1.0.0 
libsitalibs.so)
    creating libsitalibs.la
    (cd .libs && rm -f libsitalibs.la && ln -s ../libsitalibs.la libsitalibs.la)
%%%


As you can see, no command is issued when I'm trying to build
libsitalibs.a with libtool-1.5.6.  (Note that I have recently added the
"-static" argument, while trying to make libtool-1.5 behave correctly).

Thank you.
Regards,
-- 
Jeremie LE HEN aka TtZ/TataZ                      address@hidden
                                                             address@hidden
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

Attachment: Makefile
Description: Text document


reply via email to

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