Static linking D apps for distribution to the cloud, etc.
mipri
mipri at minimaltype.com
Tue Oct 8 20:17:52 UTC 2019
On Tuesday, 8 October 2019 at 18:28:14 UTC, David J Kordsmeier
wrote:
> warning: Using 'gethostbyaddr' in statically linked
> applications requires at runtime the shared libraries from the
> glibc version used for linking
This is a well-known problem with GNU libc. Your best bets are
1. accepting dynamic linking on the target platform, and setting
up a
build system that's similar enough to it that deployment is easy.
Maybe setting LD_LIBRARY_PATH to point to deployed libraries that
you
can't get installed on the taget.
2. using something like flatpak or appimage.
3. using DNS resolution from a library outside of libc, and
hacking
phobos to use that instead of gethostbyaddr.
More information about the Digitalmars-d
mailing list