[zeromq-dev] Statically linking libzmq
Phillip Mienk
mienkphi at gmail.com
Thu Oct 30 22:27:58 CET 2014
I've recently tried linking libzmq/czmq/czmqpp statically, resulting in
multiple warnings of the form:
warning: Using 'getgrgid' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
warning: Using 'getpwuid' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
warning: Using 'getaddrinfo' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
I believe the warnings to be expected, though when using ldd to inspect the
resulting binary, "not a dynamic executable" is returned. Given that was
my intent, I assume my process to be correct. However, when executing any
tests involving network communication over libzmq, I fail to see either
error or any response.
In trying to narrow my issue down, I decided to try and build libzmq
statically, linking to its test suite statically. I achieved this via the
following:
./configure --with-libsodium LDFLAGS="-static" PKG_CONFIG="pkg-config
--static"
make check LDFLAGS="-all-static"
All code compiles with the same above warnings, and tests execute with 15
failures. I've attached the resulting test-suite.log which indicates the
failures.
I'm curious to know, does someone know of a way to build and statically
link the libzmq tests in such a way that they pass? Is this a problem in
my process or an issue with linking libzmq?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141030/4111403d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-suite.log
Type: application/octet-stream
Size: 1519 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141030/4111403d/attachment.obj>
More information about the zeromq-dev
mailing list