Re: Issues cross compiling NSS for arm undefined reference to pthread_atfork

Nathan Froyd <[email protected]>
Newsgroups gmane.comp.mozilla.crypto
Message-ID <CAGepuVK0Htf5QB_Avy=zrTC4f2m+6CUWCYm+pBETaCRbPsaWyg@mail.gmail.com>
On Thu, Sep 5, 2019 at 8:56 AM Hamish MB <[email protected]> wrote:
> The build gets a fair way, but eventually fails with:
>
> Linux2.6_arm_glibc_PTH_DBG.OBJ/pkcs11.o: In function `nsc_CommonInitialize':
> /home/wmt/Downloads/nss-3.25.1/nss/lib/softoken/pkcs11.c:3022: undefined
> reference to `pthread_atfork'
> collect2: error: ld returned 1 exit status
>
> I checked my armv5 rootfs, and pthread.h is present and contains a
> definition for pthread_atfork, so I'm not sure what the cause of this
> error is.

The error is not about whether you have definitions in your header
files; the error is about the linker being unable to find a definition
for `pthread_atfork` in whatever libraries you're linking against.
I'd check whether your LDFLAGS specified to `make` are actually
getting through to your link command (and whether you're supposed to
be using `-lpthread`, `-pthread`, or `-pthreads`...), what libraries
your linker command is trying to link against, and whether those
libraries contain the expected definitions.

-Nathan
-- 
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.