curl / Mailing Lists / curl-library / Single Mail

curl-library

Undefined reference to pThread issue with 7.55.1

From: Dan Heinz <dheinz_at_softwarekey.com>
Date: Mon, 25 Sep 2017 13:43:19 +0000

Building curl 7.55.1 with the following:
./configure --with-ssl=$install_path/openssl_64 --enable-shared=no --without-libidn --without-ldap-lib --without-zlib

When I attempt to build and link curl to a test application, I get:

../../PLUSNative/Debug32/libPLUSNative.so: undefined reference to `pthread_detach'

../../PLUSNative/Debug32/libPLUSNative.so: undefined reference to `pthread_join'

../../PLUSNative/Debug32/libPLUSNative.so: undefined reference to `pthread_create'

collect2: error: ld returned 1 exit status

Adding -pthread to the compiler options of the test app fixes the issue, but I never needed to do this before (we've been using curl for years).

I rolled back and tested with 7.55.0 and it works with no issues. Going through the changelog I see one difference is --enable-threaded-resolver is defaulted to on. Unfortunately, there is a bug where I cannot turn it off (without the patch). I'm curious if I am on the right track here with the issue? Could it be due to the threaded resolver being on?

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-25