Bug 10446 - compilation failure due to <asm/types.h> not being included
Summary: compilation failure due to <asm/types.h> not being included
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 14:51 UTC by Paul Jarc
Modified: 2010-08-09 12:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Paul Jarc 2007-03-28 14:51:19 UTC
I'm building xorg-server-1.2.99.903.  The compilation ends with:

In file included from lnx_agp.c:23:
/package/host/code.dogmap.org/foreign/xorg-server-1.2.99.903+spf+0/conf/glibc/include/linux/agpgart.h:55: error: expected specifier-qualifier-list before '__u16'
/package/host/code.dogmap.org/foreign/xorg-server-1.2.99.903+spf+0/conf/glibc/include/linux/agpgart.h:61: error: expected specifier-qualifier-list before '__u32'
/package/host/code.dogmap.org/foreign/xorg-server-1.2.99.903+spf+0/conf/glibc/include/linux/agpgart.h:71: error: expected specifier-qualifier-list before '__u32'
/package/host/code.dogmap.org/foreign/xorg-server-1.2.99.903+spf+0/conf/glibc/include/linux/agpgart.h:92: error: expected specifier-qualifier-list before '__u32'
/package/host/code.dogmap.org/foreign/xorg-server-1.2.99.903+spf+0/conf/glibc/include/linux/agpgart.h:106: error: expected specifier-qualifier-list before '__u32'
lnx_agp.c: In function 'GARTInit':
lnx_agp.c:103: error: 'struct agp_version' has no member named 'major'
lnx_agp.c:104: error: 'struct agp_version' has no member named 'minor'
lnx_agp.c:108: error: 'struct agp_version' has no member named 'major'
lnx_agp.c:108: error: 'struct agp_version' has no member named 'minor'
lnx_agp.c: In function 'xf86GetAGPInfo':
lnx_agp.c:150: error: 'struct _agp_info' has no member named 'bridge_id'
lnx_agp.c:151: error: 'struct _agp_info' has no member named 'agp_mode'
lnx_agp.c:152: error: 'struct _agp_info' has no member named 'aper_base'
lnx_agp.c:153: error: 'struct _agp_info' has no member named 'aper_size'
lnx_agp.c:154: error: 'struct _agp_info' has no member named 'pg_total'
lnx_agp.c:155: error: 'struct _agp_info' has no member named 'pg_system'
lnx_agp.c:156: error: 'struct _agp_info' has no member named 'pg_used'
lnx_agp.c:158: error: 'struct _agp_info' has no member named 'pg_total'
lnx_agp.c:158: error: 'struct _agp_info' has no member named 'pg_used'
lnx_agp.c: In function 'xf86AllocateGARTMemory':
lnx_agp.c:239: error: 'struct _agp_allocate' has no member named 'type'
lnx_agp.c:249: error: 'struct _agp_allocate' has no member named 'physical'
lnx_agp.c: In function 'xf86UnbindGARTMemory':
lnx_agp.c:338: error: 'struct _agp_unbind' has no member named 'priority'
lnx_agp.c: In function 'xf86EnableAGP':
lnx_agp.c:364: error: 'agp_setup' has no member named 'agp_mode'
make[5]: *** [lnx_agp.lo] Error 1

The error indicates that the typedef for __u16 has not been included.  That typedef lives in <asm/types.h>, which is #included by <linux/types.h>.  Using gcc -E, I can see that <linux/types.h> is included in lnx_agp.c, only once, via <linux/kd.h>, but none of its contents are used, as if the _LINUX_TYPES_H guard macro were already defined.  I haven't been able to find any place that defines it, though.  As a workaround, I added "#include <linux/types.h>" to the top of lnx_agp.c, and that eliminated this error.
Comment 1 Paul Jarc 2007-04-21 21:39:44 UTC
This is still present in 1.3.0.0.
Comment 2 Adam Jackson 2010-08-09 12:56:13 UTC
wfm


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.