GNU bug report logs - #8845
build failure on HP-UX 11.31

Previous Next

Package: coreutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Mon, 13 Jun 2011 08:51:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

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 8845 in the body.
You can then email your comments to 8845 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#8845; Package coreutils. (Mon, 13 Jun 2011 08:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Mon, 13 Jun 2011 08:51:02 GMT) Full text and rfc822 format available.

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

From: Bruno Haible <bruno <at> clisp.org>
To: bug-coreutils <at> gnu.org
Subject: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 10:49:57 +0200
Trying to compile coreutils-8.12 on HP-UX 11.31 with cc, I get this build
failure:


  CC       file-set.o
cc: "file-set.h", line 9: error 1000: Unexpected symbol: "2".
cc: "file-set.h", line 7: error 1670: Illegal attribute nonnull specified.
gmake[4]: *** [file-set.o] Error 1


Here's a possible patch that fixes it.


2011-06-13  Bruno Haible  <bruno <at> clisp.org>

	Update after __attibute__ is no longer defined by gnulib.
	* lib/file-set.h (record_file): Use __attribute__ only with compiler
	versions that support it.

*** lib/file-set.h.bak  Sun Apr 24 17:21:45 2011
--- lib/file-set.h      Mon Jun 13 08:39:59 2011
***************
*** 6,12 ****
  
  extern void record_file (Hash_table *ht, char const *file,
                           struct stat const *stats)
!   __attribute__ ((nonnull (2, 3)));
  
  extern bool seen_file (Hash_table const *ht, char const *file,
                         struct stat const *stats);
--- 6,15 ----
  
  extern void record_file (Hash_table *ht, char const *file,
                           struct stat const *stats)
! #if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3)
!   __attribute__ ((nonnull (2, 3)))
! #endif
! ;
  
  extern bool seen_file (Hash_table const *ht, char const *file,
                         struct stat const *stats);

-- 
In memoriam Anna Göldi <http://en.wikipedia.org/wiki/Anna_Göldi>




Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Mon, 13 Jun 2011 09:24:01 GMT) Full text and rfc822 format available.

Notification sent to Bruno Haible <bruno <at> clisp.org>:
bug acknowledged by developer. (Mon, 13 Jun 2011 09:24:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 8845-done <at> debbugs.gnu.org
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 11:23:35 +0200
Bruno Haible wrote:
> Trying to compile coreutils-8.12 on HP-UX 11.31 with cc, I get this build
> failure:
>
>   CC       file-set.o
> cc: "file-set.h", line 9: error 1000: Unexpected symbol: "2".
> cc: "file-set.h", line 7: error 1670: Illegal attribute nonnull specified.
> gmake[4]: *** [file-set.o] Error 1
>
>
> Here's a possible patch that fixes it.
>
>
> 2011-06-13  Bruno Haible  <bruno <at> clisp.org>
>
> 	Update after __attibute__ is no longer defined by gnulib.
> 	* lib/file-set.h (record_file): Use __attribute__ only with compiler
> 	versions that support it.

Thanks for reporting/fixing that, Bruno.
I've adjusted the log slightly.  Since it still has your
name on it, I'll wait for an explicit "ok" before pushing.
Or you may.

I like to put the affected module name in the
one-line summary and think it's worthwhile to mention the
build failure and affected system in the log, too.

From d223e25b27f262a3478fd181f50b2952540f2571 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno <at> clisp.org>
Date: Mon, 13 Jun 2011 11:19:42 +0200
Subject: [PATCH] file-set.h: guard __attibute__ use, now that it's not always
 defined

* lib/file-set.h (record_file): Use __attribute__ only with compiler
versions that support it.  This fixes a coreutils build failure with
CC=cc on HP-UX 11.31.
---
 ChangeLog      |    7 +++++++
 lib/file-set.h |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7af3f05..f496314 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-13  Bruno Haible  <bruno <at> clisp.org>
+
+	file-set.h: guard __attibute__ use, now that it's not always defined
+	* lib/file-set.h (record_file): Use __attribute__ only with compiler
+	versions that support it.  This fixes a coreutils build failure with
+	CC=cc on HP-UX 11.31.
+
 2011-06-12  Bruno Haible  <bruno <at> clisp.org>

 	acl: Add support for HP-UX >= 11.11 JFS ACLs.
diff --git a/lib/file-set.h b/lib/file-set.h
index 28d42fe..4e47d95 100644
--- a/lib/file-set.h
+++ b/lib/file-set.h
@@ -6,7 +6,10 @@

 extern void record_file (Hash_table *ht, char const *file,
                          struct stat const *stats)
-  __attribute__ ((nonnull (2, 3)));
+#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3)
+  __attribute__ ((nonnull (2, 3)))
+#endif
+;

 extern bool seen_file (Hash_table const *ht, char const *file,
                        struct stat const *stats);
--
1.7.6.rc0.293.g40857




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

From: Bruno Haible <bruno <at> clisp.org>
To: Jim Meyering <jim <at> meyering.net>
Cc: 8845-done <at> debbugs.gnu.org
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 11:30:15 +0200
Hi Jim,

> I've adjusted the log slightly.  Since it still has your
> name on it, I'll wait for an explicit "ok" before pushing.
> ...
> CC=cc on HP-UX 11.31.

I didn't use CC=cc - that doesn't work on HP-UX - but rather
CC="cc -Ae -D_XOPEN_SOURCE=500", like mentioned in the INSTALL file.

> Or you may.

I cannot push into coreutils.

Bruno
-- 
In memoriam Anna Göldi <http://en.wikipedia.org/wiki/Anna_Göldi>




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

From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 8845-done <at> debbugs.gnu.org
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 11:39:09 +0200
Bruno Haible wrote:

> Hi Jim,
>
>> I've adjusted the log slightly.  Since it still has your
>> name on it, I'll wait for an explicit "ok" before pushing.
>> ...
>> CC=cc on HP-UX 11.31.
>
> I didn't use CC=cc - that doesn't work on HP-UX - but rather
> CC="cc -Ae -D_XOPEN_SOURCE=500", like mentioned in the INSTALL file.

Thanks.  I've corrected that.

>> Or you may.
>
> I cannot push into coreutils.

The affected file is in gnulib.
I've gone ahead and pushed it.

From 258036d8674583fce2002a04afc996f18c8b8486 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno <at> clisp.org>
Date: Mon, 13 Jun 2011 11:19:42 +0200
Subject: [PATCH] file-set.h: guard __attibute__ use, now that it's not always
 defined

* lib/file-set.h (record_file): Use __attribute__ only with compiler
versions that support it.  This fixes a coreutils build failure with
/bin/cc on HP-UX 11.31.
---
 ChangeLog      |    7 +++++++
 lib/file-set.h |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7af3f05..e4a4a70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-13  Bruno Haible  <bruno <at> clisp.org>
+
+	file-set.h: guard __attibute__ use, now that it's not always defined
+	* lib/file-set.h (record_file): Use __attribute__ only with compiler
+	versions that support it.  This fixes a coreutils build failure with
+	/bin/cc on HP-UX 11.31.
+
 2011-06-12  Bruno Haible  <bruno <at> clisp.org>

 	acl: Add support for HP-UX >= 11.11 JFS ACLs.
diff --git a/lib/file-set.h b/lib/file-set.h
index 28d42fe..4e47d95 100644
--- a/lib/file-set.h
+++ b/lib/file-set.h
@@ -6,7 +6,10 @@

 extern void record_file (Hash_table *ht, char const *file,
                          struct stat const *stats)
-  __attribute__ ((nonnull (2, 3)));
+#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3)
+  __attribute__ ((nonnull (2, 3)))
+#endif
+;

 extern bool seen_file (Hash_table const *ht, char const *file,
                        struct stat const *stats);
--
1.7.6.rc0.293.g40857




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

From: Bruno Haible <bruno <at> clisp.org>
To: Jim Meyering <jim <at> meyering.net>
Cc: 8845-done <at> debbugs.gnu.org
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 11:51:39 +0200
Hi Jim,

> The affected file is in gnulib.

Oh, I see.

> /bin/cc on HP-UX 11.31.

Actually it was /opt/ansic/bin/cc, not /bin/cc. I correct the ChangeLog
entry.

Bruno
-- 
In memoriam Anna Göldi <http://en.wikipedia.org/wiki/Anna_Göldi>




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

From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 8845-done <at> debbugs.gnu.org
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 11:54:19 +0200
Bruno Haible wrote:

> Hi Jim,
>
>> The affected file is in gnulib.
>
> Oh, I see.
>
>> /bin/cc on HP-UX 11.31.
>
> Actually it was /opt/ansic/bin/cc, not /bin/cc. I correct the ChangeLog
> entry.

Thanks.
I'll adjust the coreutils/NEWS entry, too.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8845; Package coreutils. (Mon, 13 Jun 2011 14:42:01 GMT) Full text and rfc822 format available.

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

From: Eric Blake <eblake <at> redhat.com>
To: 8845 <at> debbugs.gnu.org, jim <at> meyering.net
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 08:40:59 -0600
[Message part 1 (text/plain, inline)]
On 06/13/2011 03:23 AM, Jim Meyering wrote:
> +++ b/lib/file-set.h
> @@ -6,7 +6,10 @@
> 
>  extern void record_file (Hash_table *ht, char const *file,
>                           struct stat const *stats)
> -  __attribute__ ((nonnull (2, 3)));
> +#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3)
> +  __attribute__ ((nonnull (2, 3)))
> +#endif
> +;

I'm not a fan of in-declaration #ifdefs; can we rewrite this to:

#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) ||
__GNUC__ > 3)
# define ATTRIBUTE_NONNULL(a)  __attribute__ ((nonnull (a)))
#else
# define ATTRIBUTE_NONNULL(a) /* ignored */
#endif

extern void record_file (Hash_table *ht, char const *file,
                         struct stat const *stats)
  ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#8845; Package coreutils. (Mon, 13 Jun 2011 15:01:01 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Eric Blake <eblake <at> redhat.com>
Cc: 8845 <at> debbugs.gnu.org
Subject: Re: bug#8845: build failure on HP-UX 11.31
Date: Mon, 13 Jun 2011 17:00:16 +0200
Eric Blake wrote:
> On 06/13/2011 03:23 AM, Jim Meyering wrote:
>> +++ b/lib/file-set.h
>> @@ -6,7 +6,10 @@
>>
>>  extern void record_file (Hash_table *ht, char const *file,
>>                           struct stat const *stats)
>> -  __attribute__ ((nonnull (2, 3)));
>> +#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3)
>> +  __attribute__ ((nonnull (2, 3)))
>> +#endif
>> +;
>
> I'm not a fan of in-declaration #ifdefs; can we rewrite this to:
>
> #if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) ||
> __GNUC__ > 3)
> # define ATTRIBUTE_NONNULL(a)  __attribute__ ((nonnull (a)))
> #else
> # define ATTRIBUTE_NONNULL(a) /* ignored */
> #endif
>
> extern void record_file (Hash_table *ht, char const *file,
>                          struct stat const *stats)
>   ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);

I feel the same way, but that definition would impinge on the name space
of any application that includes file-set.h.  IMHO, in this case,
name-space cleanliness trumps aesthetics, especially in a header
file that will rarely be read by a human.




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

This bug report was last modified 13 years and 347 days ago.

Previous Next


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