Re: [EXTERNAL] Re: Q: library dependencies

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
On Fri, 25 Sep 2020, Oleg Smolsky wrote:

> On 2020-09-25 09:28, Bob Friesenhahn wrote:
>> With convenience libraries, there may be a necessary build order but the 
>> object files are not 'linked' before going into the convenience libraries 
>> (as a proper library would be) so all linking is when the final library or 
>> program is linked using the objects from the convenience libraries. 
>
> Hi Bob, how would I make a "proper" library? Would that change the 
> composition logic for my DAG of dependencies?

I find info on these topics at
https://www.gnu.org/software/libtool/manual/libtool.html#Static-libraries

According to the docs "If you omit both -rpath and -static, libtool 
will create a convenience library that can be used to create other 
libtool libraries, even shared ones."

and then

"When GNU Automake is used, you should use noinst_LTLIBRARIES instead 
of lib_LTLIBRARIES for convenience libraries, so that the -rpath 
option is not passed when they are linked."

Convenience libraries and static libraries do not technically have 
"dependencies" since they only represent a compilation step (no 
linking).  If a static library may also be built as a shared library 
then it may have dependencies and should be described as such.

The final shared library or program itself surely has "dependencies" 
since otherwise it might not successfully link due to unresolved 
symbols.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.