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
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

Reply via email to