Bug 39846 - can't compile mesa ‘__u64’problem.
Summary: can't compile mesa ‘__u64’problem.
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/X11 (show other bugs)
Version: 7.10
Hardware: Other Linux (All)
: medium blocker
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 21:50 UTC by Soohyun Lee
Modified: 2019-09-18 15:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Soohyun Lee 2011-08-04 21:50:22 UTC
Hi, I am having trouble compiling mesa due to this problem.
I tried an internet solution of removing std=c99, but still does not work. (http://lists.freedesktop.org/archives/mesa-users/2011-February/000197.html)

[root@localhost Mesa-7.10.3]# gmake
gmake[1]: Entering directory `/home/sol013/Mesa-7.10.3/src'
Making sources for autoconf
gmake[2]: Entering directory `/home/sol013/Mesa-7.10.3/src/mapi/glapi'
gmake[2]: `default'를 위해 할 일이 없습니다
gmake[2]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mapi/glapi'
gmake[2]: Entering directory `/home/sol013/Mesa-7.10.3/src/glsl'
gmake[2]: `default'를 위해 할 일이 없습니다
gmake[2]: Leaving directory `/home/sol013/Mesa-7.10.3/src/glsl'
gmake[2]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa'
gmake[3]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/x86'
gmake[3]: `default'를 위해 할 일이 없습니다
gmake[3]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/x86'
gmake[3]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers'
gmake[4]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri'
gmake[5]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
gmake[6]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver -I../../../../../include -I../../../../../src/mapi -I../../../../../src/mesa -I../../../../../src/egl/main -I../../../../../src/egl/drivers/dri -I/usr/local/include -I/usr/local/include/libdrm    -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DFEATURE_GL=1  ../common/utils.c -o ../common/utils.o
In file included from ../../../../../include/GL/internal/dri_interface.h:51,
                 from ../common/utils.h:32,
                 from ../common/utils.c:37:
/usr/local/include/libdrm/drm.h:612: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm.h:617: error: expected specifier-qualifier-list before ‘__u64’
In file included from /usr/local/include/libdrm/drm.h:621,
                 from ../../../../../include/GL/internal/dri_interface.h:51,
                 from ../common/utils.h:32,
                 from ../common/utils.c:37:
/usr/local/include/libdrm/drm_mode.h:97: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:110: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:168: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:194: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:199: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:211: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:219: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:268: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:309: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:344: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:356: error: expected specifier-qualifier-list before ‘__u64’
/usr/local/include/libdrm/drm_mode.h:369: error: expected specifier-qualifier-list before ‘__u64’
In file included from ../../../../../include/GL/internal/dri_interface.h:51,
                 from ../common/utils.h:32,
                 from ../common/utils.c:37:
/usr/local/include/libdrm/drm.h:750: error: expected specifier-qualifier-list before ‘__u64’
gmake[6]: *** [../common/utils.o] 오류 1
gmake[6]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
gmake[5]: *** [lib] 오류 2
gmake[5]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
gmake[4]: *** [subdirs] 오류 1
gmake[4]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri'
gmake[3]: *** [default] 오류 1
gmake[3]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers'
gmake[2]: *** [driver_subdirs] 오류 2
gmake[2]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa'
gmake[1]: *** [subdirs] 오류 1
gmake[1]: Leaving directory `/home/sol013/Mesa-7.10.3/src'
gmake: *** [default] 오류 1
Comment 1 Michel Dänzer 2011-08-04 22:51:25 UTC
__u64 is supposed to be defined by the userspace headers from the Linux kernel (/usr/include/linux/, /usr/include/asm*). Where are you getting those from?
Comment 2 Soohyun Lee 2011-08-05 12:12:10 UTC
(In reply to comment #1)
> __u64 is supposed to be defined by the userspace headers from the Linux kernel
> (/usr/include/linux/, /usr/include/asm*). Where are you getting those from?

I am using CentOS operating system.
I did not checked directly yet (check with gcc -E flag on CentOS), but 
The __u64 seems to be define only in one place:

/usr/include/asm/types.h
Comment 3 Chad Versace 2011-08-05 14:41:32 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > __u64 is supposed to be defined by the userspace headers from the Linux kernel
> > (/usr/include/linux/, /usr/include/asm*). Where are you getting those from?
> 
> I am using CentOS operating system.
> I did not checked directly yet (check with gcc -E flag on CentOS), but 
> The __u64 seems to be define only in one place:
> 
> /usr/include/asm/types.h

On Fedora, /usr/include/asm/types.h is provided by the kernel-headers package. Since CentOS and Fedora are both RedHat-ish, I assume the package name is the same on CentOS.

From the build log, I see you're building libdrm. It's a good idea to install libdrm-devel too.
Comment 4 Soohyun Lee 2011-08-06 18:58:38 UTC
libdrm-devel 2.02-1.1.i386 is installed according to yum.


(In reply to comment #0)
> Hi, I am having trouble compiling mesa due to this problem.
> I tried an internet solution of removing std=c99, but still does not work.
> (http://lists.freedesktop.org/archives/mesa-users/2011-February/000197.html)
> [root@localhost Mesa-7.10.3]# gmake
> gmake[1]: Entering directory `/home/sol013/Mesa-7.10.3/src'
> Making sources for autoconf
> gmake[2]: Entering directory `/home/sol013/Mesa-7.10.3/src/mapi/glapi'
> gmake[2]: `default'를 위해 할 일이 없습니다
> gmake[2]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mapi/glapi'
> gmake[2]: Entering directory `/home/sol013/Mesa-7.10.3/src/glsl'
> gmake[2]: `default'를 위해 할 일이 없습니다
> gmake[2]: Leaving directory `/home/sol013/Mesa-7.10.3/src/glsl'
> gmake[2]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa'
> gmake[3]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/x86'
> gmake[3]: `default'를 위해 할 일이 없습니다
> gmake[3]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/x86'
> gmake[3]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers'
> gmake[4]: Entering directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri'
> gmake[5]: Entering directory
> `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
> gmake[6]: Entering directory
> `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
> gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver
> -I../../../../../include -I../../../../../src/mapi -I../../../../../src/mesa
> -I../../../../../src/egl/main -I../../../../../src/egl/drivers/dri
> -I/usr/local/include -I/usr/local/include/libdrm    -g -O2 -Wall
> -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden
> -fno-strict-aliasing  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM
> -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN
> -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING
> -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DFEATURE_GL=1 
> ../common/utils.c -o ../common/utils.o
> In file included from ../../../../../include/GL/internal/dri_interface.h:51,
>                  from ../common/utils.h:32,
>                  from ../common/utils.c:37:
> /usr/local/include/libdrm/drm.h:612: error: expected specifier-qualifier-list
> before ‘__u64’
> /usr/local/include/libdrm/drm.h:617: error: expected specifier-qualifier-list
> before ‘__u64’
> In file included from /usr/local/include/libdrm/drm.h:621,
>                  from ../../../../../include/GL/internal/dri_interface.h:51,
>                  from ../common/utils.h:32,
>                  from ../common/utils.c:37:
> /usr/local/include/libdrm/drm_mode.h:97: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:110: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:168: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:194: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:199: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:211: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:219: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:268: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:309: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:344: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:356: error: expected
> specifier-qualifier-list before ‘__u64’
> /usr/local/include/libdrm/drm_mode.h:369: error: expected
> specifier-qualifier-list before ‘__u64’
> In file included from ../../../../../include/GL/internal/dri_interface.h:51,
>                  from ../common/utils.h:32,
>                  from ../common/utils.c:37:
> /usr/local/include/libdrm/drm.h:750: error: expected specifier-qualifier-list
> before ‘__u64’
> gmake[6]: *** [../common/utils.o] 오류 1
> gmake[6]: Leaving directory
> `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
> gmake[5]: *** [lib] 오류 2
> gmake[5]: Leaving directory
> `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri/i810'
> gmake[4]: *** [subdirs] 오류 1
> gmake[4]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers/dri'
> gmake[3]: *** [default] 오류 1
> gmake[3]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa/drivers'
> gmake[2]: *** [driver_subdirs] 오류 2
> gmake[2]: Leaving directory `/home/sol013/Mesa-7.10.3/src/mesa'
> gmake[1]: *** [subdirs] 오류 1
> gmake[1]: Leaving directory `/home/sol013/Mesa-7.10.3/src'
> gmake: *** [default] 오류 1

(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > __u64 is supposed to be defined by the userspace headers from the Linux kernel
> > > (/usr/include/linux/, /usr/include/asm*). Where are you getting those from?
> > 
> > I am using CentOS operating system.
> > I did not checked directly yet (check with gcc -E flag on CentOS), but 
> > The __u64 seems to be define only in one place:
> > 
> > /usr/include/asm/types.h
> On Fedora, /usr/include/asm/types.h is provided by the kernel-headers package.
> Since CentOS and Fedora are both RedHat-ish, I assume the package name is the
> same on CentOS.
> From the build log, I see you're building libdrm. It's a good idea to install
> libdrm-devel too.
Comment 5 Jerome St-Louis 2012-08-31 11:03:55 UTC
I've ran accross the same issue, and commenting out the:

// #if defined(__GNUC__) && !defined(__STRICT_ANSI__)

line around __u64 definition in /usr/include/asm/types.h fixed it

(CentOS 5.5 getting seriously hacked to get OpenGL working in VirtualBox)

Regards,

Jerome
Comment 6 Ian Romanick 2013-01-30 00:40:41 UTC
Mesa 7.10.x isn't really supported anymore.  Is this still a problem with more recent versions of Mesa?
Comment 7 Adam Jackson 2019-09-18 15:59:53 UTC
Ancient bug, closing.


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.