About libpthread

Mahmood Naderan nt_mahmood@yahoo.com
Thu May 28 17:26:26 GMT 2020


>It's part of glibc.  On Linux, glibc used to support two thread
>libraries (LinuxThreads and NPTL), but that option is long gone.



Thank you. I use the following linker options:
-Wl,--emit-relocs install \-Wl,--dynamic-linker=/opt/glibc-2.23-install/lib/ld-2.23.so \-ldl -L/opt/glibc-2.23-install/lib/libpthread.so \-lcrypt -lpcre -lz \-Wl,-E

But I get this error

/usr/bin/ld: objs/src/core/ngx_shmtx.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line



If I change the pthread opttion to "-lpthread" then there is no problem.
May I know how can I fix that?


Regards,
Mahmood 



More information about the Libc-help mailing list