You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CPython uses glibc's `getaddrinfo()` to resolve hostnames. glibc tries to dynamically load the backend libs that implement the actual resolution, `libnss_files.so` and `libnss_dns.so` (as configured by staticx), which are unfortunately missing. When running staticx, it determines the libs to include by examining dependencies using `ldd`. For this reason, staticx adds a "fake" dependency on these two libs by linking `libnssfix` -- staticx's injected lib to configure nss to use only `files` and `dns` backends and ignore system configuration -- with `nss_files` and `nss_dns`. When building for ARM, we recompile staticx v0.13.6 with a patch that fixes some other static NSS issues (resolved in v0.13.7+) instead of using the prebuilt version from pypi.
The nss libs were never intended to be loaded by anything other than glibc itself, thus the `lib.so -> lib.so.X` symlinks for the linker are not installed. In turn, the linker complains that it cannot find `-lnss_files` and `-lnss_dns`. It appears that this was overcome by linking against fake _static_ libraries, thus preventing the creation of dependencies for `ldd` to discover.
The solution is simply to replace these with the `*.so` symlinks `ld` expects.
0 commit comments