[Top][All Lists]

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

Treating static library as convenience library + other errors

From: kmescher
Subject: Treating static library as convenience library + other errors
Date: Fri, 26 Sep 2003 12:41:49 -0400

I'm having a problem with libtool linking in static libaries:

Let's assume my libtool link line has this:

... -Lsomedir -lfoo -Lsomeotherdir -lbar ...

In this case, libfoo.a exists, and there is no (non-libtool library)

-lbar does have

The file contains a run path, so I think that designates it as a 
non-convenience library.  (like it says in the manual)

When it starts to link, it extracts the objects from the convenience libaries.
I'm not quite sure why it doesn't just link in the convenience libraries (If 
someone can tell my why, please).

There are a few problems:

1. Even though is a libtool archive, it is installed, and has a run 
path.  But libtool still treats it like a convenience library (extracts all 
the objects).  This takes a fair amount of time to do (lots of objects in 
libbar), and causes the next two problems to manifest themselves.

2. Libtool assumes that the GNU archiver is being used.  There are options 
that are only present with the GNU archiver.  This is not the case on many 
non-GNU systems.  Luckily, the system I'm using does have the GNU archiver 
(gar), so I can use it.  Relying on the GNU archiver is very non-portable.  
This problem appears on Compaq Tru64 5.1 and Solaris 8.

3. The same sections of code use a invocation of uniq like this: uniq -cd
That particular invocation is non-portable (doesn't work on Solaris), since 
the c and d options are mutually exclusive.  Removing the d option allows 
libtool to work correctly.  This appears on Solaris 8.

reply via email to

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