[Top][All Lists]

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

Re: Unhelpful automatic 3rd-party library linkage

From: Bob Friesenhahn
Subject: Re: Unhelpful automatic 3rd-party library linkage
Date: Tue, 29 Jun 2021 17:29:59 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

On Tue, 29 Jun 2021, Oleg Smolsky wrote:

...and I have figured out the source of the mystery linker flags: zmq build
leaves file which contains this:

# Libraries that this one depends upon.
dependency_libs=' -lrt -lpthread /opt/gcc-10/lib/../lib64/'

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 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 file needs to be found somehow.

Bob Friesenhahn,
GraphicsMagick Maintainer,
Public Key,

reply via email to

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