Bug 36463 - glsl compiler builds OK for x86_64, NOT for i686
Summary: glsl compiler builds OK for x86_64, NOT for i686
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 08:45 UTC by Jason Vas Dias
Modified: 2011-04-22 05:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jason Vas Dias 2011-04-21 08:45:37 UTC
Hi - I'm trying to build a complete native x86_64 xorg installation,
which built, tested and works fine - thanks! - but also just the xorg
LIBRARIES for i686 to install under /usr/lib32 , from a git checkout
of @ April 14th 2011 (20110414).

The x86_64 config is :

../configure --prefix=/usr --libdir=/usr/lib64 --enable-shared --with-pic --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --enable-64-bit --enable-gles2 --enable-shared-glapi --enable-shared-dricore --enable-gl-osmesa --enable-xcb
 
and the i686 config is:

./configure --prefix=/usr --libdir=/usr/lib32 --enable-shared --with-pic --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-32-bit --enable-gles2 --enable-shared-glapi --enable-shared-dricore --enable-gl-osmesa --enable-xcb

The x86_64 build and install is fine, but the i686 (32-bit) python generation 
of glsl compiler builtins fails:

Regenerating builtin_function.cpp...                                                                                                                                  
python2 -t -O -O builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp                                          
/usr/bin/g++ -m32 -c -I. -I../mesa -I../mapi -I../../include  -g -O2 -Wall -fno-strict-aliasing -m32  -fPIC -m32 -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DHAVE_LIBUDEV -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN -DHAVE_XEXTPROTO_71  -DFEATURE_GL=1 -DFEATURE_ES2=1 -fvisibility=hidden -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DHAVE_LIBUDEV -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN -DHAVE_XEXTPROTO_71  -DFEATURE_GL=1 -DFEATURE_ES2=1 builtin_function.cpp -o builtin_function.o                                                                                             
builtin_function.cpp:6331:2: error: #error builtins profile 100_frag failed to compile                                                                                
builtin_function.cpp:6332:2: error: #error builtins profile 100_vert failed to compile                                                                                
builtin_function.cpp:6333:2: error: #error builtins profile 110_frag failed to compile                                                                                
builtin_function.cpp:6334:2: error: #error builtins profile 110_vert failed to compile                                                                                
builtin_function.cpp:6335:2: error: #error builtins profile 120_frag failed to compile                                                                                
builtin_function.cpp:6336:2: error: #error builtins profile 120_vert failed to compile                                                                                
builtin_function.cpp:6337:2: error: #error builtins profile 130_frag failed to compile                                                                                
builtin_function.cpp:6338:2: error: #error builtins profile 130_vert failed to compile                                                                                
builtin_function.cpp:6339:2: error: #error builtins profile ARB_texture_rectangle_frag failed to compile                                                              
builtin_function.cpp:6340:2: error: #error builtins profile ARB_texture_rectangle_vert failed to compile                                                              
builtin_function.cpp:6341:2: error: #error builtins profile EXT_texture_array_frag failed to compile                                                                  
builtin_function.cpp:6342:2: error: #error builtins profile EXT_texture_array_vert failed to compile                                                                  
builtin_function.cpp:6343:2: error: #error builtins profile OES_texture_3D_frag failed to compile                                                                     
builtin_function.cpp:6344:2: error: #error builtins profile OES_texture_3D_vert failed to compile                                                                     
builtin_function.cpp: In function 'void _mesa_glsl_initialize_functions(_mesa_glsl_parse_state*)':                                                                    
builtin_function.cpp:6388:26: error: 'prototypes_for_100_frag' was not declared in this scope                                                                         
builtin_function.cpp:6389:26: error: 'functions_for_100_frag' was not declared in this scope                                                                          
builtin_function.cpp:6395:26: error: 'prototypes_for_100_vert' was not declared in this scope                                                                         
builtin_function.cpp:6396:26: error: 'functions_for_100_vert' was not declared in this scope                                                                          
builtin_function.cpp:6402:26: error: 'prototypes_for_110_frag' was not declared in this scope                                                                         
builtin_function.cpp:6403:26: error: 'functions_for_110_frag' was not declared in this scope                                                                          
builtin_function.cpp:6409:26: error: 'prototypes_for_110_vert' was not declared in this scope                                                                         
builtin_function.cpp:6410:26: error: 'functions_for_110_vert' was not declared in this scope                                                                          
builtin_function.cpp:6416:26: error: 'prototypes_for_120_frag' was not declared in this scope                                                                         
builtin_function.cpp:6417:26: error: 'functions_for_120_frag' was not declared in this scope                                                                          
builtin_function.cpp:6423:26: error: 'prototypes_for_120_vert' was not declared in this scope                                                                         
builtin_function.cpp:6424:26: error: 'functions_for_120_vert' was not declared in this scope                                                                          
builtin_function.cpp:6430:26: error: 'prototypes_for_130_frag' was not declared in this scope                                                                         
builtin_function.cpp:6431:26: error: 'functions_for_130_frag' was not declared in this scope                                                                          
builtin_function.cpp:6437:26: error: 'prototypes_for_130_vert' was not declared in this scope                                                                         
builtin_function.cpp:6438:26: error: 'functions_for_130_vert' was not declared in this scope                                                                          
builtin_function.cpp:6444:26: error: 'prototypes_for_ARB_texture_rectangle_frag' was not declared in this scope                                                       
builtin_function.cpp:6445:26: error: 'functions_for_ARB_texture_rectangle_frag' was not declared in this scope                                                        
builtin_function.cpp:6451:26: error: 'prototypes_for_ARB_texture_rectangle_vert' was not declared in this scope                                                       
builtin_function.cpp:6452:26: error: 'functions_for_ARB_texture_rectangle_vert' was not declared in this scope                                                        
builtin_function.cpp:6458:26: error: 'prototypes_for_EXT_texture_array_frag' was not declared in this scope                                                           
builtin_function.cpp:6459:26: error: 'functions_for_EXT_texture_array_frag' was not declared in this scope                                                            
builtin_function.cpp:6465:26: error: 'prototypes_for_EXT_texture_array_vert' was not declared in this scope                                                           
builtin_function.cpp:6466:26: error: 'functions_for_EXT_texture_array_vert' was not declared in this scope                                                            
builtin_function.cpp:6472:26: error: 'prototypes_for_OES_texture_3D_frag' was not declared in this scope                                                              
builtin_function.cpp:6473:26: error: 'functions_for_OES_texture_3D_frag' was not declared in this scope                                                               
builtin_function.cpp:6479:26: error: 'prototypes_for_OES_texture_3D_vert' was not declared in this scope                                                              
builtin_function.cpp:6480:26: error: 'functions_for_OES_texture_3D_vert' was not declared in this scope                                                               
make: *** [builtin_function.o] Error 1                                                                                                                                

Now I'm assuming this is because I just have python x86_64 installed and
am missing some i686 python module ?  Any ideas which ones ?

Isn't use such of an architecture/platform dependant / specific tool such 
as python , which fails so easily for reasons such as the above, rather
overkill for this purpose, when long-established and platform-independent
tools such as flex / yacc / bison exist ?

Why must the build depend on python ?
Comment 1 Jason Vas Dias 2011-04-21 09:02:06 UTC
actually, no, it can't be a missing i686 version of python module, else
python would complain. 

Do I need to be running a 32-bit version of python for this to work ?
Comment 2 Jason Vas Dias 2011-04-21 09:09:24 UTC
Aha! sorry - nothing to do with python - 

$ ./builtin_compiler
Segmentation fault

am investigating ...
Comment 3 Jason Vas Dias 2011-04-21 09:17:47 UTC
Ach! sorry, it was a bad libgcc_s.so.1 link. fixed now. Maybe use -static-libgcc
for builtin_compiler ?
Comment 4 Jason Vas Dias 2011-04-21 09:24:46 UTC
sorry for this bug, but I also meant to ask - do those config options look alright ? Any suggestions for improving them ? not really a GL expert here.

And do I really need libEGL.so for best GL performance on a radeonhd ?
There was so much about EGL in the docs and config, I went and found
some libEGL.so source on the web and built it - but is it really required
for my platform ? Any advice would be most appreciated, thanks.
Comment 5 Jason Vas Dias 2011-04-21 09:52:49 UTC
Aha! I needed to add : --enable-openvg --enable-gallium-nouveau
to configure args.

But please, can anyone tell me - is this really needed / required for best
GL / 3d performance on radeonhd : radeon X1250 :

01:05.0 VGA compatible controller: ATI Technologies Inc RS690M [Radeon X1200 Series] (prog-if 00 [VGA controller])
Comment 6 Jason Vas Dias 2011-04-21 10:03:50 UTC
And I needed to do:
../../drm/configure --prefix=/usr --libdir=/usr/lib64 --enable-shared --with-pic --disable-intel --enable-radeon --enable-nouveau-experimental-api --with-kernel-source=/usr/src/linux

But is this --enable-nouveau-experimental-api required / recommended for radeonhd ?
Comment 7 Ian Romanick 2011-04-21 12:46:57 UTC
Everything with "nouveau" in the name is just for the driver for NVIDIA chips.  These shouldn't make any difference whatsoever for the Radeon drivers.

libEGL is only needed if you have applications that use the EGL API.
Comment 8 Jason Vas Dias 2011-04-22 05:13:57 UTC
(In reply to comment #7)
> Everything with "nouveau" in the name is just for the driver for NVIDIA chips. 
> These shouldn't make any difference whatsoever for the Radeon drivers.
> 
> libEGL is only needed if you have applications that use the EGL API.

Thanks Ian - but libdrm does not ship at least one required header :
     'nouveau_pushbuf.h'
if I build libdrm without '--enable-nouveau-experimental-api -
this header is required when mesa/mesa is built with :
     --enable-gles2 \
     --enable-openvg --enable-gallium-nouveau \
which I understood to be the 'recommended way to enable libEGL' from :

http://mesa3d.sourceforge.net/ :
"Build EGL

    Run configure with the desired client APIs and enable the driver for your 
    hardware. For example:

      $ ./configure --enable-gles2 --enable-openvg --enable-gallium-nouveau

"

Aha !
      $ mesa/mesa/configure --help 2>&1 | grep gallium
  --enable-gallium-radeon build gallium radeon [default=disabled]
  --enable-gallium-r600   build gallium radeon [default=disabled]
  --disable-gallium       build gallium [default=enabled]
  --enable-gallium-egl    enable gallium EGL state tracker [default=auto]
  --enable-gallium-llvm   build gallium LLVM support [default=disabled]
  --enable-gallium-svga   build gallium SVGA [default=disabled]
  --enable-gallium-i915   build gallium i915 [default=disabled]
  --enable-gallium-i965   build gallium i965 [default=disabled]
  --enable-gallium-radeon build gallium radeon [default=disabled]
  --enable-gallium-r600   build gallium radeon [default=disabled]
  --enable-gallium-nouveau
                          build gallium nouveau [default=disabled]
  --enable-gallium-swrast build gallium swrast [default=auto]

I guess I should rebuild with '--enable-gallium-radeon --enable-gallium-r600' .
Oops.

But my question above was is "--enable-gallium-*" / libEGL really required 
to get best graphics performance out of:
01:05.0 VGA compatible controller: ATI Technologies Inc RS690M [Radeon X1200 Series]
?


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.