[Top][All Lists]

[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: Wed, 29 Jun 2005 11:20:18 +0200
User-agent: Mutt/1.5.9i

Hi Ralf,

thank you for spending your time resolving my problem.

> First, a note to your Makefile:
> | ${LIB_A}:       ${OBJS_A}
> |         libtool --mode=link ${CC} -o $@ $^ -static
> | 
> | # -rpath is mandatory, libtool --mode=install will fail otherwise.
> | ${LIB_SO}:      ${OBJS_SO}
> |         libtool --mode=link ${CC} -o $@ $^ -version-number ${VERSION} 
> -rpath ${DESTDIR}/usr/lib
> You don't need both of these rules.  As the output from 1.4 shows, the
> second one builds both static and shared libraries.
> I would write like this (modulo naming):
> | LIBTOOL = libtool
> | 
> | $(OBJS_LA)
> |         $(LIBTOOL) $(LIBTOOLFLAGS) --mode=link $(CC) -o $@ $^ 
> -version-number ${VERSION} -rpath /usr/lib

Ok, I'll do that.  Note as far as I read the documentation, this is not
explicitely explained that compiling a shared library also produces a
static one.

> You should really omit $(DESTDIR) in -rpath here (but not in the install
> rules)!

Done, I didn't know that.

> I'd also write
> | clean:
> |        $(LIBTOOL) --mode=clean /bin/rm $(OBJS_SO)
> which should remove all your built objects

Ok, I didn't know that too :-).  I've had a look through the
documentation, it would be worth to give an example of the use of
this mode, IMHO.

> Now back to the problem: Show
> $ libtool --config 
> $ libtool --features
> for both versions.  Next question might be that I'd like you to try
> 1.5.18, in order to prevent any known regressions from skewing what we
> see here (unless it's obvious from above output what's happening here).
> If you do build 1.5.18 yourself, show output of its configure run plus
> config.log as well.

Note that both version of libtool I use actually are issued from Debian
unstable (sid).  Package "libtool1.4" provides libtool-1.4.3 and package
"libtool" provides libtool-1.5.6.  They are mutually exclusive.
I'm building libtool-1.5.18 using the debian/ directory from the libtool
package.  The typescript of package building is attached too ; FYI,
the configure script output begins at line 91 and ends at about line
370.  While here, I got --config and --features from the latter too.
I didn't attached everything though, to avoid flooding the mail server,
please look at the following URLs :

I think I got my problem resolved by using the lastest version of
libtool (1.5.18) : with exactly the same command sequence, I get
a static library with libtool-1.5.18 in the .libs/ directory, while
libtool-1.5.6 doesn't produce it.  Is it a known behaviour ?  Are there
any workaround to this, except upgrading my libtool version (we have
our own Debian distribution at work, and upgrading a package in it is,
unfortunately, a heavy process, especially when the package is still
not released by the Debian maintainer) ?  If there isn't, I would send
a notice to the Debian maintainer to let him know about this bug.

Thanks again.
Best regards,
Jeremie LE HEN aka TtZ/TataZ                      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: libtool-1.4.3--config
Description: Text document

Attachment: libtool-1.4.3--features
Description: Text document

Attachment: libtool-1.5.6--config
Description: Text document

Attachment: libtool-1.5.6--features
Description: Text document

reply via email to

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