Bug 4883 - compile failure in lnx_agp.c
Summary: compile failure in lnx_agp.c
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Build/Modular (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
: 5362 (view as bug list)
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-10-25 14:40 UTC by David Schleef
Modified: 2005-12-19 13:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description David Schleef 2005-10-25 14:40:50 UTC
gcc -DHAVE_CONFIG_H -I. -I. -I../../../../include -I../../../../include -I../..
/../../include -I../../../../include -I../../../../include -I../../../../include
 -I../../../../hw/xfree86 -I../../../../hw/xfree86/include -I../../../../hw/xfre
e86/common -I../../../../hw/xfree86/os-support -I../../../../hw/xfree86/os-suppo
rt/bus -I../../../../os -I/usr/include/drm -DUSESTDRES -DHAVE_SYSV_IPC -DHAVE_XO
RG_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmis
sing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHO
WN -DHAS_STICKY_DIR_BIT -I/opt/xorg/include -I/usr/include/freetype2 -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 -O2 -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: 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
make[5]: Leaving directory `/home/ds/xorg/xserver/xorg/hw/xfree86/os-support/lin
ux'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/ds/xorg/xserver/xorg/hw/xfree86/os-support'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ds/xorg/xserver/xorg/hw/xfree86'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ds/xorg/xserver/xorg/hw/xfree86'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ds/xorg/xserver/xorg/hw'
make: *** [all-recursive] Error 1
Comment 1 David Schleef 2005-10-25 14:49:56 UTC
distro Ubuntu/breezy.
Comment 2 Adam Jackson 2005-10-26 11:02:46 UTC
toolchain bug:

http://lists.freedesktop.org/archives/xorg/2005-October/010694.html
Comment 3 Christian Hamar 2005-11-19 23:52:58 UTC
(In reply to comment #2)
> toolchain bug:
> 
> http://lists.freedesktop.org/archives/xorg/2005-October/010694.html

btw, if you modify lnx_agp.c as the following:

#if defined(linux)
#include <asm/ioctl.h>
#include <linux/agpgart.h>
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|| defined(__OpenBSD__) || defined(__DragonFly__)
#include <sys/ioctl.h>
#include <sys/agpio.h>
#endif

^^^^ Original

#if defined(linux)
+ #undef _LINUX_TYPES_H
+ #include <linux/types.h>
#include <asm/ioctl.h>
#include <linux/agpgart.h>
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|| defined(__OpenBSD__) || defined(__DragonFly__)
#include <sys/ioctl.h>
#include <sys/agpio.h>
#endif

^^^ Modified.

The problem dissapared at me. So just put two line to lnx_agp.c and solved.

Any comments ? Somebody else can test this too ?
Comment 4 Daniel Stone 2005-11-23 11:09:59 UTC
the patch in comment #3 is a nasty hack, and wrong
Comment 5 Adam Jackson 2005-11-30 16:48:04 UTC
no, i'm pretty sure it's a bug in the system headers and therefore not ours to
fix or work around.
Comment 6 Adam Jackson 2005-12-20 08:08:44 UTC
*** Bug 5362 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.