[Mesa-dev] [PATCH 2/4] glapi: Fix build break in 'make check' on non-shared-glapi builds - SOLVED

Dieter Nützel Dieter at nuetzel-hh.de
Fri Apr 11 17:58:53 PDT 2014


Am 05.04.2014 08:04, schrieb Timothy Arceri:
> On Fri, 2014-04-04 at 17:40 -0700, Ian Romanick wrote:
>> On 04/03/2014 05:31 PM, Dieter Nützel wrote:
>> > Am 03.04.2014 22:53, schrieb Ian Romanick:
>> >> On 04/03/2014 07:35 AM, Dieter Nützel wrote:
>> >>> Am 03.04.2014 04:16, schrieb Ian Romanick:
>> >>>> On 04/02/2014 06:13 PM, Dieter Nützel wrote:
>> >>>>> Am 03.04.2014 01:19, schrieb Ian Romanick:
>> >>>>>> On 04/02/2014 03:43 PM, Dieter Nützel wrote:
>> >>>>>>> Am 02.04.2014 08:12, schrieb Timothy Arceri:
>> >>>>>>>> On Wed, 2014-04-02 at 00:56 +0200, Dieter Nützel wrote:
>> >>>>>>>>> Hello Ian, hello Timothy,
>> >>>>>>>>>
>> >>>>>>>>> does this fix the regression introduced with commit fb78fa58?
>> >>>>>>>>>
>> >>>>>>>>> [Mesa-dev] Mesa git (r600g): OpenGL Error(GL_INVALID_OPERATION):
>> >>>>>>>>> initTexture2D (bisected)
>> >>>>>>>>> http://lists.freedesktop.org/archives/mesa-dev/2014-March/056165.html
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> Thanks,
>> >>>>>>>>>    Dieter
>> >>>>>>>>
>> >>>>>>>> Hi Dieter,
>> >>>>>>>>
>> >>>>>>>> I just ran ./build/Release/gl-320-primitive-sprite on Mesa
>> >>>>>>>> 10.2.0-devel
>> >>>>>>>> (git-76ba50a) on Intel graphics and it ran fine with no error.
>> >>>>>>>> Have you
>> >>>>>>>> tried running it again with the latest code from git?
>> >>>>>>>> Tim
>> >>>>>>>
>> >>>>>>> Hello Tim,
>> >>>>>>>
>> >>>>>>> thank you very much for your direct reply!
>> >>>>>>> I've retested it with Mesa git daily on my _32bit_ system.
>> >>>>>>> All with same result.
>> >>>>>>> I even recompiled ogl-samples after recheckout several times NO go.
>> >>>>>>> Last try last night 8-(
>> >>>>>>>
>> >>>>>>> But,
>> >>>>>>>
>> >>>>>>> ...argh,
>> >>>>>>> after your request I've cloned ogl-samples this evening again and
>> >>>>>>> can't
>> >>>>>>> compile it anylonger. Someone changed the code to compile on 64 bit
>> >>>>>>> system only now, I think:
>> >>>>>>>
>> >>>>>>> [ 13%] Building CXX object
>> >>>>>>> framework/CMakeFiles/framework.dir/compiler.cpp.o
>> >>>>>>> Linking CXX static library libframework.a
>> >>>>>>> [ 13%] Built target framework
>> >>>>>>> Scanning dependencies of target es-200-draw-elements
>> >>>>>>> [ 13%] Building CXX object
>> >>>>>>> tests/CMakeFiles/es-200-draw-elements.dir/es-200-draw-elements.cpp.o
>> >>>>>>> Linking CXX executable ../build/Release/es-200-draw-elements
>> >>>>>>> /usr/lib/gcc/i586-suse-linux/4.8/../../../../i586-suse-linux/bin/ld:
>> >>>>>>> skipping incompatible
>> >>>>>>> /opt/ogl-samples/external/FreeImage-3.15.4/linux64/libfreeimage.a
>> >>>>>>> when
>> >>>>>>> searching for -lfreeimage
>> >>>>>>
>> >>>>>> He's shipping a prebuilt .a???  Madness!  Is there source code for
>> >>>>>> FreeImage included?  Can you just build a 32-bit version?  It seems
>> >>>>>> like
>> >>>>>> he has a crazy build system...
>> >>>>>
>> >>>>> Thank you guys for your patience...
>> >>>>>
>> >>>>>>> I'll try to go back some days in ogl-samples repository and try
>> >>>>>>> to get
>> >>>>>>> it running (with Mesa 10.1.0), again as starting point.
>> >>>>>
>> >>>>> Due to
>> >>>>> git clone -b 4.4.0 https://github.com/g-truc/ogl-samples
>> >>>>> I'm back to ogl-samples 4.4.0 (without FreeImage-3.15.4)
>> >>>>> and set, now.
>> >>>>>
>> >>>>> Mesa 10.1.0: OK
>> >>>>>
>> >>>>> /opt/ogl-samples> glxinfo | grep OpenGL
>> >>>>> libGL error: dlopen /usr/lib/dri/updates/r600_dri.so failed
>> >>>>> (/usr/lib/dri/updates/r600_dri.so: cannot open shared object file: No
>> >>>>> such file or directory)
>> >>>>> OpenGL vendor string: X.Org
>> >>>>> OpenGL renderer string: Gallium 0.4 on AMD RV730
>> >>>>> OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.0
>> >>>>> OpenGL core profile shading language version string: 3.30
>> >>>>> OpenGL core profile context flags: (none)
>> >>>>> OpenGL core profile profile mask: core profile
>> >>>>> OpenGL core profile extensions:
>> >>>>> OpenGL version string: 3.0 Mesa 10.1.0
>> >>>>> OpenGL shading language version string: 1.30
>> >>>>> OpenGL context flags: (none)
>> >>>>> OpenGL extensions:
>> >>>>>
>> >>>>> /opt/ogl-samples> ./build/release/gl-320-primitive-sprite
>> >>>>> libGL error: dlopen /usr/lib/dri/updates/r600_dri.so failed
>> >>>>> (/usr/lib/dri/updates/r600_dri.so: cannot open shared object file: No
>> >>>>> such file or directory)
>> >>>>> OpenGL Version Needed 3.2 ( 3.3 Found )
>> >>>>> Compiling shader
>> >>>>> gl-320/primitive-sprite.vert...
>> >>>>>
>> >>>>> Compiling shader
>> >>>>> gl-320/primitive-sprite.frag...
>> >>>>>
>> >>>>> Linking program
>> >>>>>
>> >>>>> Running Test
>> >>>>> Test Ended
>> >>>>> Test Began Correctly.
>> >>>>>
>> >>>>>
>> >>>>> Mesa 10.2.0-devel (git-d120506): BAD
>> >>>>>
>> >>>>> /opt/ogl-samples> glxinfo | grep OpenGL
>> >>>>> OpenGL vendor string: X.Org
>> >>>>> OpenGL renderer string: Gallium 0.4 on AMD RV730
>> >>>>> OpenGL core profile version string: 3.3 (Core Profile) Mesa
>> >>>>> 10.2.0-devel
>> >>>>> (git-d120506)
>> >>>>> OpenGL core profile shading language version string: 3.30
>> >>>>> OpenGL core profile context flags: (none)
>> >>>>> OpenGL core profile profile mask: core profile
>> >>>>> OpenGL core profile extensions:
>> >>>>> OpenGL version string: 3.0 Mesa 10.2.0-devel (git-d120506)
>> >>>>> OpenGL shading language version string: 1.30
>> >>>>> OpenGL context flags: (none)
>> >>>>> OpenGL extensions:
>> >>>>>
>> >>>>> /opt/ogl-samples> ./build/release/gl-320-primitive-sprite
>> >>>>> OpenGL Version Needed 3.2 ( 3.3 Found )
>> >>>>> OpenGL Error(GL_INVALID_OPERATION): initTexture2D
>> >>>>
>> >>>> I'm guessing that initTexture2D is in the application.  Can you set a
>> >>>> breakpoint at _mesa_error to see where exactly Mesa is throwing
>> >>>> GL_INVALID_OPERATION.  That should shed some light on things.
>> >>>
>> >>> Ian,
>> >>>
>> >>> can you please guide me a bit.
>> >>> running
>> >>> gdb ./build/release/gl-320-primitive-sprite
>> >>> and
>> >>> (gdb) break _mesa_error
>> >>> Function "_mesa_error" not defined.
>> >>> Make breakpoint pending on future shared library load? (y or [n]) y
>> >>>
>> >>> Breakpoint 1 (_mesa_error) pending.
>> >>>
>> >>> Do not do the trick.
>> >>
>> >> But you still get the error from the application?  Eh... I'm at a loss,
>> >> then.  _mesa_error is *the* function in Mesa that sets GL errors.
>> >> MESA_DEBUG=verbose give any output?  Failing that... valgrind?
>> >
>> > Does this help?
>> > setenv MESA_DEBUG verbose (tcsh ;-)
>> >
>> > Mesa 10.2.0-devel (git-c6050ce)
>> > /opt/ogl-samples> ./build/release/gl-320-primitive-sprite
>> > Mesa warning: failed to remap glDebugMessageCallbackARB
>> > Mesa warning: failed to remap glDebugMessageControlARB
>> > Mesa warning: failed to remap glDebugMessageInsertARB
>> > Mesa warning: failed to remap glGetDebugMessageLogARB
>> 
>> This is the real problem.  Something changed between the libGL the app
>> is using and the libGL the driver was built with.  The driver wants to
>> get dispatch table locations for these functions, and libGL won't give
>> them.  On IA32, I'm not sure what could cause this.
> 
> Ok this is getting well beyond my knowledge of how everything 
> interacts.
> The only thing I can think of to try now is making sure your system is
> actually using the version of libGL that you built and not the system
> one using the following command.
> 
> ldconfig -p | grep libGL.so
> 
> The libGL that you built should be at the top of the list.

I've got it!
Tim, your hint drove me in the right direction.

For several years I only had to put r600_dri.so into the 'old' (distro) 
update path /usr/lib/dri/updates/ to get current Mesa code running.

But after your 'bad' commit
fb78fa58d2a60110bfd428ca8d41b746b69b6724
(mesa: make ARB_debug_output functions an alias of KHR_debug)

I have to copy libGL.so.1.2.0 from the Mesa git tree to
/usr/local/lib/
AND replace /usr/lib/dri/r600_dri.so
to get /opt/ogl-samples> ./build/release/gl-320-primitive-sprite
running.

Sonja /opt/ogl-samples# ldconfig -p | grep libGL.so
         libGL.so.1 (libc6) => /usr/local/lib/libGL.so.1
         libGL.so.1 (libc6) => /usr/lib/libGL.so.1
         libGL.so (libc6) => /usr/local/lib/libGL.so
         libGL.so (libc6) => /usr/lib/libGL.so

/opt/ogl-samples> glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.2.0-devel 
(git-144bbb7)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.2.0-devel (git-144bbb7)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

/opt/ogl-samples> ./build/release/gl-320-primitive-sprite
OpenGL Version Needed 3.2 ( 3.3 Found )
Compiling shader
gl-320/primitive-sprite.vert...

Compiling shader
gl-320/primitive-sprite.frag...

Linking program

Running Test
Test Ended
Test Began Correctly.

******************************************************************

What's really weird I ONLY have to do this for ogl-samples...
...all other (tested) apps works the 'old' way.
Yes, they throw the MESA_DEBUG warnings, but works:

setenv MESA_DEBUG
setenv LIBGL_DEBUG verbose

/home/dieter> FreeCAD
FreeCAD 0.14, Libs: 0.14R3402 (Git) with Packman fixes
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2011
   #####                 ####  ###   ####
   #                    #      # #   #   #
   #     ##  #### ####  #     #   #  #   #
   ####  # # #  # #  #  #     #####  #   #
   #     #   #### ####  #    #     # #   #
   #     #   #    #     #    #     # #   #  ##  ##  ##
   #     #   #### ####   ### #     # ####   ##  ##  ##

libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 9: 1002:9495, driver r600
libGL: OpenDriver: trying /usr/lib/dri/updates/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/dri/updates/r600_dri.so
libGL: driver does not expose __driDriverGetExtensions_r600(): 
/usr/lib/dri/updates/r600_dri.so: undefined symbol: 
__driDriverGetExtensions_r600
libGL: Can't open configuration file /home/dieter/.drirc: No such file 
or directory.
libGL: Can't open configuration file /home/dieter/.drirc: No such file 
or directory.
Mesa warning: failed to remap glDebugMessageCallbackARB
Mesa warning: failed to remap glDebugMessageControlARB
Mesa warning: failed to remap glDebugMessageInsertARB
Mesa warning: failed to remap glGetDebugMessageLogARB

mesa-demos/objviewer> ./objview bobcat.obj
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 4: 1002:9495, driver r600
libGL: OpenDriver: trying /usr/lib/dri/updates/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/dri/updates/r600_dri.so
libGL: driver does not expose __driDriverGetExtensions_r600(): 
/usr/lib/dri/updates/r600_dri.so: undefined symbol: 
__driDriverGetExtensions_r600
libGL: Can't open configuration file /home/dieter/.drirc: No such file 
or directory.
libGL: Can't open configuration file /home/dieter/.drirc: No such file 
or directory.
Mesa warning: failed to remap glDebugMessageCallbackARB
Mesa warning: failed to remap glDebugMessageControlARB
Mesa warning: failed to remap glDebugMessageInsertARB
Mesa warning: failed to remap glGetDebugMessageLogARB
Load cube face 0x8515: alpine_east.rgb 1024 x 1024
Load cube face 0x8516: alpine_west.rgb 1024 x 1024
Load cube face 0x8517: alpine_up.rgb 1024 x 1024
Load cube face 0x8518: alpine_down.rgb 1024 x 1024
Load cube face 0x8519: alpine_south.rgb 1024 x 1024
Load cube face 0x851a: alpine_north.rgb 1024 x 1024
60.849129 FPS
60.071285 FPS
60.071285 FPS

******************************************************************

New libGL.so.1.2.0 in /usr/local/lib/
Mesa 10.1.0 r600_dri.so in /usr/lib/dri/
and
Mesa git 10.2.0-devel r600_dri.so in /usr/lib/dri/updates/
I get this (with all) GL apps:

mesa-demos/objviewer> ./objview GreatLakesBiplaneHP.obj
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 4: 1002:9495, driver r600
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so
libGL error: dlopen /usr/lib/dri/r600_dri.so failed 
(/usr/lib/dri/r600_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed 
(/usr/lib/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Sorry, GL_ARB_vertex_shader is required.

/opt/ogl-samples> glxinfo |grep OpenGL
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 4: 1002:9495, driver r600
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so
libGL error: dlopen /usr/lib/dri/r600_dri.so failed 
(/usr/lib/dri/r600_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed 
(/usr/lib/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730
OpenGL version string: 1.4 (3.0 Mesa 10.2.0-devel (git-144bbb7))
OpenGL extensions:

/opt/ogl-samples> ./build/release/gl-320-primitive-sprite
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 4: 1002:9495, driver r600
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so
libGL error: dlopen /usr/lib/dri/r600_dri.so failed 
(/usr/lib/dri/r600_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL error: dlopen /usr/lib/dri/swrast_dri.so failed 
(/usr/lib/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
gl-320-primitive-sprite: /opt/ogl-samples/external/glf/glf.inl:323: int 
glf::run(int, char**, const ivec2&, int, int, int): Assertion 
`glf_window!= __null' failed.
Abbruch

Greetings,
   Dieter

>> 
>> > Mesa: User error: GL_INVALID_ENUM in glGetString(GL_EXTENSIONS)
>> 
>> Naughty!  Calling removed functionality in a 3.3 core profile...
>> 
>> > OpenGL Version Needed 3.2 ( 3.3 Found )
>> > Mesa: User error: GL_INVALID_OPERATION in unsupported function called
>> > (unsupported extension or deprecated function?)
>> 
>> Ah!  That explains why _mesa_error wasn't called.
>> 
>> > OpenGL Error(GL_INVALID_OPERATION): initTexture2D
>> > Running Test
>> > Test Ended
>> >
>> > Mesa 10.1.0
>> > /opt/ogl-samples> ./build/release/gl-320-primitive-sprite
>> > libGL error: dlopen /usr/lib/dri/updates/r600_dri.so failed
>> > (/usr/lib/dri/updates/r600_dri.so: cannot open shared object file: No
>> > such file or directory)
>> > Mesa: User error: GL_INVALID_ENUM in glGetString(GL_EXTENSIONS)
>> > OpenGL Version Needed 3.2 ( 3.3 Found )
>> > Compiling shader
>> > gl-320/primitive-sprite.vert...
>> >
>> > Compiling shader
>> > gl-320/primitive-sprite.frag...
>> >
>> > Linking program
>> >
>> > Running Test
>> > Test Ended
>> > Test Began Correctly.
>> >
>> >>>>> Running Test
>> >>>>> Test Ended
>> >>>>>
>> >>>>> Any ideas?
>> >>>>>
>> >>>>> BTW
>> >>>>> gl-320-primitive-shading
>> >>>>> sigfault with Mesa 10.1.0
>> >>>>> and show
>> >>>>> OpenGL Error(GL_INVALID_OPERATION): initProgram
>> >>>>> with Mesa 10.2.0-devel (git-d120506) on r600g.
>> >>>>> What does (should) it look like on Intel?
>> >>>
>> >>> Had this (geom shader) anybody running?
>> >>> How should it look like?
>> >>> Maybe a picture?
>> >>>
>> >>> I did all of this to get a picture about the r600g geom shader glory...
>> >>> ...sadly there is NO 32 bit version of
>> >>> Unigine_Valley-1.0/Unigine_Heaven-4.0 ;-)
>> >>>
>> >>> -Dieter
>> 


More information about the mesa-dev mailing list