curl / Mailing Lists / curl-library / Single Mail

curl-library

RE: Problem building curl 7.64.0 on AIX 7.2 using xlc 13.1.0

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 14 Mar 2019 11:28:25 +0100 (CET)

On Wed, 13 Mar 2019, Michael Schultz via curl-library wrote:

> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init
> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
> ld: 0711-317 ERROR: Undefined symbol: .pthread_join
> ld: 0711-317 ERROR: Undefined symbol: .pthread_create
> ld: 0711-317 ERROR: Undefined symbol: .pthread_detach

...

> So, this is definitely a problem with the pthread library.
>
> I'll dig into it some more.

You could try something like this to specifically add some libs:

LIBS="-ldl -lpthread" ./configure ...

configure really can't always detect every dependency when you build with
static libs so it might need some handholding.

> And I'm wondering if the -pthread shouldn't be -qthreaded on AIX. The
> 7.64.0 configure contains:
>
> CFLAGS="$CFLAGS -pthread"
> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
>
> It seems uncool to alter CFLAGS like that. The 7.49.1 configure doesn't just
> unilaterally append -pthread to the CFLAGS.

Believe it or not, but we actually work really hard on improving curl over
time so things change and we apparently deemed that change to be a sensible
one.

If you look a little further down (and I suggest you read the configure.ac
file and not configure) you'll see that it also *restores* CFLAGS again to the
former value if doing that -pthread attempt wasn't successful.

Or you saying that restore didn't work or that something else there is wrong?
I'm sure we can improve configure further. It will never be perfect and it
certainly has room for getting better.

> I haven't diff'd them, but the two configures appear to be different in this
> area, so someone has performed some work here.

The configure script has changed quite a lot in that time period of almost
three years. The configure.ac file alone was changed 98 times!

Unfortunately we don't have any AIX builds in our CI or autobuilds, so
regressions like this are not totally surprising. :-/

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-03-14