Peter Djalaliev wrote, On 2007-12-10 21:24:
> I included -ldbm, which fixed the unresolved references to 'dbopen'.
> However, i still get the following warnings:

> warning: Using 'getaddrinfo' in statically linked applications
> requires at runtime the shared libraries from the glibc version used
> for linking

> Using 'gethostbyaddr_r' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking

> Using 'gethostbyname2_r' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking

> Using 'gethostbyname_r' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking

> Using 'getprotobynumber_r' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for
> linking

> Using 'getprotobyname_r' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking

These are all system functions from glibc.

> Is there any way to link my static executable, so that the shared
> glibc library is not required during runtime?  I want to run the
> executable in an isolated part of the filesystem, where it will not
> have access to the shared libraries.

Peter, IIRC, the official position is that use of NSS and NSPR as static
non-shared libraries is not supported, at least not on some platforms.
The problem is only going to get worse as NSS develops
further.

If you are trying to get an NSS-based program to run in "chroot jail",
then use the same solution that is used to get ftpd to run in chroot
jail for anonymous ftp.  Create the necessary /lib, /usr/lib (etc.)
directories under the chrooted root, and hard link (not symlink) or copy
the necessary shared libs into them.  That's my advice.

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to