Re: Unhelpful automatic 3rd-party library linkage

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
On Tue, 29 Jun 2021, Oleg Smolsky wrote:

> ...and I have figured out the source of the mystery linker flags: zmq build
> leaves libzmq.la file which contains this:
>
> # Libraries that this one depends upon.
> dependency_libs=' -lrt -lpthread /opt/gcc-10/lib/../lib64/libstdc++.la'
>
> It looks like automake/libtool finds this file (BTW, when is it found?) and
> transforms `-lzmq` into a whole bunch of things (with explicit .so names
> and dependencies)...

Yes, that is part of the function of libtool. In fact (as you can 
see), the libstdc++.la file was provided with the compiler.

These are features that you may love or hate depending on what you are 
doing.

For example, if the information necessary to find the library is 
missing (and it is not in the default system library search path), 
then the program would fail to run!

If a program attempts to link with a library which depends on this 
library, then it would fail to link, or fail to run if the library can 
not be found.

The compilation toolchain you are using is set up to not put its 
libraries in the default system directories.  As a result, the 
libstc++.so.6 file needs to be found somehow.

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.