Bug 30789 - mesa git fails to build
Summary: mesa git fails to build
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium blocker
Assignee: Jose Fonseca
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 22:49 UTC by Andrew Randrianasulu
Modified: 2010-10-12 09:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
config.log (29.75 KB, text/plain)
2010-10-11 22:49 UTC, Andrew Randrianasulu
Details

Description Andrew Randrianasulu 2010-10-11 22:49:00 UTC
Using mesa git master i noticed (recent) build failure, usually things like  this fixed  very fast, but just in case people using other compiler/llvm than i have....

Mesa git up to:
commit c25fcf5aa5beccd7731706b8f85682170a2eca56
Author: Francisco Jerez <currojerez@riseup.net>
Date:   Tue Sep 28 22:51:28 2010 +0200

    nouveau: Get larger push buffers.

    Useful to amortize the command submission/reloc overhead (e.g. etracer
    goes from 72 to 109 FPS on nv4b).
------

Error:

gmake[3]: Entering directory `/home/guest/source/mesa/src/gallium/auxiliary'
gcc -c -I. -I../../../src/gallium/include -I../../../src/gallium/auxiliary -I../../../src/gallium/drivers  -I/usr/X11R7/include -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -g  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DDEBUG -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_UDIS86 -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0207 -D__STDC_CONSTANT_MACROS -I/usr/include  -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O2 -fomit-frame-pointer -fPIC gallivm/lp_bld_tgsi_info.c -o gallivm/lp_bld_tgsi_info.o
In file included from gallivm/lp_bld_tgsi_info.c:36:
gallivm/lp_bld_tgsi.h:79: warning: declaration does not declare anything
gallivm/lp_bld_tgsi_info.c: In function 'analyse_src':
gallivm/lp_bld_tgsi_info.c:77: error: 'struct lp_tgsi_channel_info' has no member named 'value'
gallivm/lp_bld_tgsi_info.c:80: error: 'struct lp_tgsi_channel_info' has no member named 'index'
gallivm/lp_bld_tgsi_info.c: In function 'is_immediate':
gallivm/lp_bld_tgsi_info.c:95: error: 'const struct lp_tgsi_channel_info' has no member named 'value'
gallivm/lp_bld_tgsi_info.c: In function 'dump_info':
gallivm/lp_bld_tgsi_info.c:345: error: 'const struct lp_tgsi_channel_info' has no member named 'index'
gallivm/lp_bld_tgsi_info.c:363: error: 'const struct lp_tgsi_channel_info' has no member named 'value'
gallivm/lp_bld_tgsi_info.c:379: error: 'const struct lp_tgsi_channel_info' has no member named 'index'
gmake[3]: *** [gallivm/lp_bld_tgsi_info.o] Error 1
gmake[3]: Leaving directory `/home/guest/source/mesa/src/gallium/auxiliary'
gmake[2]: *** [default] Error 1
gmake[2]: Leaving directory `/home/guest/source/mesa/src/gallium'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/guest/source/mesa/src'
make: *** [default] Error 1
Comment 1 Andrew Randrianasulu 2010-10-11 22:49:57 UTC
Created attachment 39357 [details]
config.log
Comment 2 Vinson Lee 2010-10-11 23:20:03 UTC
git bisect good e1003336f0dcd9248c0127fbdc173522e35c5bdb
git bisect bad 986cb9d5cf60bc11c7facc19017b5432b17240f7
Comment 3 Jose Fonseca 2010-10-12 00:40:30 UTC
The compiler doesn't like anonymous unions.

Andrew, Vinson, which compiler are you using? gcc/msvc compile that fine here.

Nevertheless, it might be better to make this code more portable.

Jose
Comment 4 Jose Fonseca 2010-10-12 00:50:58 UTC
The problem is the -std=c99 option. If you remove it it will compile successfuly.

Anonymous unions are not part of C99, but are part of C++ and will reportedly be part of C1X. I think all major compilers support it.

They are also sometimes used for hardware register headers.

I don't feel strongly either way, so I'll ping mesa3d-dev about this.
Comment 5 Andrew Randrianasulu 2010-10-12 00:54:37 UTC
(In reply to comment #3)
> The compiler doesn't like anonymous unions.
> 
> Andrew, Vinson, which compiler are you using? gcc/msvc compile that fine here.
> 
> Nevertheless, it might be better to make this code more portable.
> 
> Jose

guest@slax:~/source/mesa$ LANG=C gcc --version
gcc (GCC) 4.4.4
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 6 Vinson Lee 2010-10-12 00:59:52 UTC
(In reply to comment #3)
> Andrew, Vinson, which compiler are you using? 

$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 7 Jose Fonseca 2010-10-12 08:09:10 UTC
Fixed with

commit 6fbd4faf971a0091815211c4d1385c9a4fb0adc6
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue Oct 12 16:07:38 2010 +0100

    gallivm: Name anonymous union.

Thanks.
Comment 8 Andrew Randrianasulu 2010-10-12 09:50:59 UTC
There is another one .... I'll post new 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.