We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 238 - dri doesn't work on linux (r200)
Summary: dri doesn't work on linux (r200)
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.9
Hardware: Other Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-22 08:18 UTC by Matthias Geissert
Modified: 2006-06-19 23:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Geissert 2006-05-22 08:18:23 UTC
The file SDL_x11gl.c loads libGL.so via SDL_LoadObject(). This function adds RTLD_NOW as a second argument to dlopen. The problem is that libGL.so should be opened with RTLD_GLOBAL as well (at least to my knowledge). If you omit RTLD_GLOBAL libGL fails to load r200_dri.so with unresolved symbol _glapi_Dispatch. Hence, dri doesn't work. Adding RTLD_GLOBAL to the second argument of dlopen solves this problem. 

This is also present in 1.2.10.

Btw, I am using glibc 2.3.6, xorg 7.0, Mesa 6.4.2
Comment 1 Ryan C. Gordon 2006-05-23 22:01:22 UTC
Hmm...generally you don't want dlopen() to use RTLD_GLOBAL unless forced to (like this situation) so we shouldn't change this universally inside LoadObject. Sam, any ideas on how to approach this? Is this arguably a bug in DRI?

--ryan.

Comment 2 Matthias Geissert 2006-05-24 07:54:10 UTC
See http://dri.sourceforge.net/doc/DRIuserguide.html, section 11.5. There is written that you need to use RTLD_GLOBAL, since, otherwise, nested open of dynamic libraries doesn't work. However, This is necassary in this case, since libGL opens the hardware-specific driver/library. I hope this helps you.

  
Comment 3 Sam Lantinga 2006-06-19 23:52:29 UTC
This is fixed in subversion, thanks!