This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arm-gdb-error


>>>>> arun%anwsi com@mail3 srivari net writes:

> hello friends
>  i am configuring ecos for arm7t ie arm-elf for pid.

> i got it correct upto building binutils and gcc.

> but there was an error when building gdb for arm stating that


> " /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdbool.h:39: conflicting
> types for 'true'

> .../bfd/bfd.h:102: previous declaration of "true"

> /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdbool.h:41: conflicting
> types for 'false'

> .../bfd/bfd.h:102: previous declaration of "false"
> make[1]: ***[utilis.o] error 1

> make[1]: leaving directory '/tmp/build/gdb/gdb'
> make : ***[ all-gdb] error 2

> make: leaving directory '/tmp/build/gdb'

> i am using very recent version of redhatlinux-7.3
> gcc-2.96.

> but i had compiled already in red-hatlinux-7.0

> can i know the reason for this??

This is an issue with include files that changed around the time of 7.2.
Here is a patch that should fix it. You'll have to rerun configure
after patching. You could also patch the bfd-in?.h in the bfd build
directory to save some time if you still have your build tree around.

--Mark


Index: bfd/bfd-in.h
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/bfd-in.h,v
retrieving revision 1.162.6.1
diff -u -p -5 -r1.162.6.1 bfd-in.h
--- bfd-in.h	2000/09/05 22:28:00	1.162.6.1
+++ bfd-in.h	2002/06/24 16:23:44
@@ -89,10 +89,15 @@ typedef struct _bfd bfd;
 /* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h>  -fnf */
 /* It gets worse if the host also defines a true/false enum... -sts */
 /* And even worse if your compiler has built-in boolean types... -law */
 #if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
 #define TRUE_FALSE_ALREADY_DEFINED
+#else
+#if defined (__bool_true_false_are_defined)
+/* We have <stdbool.h>.  */
+#define TRUE_FALSE_ALREADY_DEFINED
+#endif
 #endif
 #ifdef MPW
 /* Pre-emptive strike - get the file with the enum. */
 #include <Types.h>
 #define TRUE_FALSE_ALREADY_DEFINED
Index: bfd/bfd-in2.h
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/bfd-in2.h,v
retrieving revision 1.393.6.1
diff -u -p -5 -r1.393.6.1 bfd-in2.h
--- bfd-in2.h	2000/09/05 22:28:01	1.393.6.1
+++ bfd-in2.h	2002/06/24 16:23:46
@@ -89,10 +89,15 @@ typedef struct _bfd bfd;
 /* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h>  -fnf */
 /* It gets worse if the host also defines a true/false enum... -sts */
 /* And even worse if your compiler has built-in boolean types... -law */
 #if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
 #define TRUE_FALSE_ALREADY_DEFINED
+#else
+#if defined (__bool_true_false_are_defined)
+/* We have <stdbool.h>.  */
+#define TRUE_FALSE_ALREADY_DEFINED
+#endif
 #endif
 #ifdef MPW
 /* Pre-emptive strike - get the file with the enum. */
 #include <Types.h>
 #define TRUE_FALSE_ALREADY_DEFINED
Index: gdb/utils.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/utils.c,v
retrieving revision 1.246
diff -u -p -5 -r1.246 utils.c
--- utils.c	2000/07/30 01:50:06	1.246
+++ utils.c	2002/06/24 16:23:50
@@ -17,21 +17,23 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include "defs.h"
-#include <ctype.h>
-#include "gdb_string.h"
-#include "event-top.h"
+#include "config.h"
 
 #ifdef HAVE_CURSES_H
 #include <curses.h>
 #endif
 #ifdef HAVE_TERM_H
 #include <term.h>
 #endif
+
+#include "defs.h"
+#include <ctype.h>
+#include "gdb_string.h"
+#include "event-top.h"
 
 #ifdef __GO32__
 #include <pc.h>
 #endif

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]