GNU bug report logs - #12765
hpux: "configure --disable-threads" failure

Previous Next

Package: coreutils;

Reported by: John David Anglin <dave.anglin <at> bell.net>

Date: Mon, 29 Oct 2012 19:48:02 UTC

Severity: normal

To reply to this bug, email your comments to 12765 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#12765; Package coreutils. (Mon, 29 Oct 2012 19:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John David Anglin <dave.anglin <at> bell.net>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 29 Oct 2012 19:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John David Anglin <dave.anglin <at> bell.net>
To: bug-coreutils <at> gnu.org
Subject: "configure --disable-threads" doesn't work with coreutils-8.20
Date: Mon, 29 Oct 2012 15:39:08 -0400
The following build error occurs on hppa1.1-hp-hpux10.20:

  CC     src/sort.o
In file included from ../src/sort.c:26:0:
./lib/pthread.h: In function 'pthread_spin_init':
./lib/pthread.h:241:3: error: incompatible type for argument 2 of 
'pthread_mutex_init'
/usr/include/pthread.h:354:5: note: expected 'pthread_mutexattr_t' but 
argument is of type 'void *'
../src/sort.c: In function 'merge_tree_init':
../src/sort.c:3200:3: error: incompatible type for argument 2 of 
'pthread_mutex_init'
/usr/include/pthread.h:354:5: note: expected 'pthread_mutexattr_t' but 
argument is of type 'void *'
../src/sort.c: In function 'init_node':
../src/sort.c:3242:3: error: incompatible type for argument 2 of 
'pthread_mutex_init'
/usr/include/pthread.h:354:5: note: expected 'pthread_mutexattr_t' but 
argument is of type 'void *'
../src/sort.c: In function 'queue_init':
../src/sort.c:3312:3: error: incompatible type for argument 2 of 
'pthread_mutex_init'
/usr/include/pthread.h:354:5: note: expected 'pthread_mutexattr_t' but 
argument is of type 'void *'
../src/sort.c:3313:3: error: incompatible type for argument 2 of 
'pthread_cond_init'
/usr/include/pthread.h:378:5: note: expected 'pthread_condattr_t' but 
argument is of type 'void *'
../src/sort.c: In function 'sortlines':
../src/sort.c:3584:7: error: incompatible type for argument 2 of 
'pthread_create'
/usr/include/pthread.h:275:5: note: expected 'pthread_attr_t' but 
argument is of type 'void *'
../src/sort.c: In function 'main':
../src/sort.c:4210:22: error: storage size of 'act' isn't known
../src/sort.c:4215:9: warning: implicit declaration of function 
'cma_sigaction' [-Wimplicit-function-declaration]
make[2]: *** [src/sort.o] Error 1
make[2]: Leaving directory `/xxx/gnu/coreutils-8.20/objdir'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/xxx/gnu/coreutils-8.20/objdir'
make: *** [all] Error 2

hppa1.1-hp-hpux10.20 has DCE threads which predates the posix thread 
interface.

Dave

-- 
John David Anglin    dave.anglin <at> bell.net





Information forwarded to bug-coreutils <at> gnu.org:
bug#12765; Package coreutils. (Mon, 29 Oct 2012 21:14:01 GMT) Full text and rfc822 format available.

Message #8 received at 12765 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John David Anglin <dave.anglin <at> bell.net>
Cc: 12765 <at> debbugs.gnu.org
Subject: Re: bug#12765: "configure --disable-threads" doesn't work with
	coreutils-8.20
Date: Mon, 29 Oct 2012 14:10:31 -0700
On 10/29/2012 12:39 PM, John David Anglin wrote:
> hppa1.1-hp-hpux10.20 has DCE threads which predates the posix thread interface.

On such a platform, coreutils should run single-threaded
and shouldn't be mucking with DCE threads at all.
Can you investigate what went wrong?  Perhaps you can
send us the output of 'configure', and what's in config.h,
and the output of 'diff -u lib/pthread.in.h lib/pthread.h'.




Information forwarded to bug-coreutils <at> gnu.org:
bug#12765; Package coreutils. (Sun, 04 Nov 2012 02:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 12765 <at> debbugs.gnu.org (full text, mbox):

From: John David Anglin <dave.anglin <at> bell.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 12765 <at> debbugs.gnu.org
Subject: Re: bug#12765: "configure --disable-threads" doesn't work with
	coreutils-8.20
Date: Sat, 3 Nov 2012 22:35:51 -0400
[Message part 1 (text/plain, inline)]
On 29-Oct-12, at 5:10 PM, Paul Eggert wrote:

> On 10/29/2012 12:39 PM, John David Anglin wrote:
>> hppa1.1-hp-hpux10.20 has DCE threads which predates the posix  
>> thread interface.
>
> On such a platform, coreutils should run single-threaded
> and shouldn't be mucking with DCE threads at all.
> Can you investigate what went wrong?  Perhaps you can
> send us the output of 'configure', and what's in config.h,
> and the output of 'diff -u lib/pthread.in.h lib/pthread.h'.
>


The attached change results in a successful build of sort.   It's not
optimal but I tried to avoid messing with the automake files.  I also
note that sort only seems to support pthreads.

Sorry, it appears the configure output, etc, only went to Paul.

Dave
--
John David Anglin	dave.anglin <at> bell.net


[pthread.in.h.d.txt (text/plain, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#12765; Package coreutils. (Sun, 04 Nov 2012 07:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 12765 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John David Anglin <dave.anglin <at> bell.net>
Cc: 12765 <at> debbugs.gnu.org
Subject: Re: bug#12765: "configure --disable-threads" doesn't work with
	coreutils-8.20
Date: Sun, 04 Nov 2012 00:48:51 -0700
On 11/03/2012 07:35 PM, John David Anglin wrote:
> The attached change results in a successful build of sort.

I'm afraid that won't work, because it assumes that the
application uses both threadlib and pthread.

Why does coreutils use threadlib, anyway?
Does anybody know?  It seems like overkill
for what coreutils needs.




Information forwarded to bug-coreutils <at> gnu.org:
bug#12765; Package coreutils. (Sun, 04 Nov 2012 16:33:01 GMT) Full text and rfc822 format available.

Message #17 received at 12765 <at> debbugs.gnu.org (full text, mbox):

From: John David Anglin <dave.anglin <at> bell.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 12765 <at> debbugs.gnu.org
Subject: Re: bug#12765: "configure --disable-threads" doesn't work with
	coreutils-8.20
Date: Sun, 4 Nov 2012 11:29:24 -0500
On 4-Nov-12, at 2:48 AM, Paul Eggert wrote:

> On 11/03/2012 07:35 PM, John David Anglin wrote:
>> The attached change results in a successful build of sort.
>
> I'm afraid that won't work, because it assumes that the
> application uses both threadlib and pthread.

I don't see that it assumes that the application uses both threadlib
and pthreads.  As far as I can tell, sort doesn't use threadlib.

It uses pthreads.  Thus, a fallback is needed when pthreads
is not available.  If we are not using pthreads, we get a trivial
pthread implementation from lib/pthread.h with the change.

It seemed reasonable to base this on the configure variable
USE_POSIX_THREADS.  We could get the same result by
modifying the configure result for HAVE_PTHREAD_H, etc,
but the system does have a pthread.h header.  It's just not
usable.

Another alternative might be to convert sort to use threadlib.

Dave
--
John David Anglin	dave.anglin <at> bell.net







Information forwarded to bug-coreutils <at> gnu.org:
bug#12765; Package coreutils. (Sun, 04 Nov 2012 17:11:02 GMT) Full text and rfc822 format available.

Message #20 received at 12765 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John David Anglin <dave.anglin <at> bell.net>
Cc: 12765 <at> debbugs.gnu.org
Subject: Re: bug#12765: "configure --disable-threads" doesn't work with
	coreutils-8.20
Date: Sun, 04 Nov 2012 09:07:40 -0800
On 11/04/2012 08:29 AM, John David Anglin wrote:
> It seemed reasonable to base this on the configure variable
> USE_POSIX_THREADS.

But the problem is that USE_POSIX_THREADS is set by the
threadlib configuration.

> Another alternative might be to convert sort to use threadlib.

coreutils already uses threadlib, sort of, which is part of
the problem here.  I'm not sure why it does.  The idea
was supposed to be that it uses POSIX threads or nothing.




Changed bug title to 'hpux: "configure --disable-threads" failure' from '"configure --disable-threads" doesn't work with coreutils-8.20' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 06 Nov 2018 18:12:02 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.