xserver compiling error...
Alexej Davidov
alexej.davidov at gmx.net
Fri Mar 24 11:42:16 PST 2006
On Tue, 21 Mar 2006 22:25:03 +0200
Daniel Stone <daniel at freedesktop.org> wrote:
> On Tue, Mar 21, 2006 at 10:27:56AM -0600, Efren Vzz. wrote:
> > make[5]: Entering directory
> > gcc -DHAVE_CONFIG_H -I. -I. -I../../../../include
> > -I../../../../include [...]
> > -fomit-frame-pointer -funroll-loops -mmmx -msse -MT lnx_agp.lo -MD
> > -MP
>
> First off, I'd recommend not using -fomit-frame-pointer and
> -funroll-loops. The former makes things basically impossible to
> debug, and the latter is pointless.
>
> > -MF .deps/lnx_
> > In file included from /usr/include/stdlib.h:414,
> > from ../../../../include/misc.h:152,
> > from ../../../../hw/xfree86/common/xf86str.h:38,
> > from ../../../../hw/xfree86/common/xf86.h:40,
> > from lnx_agp.c:20:
> > /usr/include/sys/types.h:62: conflicting types for `dev_t'
> > /usr/include/linux/types.h:21: previous declaration of `dev_t'
> > /usr/include/sys/types.h:67: conflicting types for `gid_t'
> > /usr/include/linux/types.h:48: previous declaration of `gid_t'
> > /usr/include/sys/types.h:72: conflicting types for `mode_t'
> > /usr/include/linux/types.h:23: previous declaration of `mode_t'
> > /usr/include/sys/types.h:77: conflicting types for `nlink_t'
> > /usr/include/linux/types.h:24: previous declaration of `nlink_t'
> > /usr/include/sys/types.h:82: conflicting types for `uid_t'
> > /usr/include/linux/types.h:47: previous declaration of `uid_t'
>
> These are all system headers. You'll need to fix your system somehow.
I don't believe the system headers are broken. I had a lot of errors,
too, concerning system headers. It only happened in the xgl-0-0-1 branch of xserver, though.
Here are some examples:
1)
xserver/xorg/hw/xfree86/os-support/xf86_ansic.h:
extern void* xf86memmove(void*,const void*,xf86size_t);
#include <xf86_ansic.h>
xserver/xorg/hw/xfree86/os-support/xf86_libc.h:
#define memmove(vp,cvp,I) xf86memmove(vp,cvp,I)
#define bcopy(vp,cvp,I) xf86memmove(cvp,vp,I)
Now ${MESA}/src/mesa/drivers/dri/common/glcontextmodes.c (symlinked to
by xserver) includes xf86_ansic.h via os.h and after that it includes
string.h, where both, bzero() and memmove() are redefined and you end
up with the following conflicting types in string.h:
extern void *memmove...
extern void bcopy...
which, of course, leads to a compiler error.
2)
Another one was this (again through xf86_ansic.h and xf86_libc.h):
typedef unsigned long xf86size_t;
#define size_t xf86size_t
#define bzero xf86bzero
extern void xf86bzero(void*, unsigned int);
Which, again, leaves you with a conflicting type in string.h, where
bzero is replaced by
extern void bzero(void *, unsigned long)
After I've fixed those by not including string.h in glcontextmodes.c, I
got a lot of other, similar errors. That was when I've decided to
postpone the project of compiling xgl to some day when I would have
more time. As I don't know much about the xorg source code I don't
really know, how this is supposed to be fixed.
Kind regards,
A.
More information about the xorg
mailing list