fail compiling linx_agp.c [was: Re: build modular Xorg failed: 'EBADF' undeclared]

Carlos Eduardo Rodrigues Diógenes cerdiogenes at yahoo.com.br
Wed May 17 08:32:56 PDT 2006


On Wed, 2006-05-17 at 18:12 +0200, Enrico Weigelt wrote:
> * Carlos Eduardo Rodrigues Di?genes <cerdiogenes at yahoo.com.br> schrieb:
> 
> <snip>
> 
> > > > Where EBADF, EINVAL and EINTR are declared?
> > > 
> > > errno.h
> > > 
> > > What operating system are you on?
> > 
> > I'm on a Ubuntu 5.10 system.
> 
> At my local copy (latest release), errno.h is explicitly included
> from WaitFor.c - so probably your headers are broken.
> 
> Did you check your system header files ? 

Thanks, I broked my header files trying to correct this:

gcc -DHAVE_CONFIG_H -I. -I. -I../../../../include -I../../../../include
-I../../../../include -I../../../../include -I../../../../include
-I../../../../include -I../../../../include -I../../../../include
-I../../../../hw/xfree86 -I../../../../hw/xfree86/include
-I../../../../hw/xfree86/common -I../../../../hw/xfree86/os-support
-I../../../../hw/xfree86/os-support/bus -I../../../../os
-I/usr/include/drm -DUSESTDRES -DHAVE_SYSV_IPC -DHAVE_XORG_CONFIG_H
-DXF86PM -DHAVE_ACPI -DHAVE_APM -DXFree86Server -DXFree86LOADER -Wall
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing
-D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT
-I/home/kadu/modular/include -I../../../../include -I../../../../include
-I../../../../Xext -I../../../../composite -I../../../../damageext
-I../../../../xfixes -I../../../../Xi -I../../../../mi
-I../../../../miext/shadow -I../../../../miext/damage
-I../../../../render -I../../../../randr -I../../../../fb -g -MT
lnx_agp.lo -MD -MP -MF .deps/lnx_agp.Tpo -c lnx_agp.c  -fPIC -DPIC
-o .libs/lnx_agp.o
In file included from lnx_agp.c:24:
/usr/include/linux/agpgart.h:55: error: syntax error before '__u16'
/usr/include/linux/agpgart.h:60: error: field 'version' has incomplete
type
/usr/include/linux/agpgart.h:61: error: syntax error before '__u32'
/usr/include/linux/agpgart.h:68: error: syntax error before '}' token
/usr/include/linux/agpgart.h:71: error: syntax error before '__u32'
/usr/include/linux/agpgart.h:92: error: syntax error before '__u32'
/usr/include/linux/agpgart.h:106: error: syntax error before '__u32'
lnx_agp.c: In function 'GARTInit':
lnx_agp.c:65: error: storage size of 'agpinf' isn't known
lnx_agp.c:65: warning: unused variable 'agpinf'
lnx_agp.c: In function 'xf86GetAGPInfo':
lnx_agp.c:129: error: storage size of 'agpinf' isn't known
lnx_agp.c:129: warning: unused variable 'agpinf'
lnx_agp.c: In function 'xf86AllocateGARTMemory':
lnx_agp.c:221: error: storage size of 'alloc' isn't known
lnx_agp.c:221: warning: unused variable 'alloc'
lnx_agp.c:253: warning: control reaches end of non-void function
lnx_agp.c: In function 'xf86UnbindGARTMemory':
lnx_agp.c:324: error: storage size of 'unbind' isn't known
lnx_agp.c:324: warning: unused variable 'unbind'
lnx_agp.c: In function 'xf86EnableAGP':
lnx_agp.c:356: error: syntax error before 'setup'
lnx_agp.c:361: error: 'setup' undeclared (first use in this function)
lnx_agp.c:361: error: (Each undeclared identifier is reported only once
lnx_agp.c:361: error: for each function it appears in.)
make[5]: *** [lnx_agp.lo] Error 1

The kernel-headers package that I have installed (I reinstalled it) in
my ubuntu 5.10 is linux-kernel-headers (installed version = latest
version = 2.6.11.2-0ubuntu13)

Someone know how to resolve this?

> On Linux, these #define's should be actually in the kernel headers.
> 
> 
> cu
-- 
Carlos Eduardo Rodrigues Diógenes




More information about the xorg mailing list