autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libpthread check immature and broken


From: kordex -
Subject: Re: libpthread check immature and broken
Date: Fri, 27 Nov 2009 17:16:29 +0200

2009/11/27 Eric Blake <address@hidden>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to kordex - on 11/27/2009 6:33 AM:
>> I found libpthread check broken on hpux and the cause is obvious.
>> First of all it does not include <pthread.h> second of all invoking
>> pthread_create() without arguments will cause an error. as third
>> argument pthread_create must be under main().
>
> Unfortunately, you are patching the wrong thing.  configure is a generated
> script, your patch needs to touch the upstream file for things to make a
> difference.  Furthermore, it looks like you are patching an AC_LINK_IFELSE
> test, whose job is to determine whether there is an external symbol named
> pthread_create that can be linked against (hence the re-declaration with
> the odd signature), and not whether it can be called properly (the test
> program being linked cannot be successfully run).  If you were patching an
> AC_RUN_IFELSE test, it would make sense.
>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             address@hidden
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAksP1+UACgkQ84KuGfSFAYDs9gCguKpFbxbzKtaziWPkGhPh0eag
> YW8An1OBVO65v0euycLcnx0/k+XbUDTO
> =TE0K
> -----END PGP SIGNATURE-----
>

Yes, doing the wrong thing is most likely to happen when one does not
know the software one is trying to work with. But why does confgure
fail even if there is -lpthread and <pthread.h> available on hpux? i
can compile and link (and run programs) with gcc mypthread.source.c
-lpthread . But still configure does not detect the presence of
pthreads.

--Mikko




reply via email to

[Prev in Thread] Current Thread [Next in Thread]