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

2019-09-06 Thread Hamish MB
I have since figured out how to do this by adding -Wl, --verbose, and it shows the library that is being found is the right one, under /lib. I also have checked that this file contains the required symbols: readelf -Ws libpthread.so  | grep atfork    62: 0 FUNC    GLOBAL DEFAULT 

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

2019-09-06 Thread Hamish McIntyre-Bhatty
> 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

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

2019-09-05 Thread Hamish MB
EDIT: I found it in /lib/libpthread-2.8.so, and it does contain a reference to that function: "readelf -Ws libpthread-2.8.so  | grep atfork":    62: 0 FUNC    GLOBAL DEFAULT  UND __register_atfork@GLIBC_2.4 (4)    218: b46c    24 FUNC    GLOBAL DEFAULT   12

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

2019-09-05 Thread Hamish MB
I forgot to say that -lpthread is in the linker arguments, and near the end as one would expect. The full linker commandline is: arm-unknown-linux-gnueabi-gcc --sysroot=/home/wmt/nas-sysroot -shared  -Wl,--gc-sections -Wl,-z,defs -Wl,-soname -Wl,libsoftokn3.so 

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

2019-09-05 Thread Nathan Froyd
On Thu, Sep 5, 2019 at 8:56 AM Hamish MB 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' >