[patch] Use dlsym instead of glXGetProcAddress in xdriinfo

Eric Anholt eta at lclark.edu
Tue Nov 22 20:45:00 PST 2005


On Tue, 2005-11-22 at 17:58 -0500, Felix Kühling wrote:
> Am Dienstag, den 22.11.2005, 14:19 -0800 schrieb Eric Anholt:
> > On Tue, 2005-11-22 at 22:28 +0100, Christoph Hellwig wrote:
> > > On Tue, Nov 22, 2005 at 09:37:35AM -0800, Eric Anholt wrote:
> > > > Because someone builds and installs Xorg, then installs the nvidia
> > > > driver, then goes to upgrade Xorg at a later date, and the build of the
> > > > apps (since we've got the monolithic build split into apps, libs,
> > > > servers) fails.  This won't even go away with modular since we'd still
> > > > expect xdriinfo to be built and installed by an xorg metapackage.
> > > > 
> > > > The alternative would be for the user to set a flag telling the
> > > > metapackage that they've got nvidia installed so don't build xdriinfo.
> > > > That's not very nice.
> > > 
> > > Umm, so they shouldn'tg install nvidias libGL.  The modular X clearly
> > > depends on mesa as libGL.  Maybe this problem should be documented more
> > > cleanly so people are aware what mess they cause by blindly installing
> > > another libGL.
> > 
> > Excuse me?  The solution to X.Org being broken in the presence of
> > non-Mesa libGL is to not use 3d hardware acceleration at all?  Of all of
> > X.Org, this was the one app that failed with nvidia's libGL.  Also,
> > they're not using modular here, though the problem would remain the same
> > with modular.
> 
> I think that's not what Christoph meant. The nvidia libGL is an
> unsupported configuration, which means it may or may not work. However,
> we have not commitment to make it work. In fact, except for xdriinfo,
> Xorg seems to work just fine with NVidia's drivers and libGL. If NVidia
> feels this is a big issue for their users, they are free to work with us
> on a solution.
> 
> > 
> > I hate binary drivers as much as the next guy, but seriously, does this
> > patch cause any harm, in exchange for many users (I've had two
> > duplicates of reports of this in the last week) being happier?
> 
> Right now there doesn't seem to be the one patch that makes everybody
> happy. The dlsym version isn't portable and the glXGetProcAddressARB has
> been reported (by you) to be broken on AMD64. At this point there is
> really nothing I can do. I'm basically waiting for someone with AMD64 to
> track down that issue. Until then from my POV the current solution is at
> least as good as any of the other ones that have been proposed so far.

So, good news.  I went to test if I still had segfaults with
glXGetProcAddressARB and noticed that there were warnings about nested
extern declaration (i.e. no prototype), and warnings that pointers were
being cast to int.  After adding #define GLX_GLXEXT_LEGACY at the top,
it works.  I must have just missed those with the first time I tried it.

Patch attached.  Sound sane?

-- 
Eric Anholt                                     eta at lclark.edu
http://people.freebsd.org/~anholt/              anholt at FreeBSD.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xdriinfo-glXGetProcAddressARB.diff
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20051122/ad4400db/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20051122/ad4400db/attachment.pgp>


More information about the xorg mailing list