pkgsrc-Bugs archive

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

pkg/45699: Gnome (current) gdm build stops with "error: expected ';', ',' or ')' before '_Bool'"



>Number:         45699
>Category:       pkg
>Synopsis:       Gnome (current) gdm build stops with "error: expected ';', ',' 
>or ')' before '_Bool'"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 08 21:35:00 +0000 2011
>Originator:     Michael L. Riechers
>Release:        NetBSD 5.99.56
>Organization:
M L Riechers Systems Engineering
        
>Environment:
Building "/usr/pkgsrc/meta-pkgs/gnome"
        
        
System: NetBSD rterm.rse.com 5.99.56 NetBSD 5.99.56 (GENERIC) #0: Fri Nov 18 
22:32:24 EST 2011 
root%rterm.rse.com@localhost:/usr/local/src/usr/usr.current.20111112/src/sys/arch/amd64/compile/obj/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
>Description:
        
While compiling "/usr/pkgsrc/meta-pkgs/gnome", compiling 
/usr/local/src/pkgsrcstuff/pkgsrc.current.20111112/x11/gdm/work/gdm-2.20.11/daemon/misc.c
stopped with error message:

In file included from misc.c:56:0:
misc.h:143:0: warning: "C_" redefined
/usr/local/src/pkgsrcstuff/pkgsrc.current.20111112/x11/gdm/work/.buildlink/include/glib/glib-2.0/glib/gi18n.h:31:0:
 note: this is the location of the previous definition
In file included from ../common/gdm-common.h:37:0,
                 from misc.c:60:
../common/gdm-config.h:160:27: error: expected ';', ',' or ')' before '_Bool'
../common/gdm-config.h:169:27: error: two or more data types in declaration 
specifiers
../common/gdm-config.h:204:25: error: two or more data types in declaration 
specifiers

Investigation revealed all three errors emanated from the same root:

_Bool was substituted for bool, which caused gcc to barf, since _Bool is a 
typedef.

The following is a diff between the pre-processed misc.c produced from NetBSD 
5.1.1,
and the pre-processed misc.c produced from NetBSD current:

--- 
/usr/local/src/pkgsrcstuff/pkgsrc.20110911/x11/gdm/work/gdm-2.20.11/daemon/misc.cpeepee
     2011-12-08 12:49:19.000000000 -0500
+++ 
/usr/local/src/pkgsrcstuff/pkgsrc.current.20111112/x11/gdm/work/gdm-2.20.11/daemon/misc.cpeepee
     2011-12-07 18:30:49.000000000 -0500

lines 4913-4945 byte 169885 of the .cpp file:
-
-
-# 1 "/usr/include/machine/int_const.h" 1 3 4
-/*     $NetBSD: int_const.h,v 1.3 2008/10/26 00:08:15 mrg Exp $        */
+# 1 "/usr/include/stdbool.h" 1 3 4
+/*     $NetBSD: stdbool.h,v 1.3 2008/04/28 20:22:54 martin Exp $       */
 
 /*-
- * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by Klaus Klein.
+ * by Jason R. Thorpe of Wasabi Systems, Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -12684,445 +12771,98 @@
  */
 
 
-#define _AMD64_INT_CONST_H_ 
+#define _STDBOOL_H_ 
 
 
+#define bool _Bool
 
-/*
- * 7.18.4 Macros for integer constants
- */
+#define true 1
+#define false 0


@@ -39087,7 +39893,7 @@
          char **str);
 gboolean gdm_config_get_bool_for_id (GdmConfig *config,
          int id,
-         gboolean *bool);
+         gboolean *_Bool);
 gboolean gdm_config_get_int_for_id (GdmConfig *config,
          int id,
          int *integer);
@@ -39096,7 +39902,7 @@
          char *str);
 gboolean gdm_config_set_bool_for_id (GdmConfig *config,
          int id,
-         gboolean bool);
+         gboolean _Bool);
 gboolean gdm_config_set_int_for_id (GdmConfig *config,
          int id,
          int integer);
@@ -39131,7 +39937,7 @@
 void gdm_config_value_set_int (GdmConfigValue *value,
        int integer);
 void gdm_config_value_set_bool (GdmConfigValue *value,
-       gboolean bool);
+       gboolean _Bool);
 char * gdm_config_value_to_string (const GdmConfigValue *value);


/usr/include/stdbool.h defines bool as _Bool:

#ifndef _STDBOOL_H_
#define _STDBOOL_H_

#ifndef __cplusplus
#define bool    _Bool

#define true    1
#define false   0
#else

The new /usr/include/net/if.h calls /usr/include/stdbool.h, which it
didn't before:

--- /usr/include/net/if.h       2011-09-12 15:07:28.000000000 -0400
+++ /mnt/usr/include/net/if.h   2011-11-17 18:40:38.000000000 -0500
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.140 2008/10/24 17:07:33 dyoung Exp $  */
+/*     $NetBSD: if.h,v 1.154 2011/10/25 22:26:18 dyoung Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -63,6 +63,10 @@
 #ifndef _NET_IF_H_
 #define _NET_IF_H_
 
+#if !defined(_KERNEL) && !defined(_STANDALONE)
+#include <stdbool.h>
+#endif
+
 #include <sys/featuretest.h>


>How-To-Repeat:
        
using NetBSD current, cd /usr/pkgsrc/meta-pkgs/gnome; make

>Fix:
        
change bool in misc.c to something else, or
change/condition if.h to not call stdbool.h, or
Nuke stdbool.h.

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index