GNU bug report logs - #6627
Build failure when pthread.h isn’t available

Previous Next

Package: coreutils;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Tue, 13 Jul 2010 16:21:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6627 in the body.
You can then email your comments to 6627 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6627; Package coreutils. (Tue, 13 Jul 2010 16:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to ludo <at> gnu.org (Ludovic Courtès):
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 13 Jul 2010 16:21:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: bug-coreutils <at> gnu.org
Subject: Build failure when pthread.h isn’t available
Date: Tue, 13 Jul 2010 18:16:30 +0200
Hello,

Coreutils fails to build when <pthread.h> isn’t available:

--8<---------------cut here---------------start------------->8---
checking for pthread.h... no

[...]

make[2]: Entering directory `/tmp/nix-build-4w3pinfgcmz2majy85flyx53gp10wgvb-coreutils-8.5.89-9face-dirty-i586-pc-gnu.drv-0/coreutils-8.5.89-9face-dirty/lib'

[...]

ln -f pthread.in.h pthread.h || cp pthread.in.h pthread.h

[...]

i586-pc-gnu-gcc -std=gnu99  -I. -I../lib  -I../lib    -g -O2 -c sort.c
sort.c:236:3: error: expected specifier-qualifier-list before 'pthread_spinlock_t'
sort.c:243:3: error: expected specifier-qualifier-list before 'pthread_mutex_t'
sort.c: In function 'lock_node':
sort.c:3144:3: warning: implicit declaration of function 'pthread_spin_lock'

[...]
--8<---------------cut here---------------end--------------->8---

(From <http://hydra.nixos.org/build/484742>.)

This is because the Gnulib replacement doesn’t cover all the pthread API
that’s actually used.

A simple fix would be to enclose all the pthread-related code in
HAVE_PTHREAD_H and not use the Gnulib replacement.

BTW, why didn’t you choose OpenMP?  It may have made things easier.

Thanks,
Ludo’.




Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Wed, 14 Jul 2010 16:15:03 GMT) Full text and rfc822 format available.

Notification sent to ludo <at> gnu.org (Ludovic Courtès):
bug acknowledged by developer. (Wed, 14 Jul 2010 16:15:03 GMT) Full text and rfc822 format available.

Message #10 received at 6627-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 6627-done <at> debbugs.gnu.org
Subject: bug#6627: Build failure when pthread.h isn’t available
Date: Wed, 14 Jul 2010 17:13:19 +0100
> From: ludo <at> gnu.org (Ludovic Courtès)
> Date: Tue, 13 Jul 2010 18:16:30 +0200
>
> Hello,
> Coreutils fails to build when <pthread.h> isn’t available:

Thanks Ludo, I thought the fixed version would have built
before you noticed. I'll CC you the next time.
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=7f2ece89

cheers,
Pádraig.

p.s. I responding manually after I noticed the message
in the bug tracker, but not on the mailing list after 1 hour




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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 6627-done <at> debbugs.gnu.org
Subject: Re: bug#6627: Build failure when pthread.h isn’t available
Date: Thu, 15 Jul 2010 17:54:49 +0200
Hi Pádraig,

Pádraig Brady <P <at> draigBrady.com> writes:

>> From: ludo <at> gnu.org (Ludovic Courtès)
>> Date: Tue, 13 Jul 2010 18:16:30 +0200
>>
>> Hello,
>> Coreutils fails to build when <pthread.h> isn’t available:
>
> Thanks Ludo, I thought the fixed version would have built
> before you noticed. I'll CC you the next time.
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=7f2ece89

Cool, thanks.

FYI I just fixed pthread support in the cross-GNU build environment,
which fixes the ‘xbuild_gnu’ job on Hydra.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Aug 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 5 days ago.

Previous Next


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