[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems building gdb
- Date: 18 Sep 1998 16:53:57 -0400
- From: ian at airs.com (ian at airs.com)
- Subject: problems building gdb
Date: Fri, 18 Sep 1998 14:33:52 -0700
From: "erik.ivanenko" <erik.ivanenko at utoronto.ca>
Using the bit_scripts, I have encountered the following problem:
gmake[1]: Entering directory
`/home/cross-19980908/tools/build-i386-gdb/mmalloc'
gcc -c -O2 -g -DHAVE_VALLOC=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1
-DHAVE_LIMITS_H=1 -DHAVE_STDDEF_H=1 -I.
-I../../gdb-4.17/mmalloc/../include ../../gdb-4.17/mmalloc/mm.c
In file included from /usr/include/fcntl.h:81,
from ../../gdb-4.17/mmalloc/mmap-sup.c:26,
from ../../gdb-4.17/mmalloc/mm.c:33:
/usr/include/unistd.h:766: conflicting types for `getpagesize'
../../gdb-4.17/mmalloc/mvalloc.c:27: previous declaration of
`getpagesize'
In file included from ../../gdb-4.17/mmalloc/mm.c:33:
../../gdb-4.17/mmalloc/mmap-sup.c:41: conflicting types for
`getpagesize'
/usr/include/unistd.h:766: previous declaration of `getpagesize'
gmake[1]: *** [mm.o] Error 1
gmake[1]: Leaving directory
`/home/cross-19980908/tools/build-i386-gdb/mmalloc'
gmake: *** [all-mmalloc] Error 2
ERROR: **** FAILED **** build
Note that files are being included from the host /usr/include
directory. This can't be right.
It is right, though. gdb is built for the host, not the target. You
aren't going to run gdb on your target board, you're going to run it
on your Unix system.
You didn't mention your host, but whatever it is the quick fix would
be to just remove the conflicting declarations of getpagesize from
mmalloc/mvalloc.c and mmalloc/mmap-sup.c.
Ian