[Mesa-dev] Can --enable-shared-glapi die?

Calvin Walton calvin.walton at kepstin.ca
Wed Jul 25 12:36:39 PDT 2012

On Tue, 2012-07-24 at 10:45 -0700, Ian Romanick wrote:
> On 07/23/2012 12:59 PM, Ian Romanick wrote:
> > Perhaps someone can refresh my memory as to what exactly this option
> > does?  Can we make this the default and remove the option from configure?
> Thanks to all for the refresher.  Off-list someone raised another issue 
> to me that seems like a deal breaker.  If an application links with a 
> libGL that uses libglapi it appears that the application gets implicitly 
> linked with libglapi (as shown by objdump -x | grep -i need).  This will 
> cause the application to fail if a non-glapi libGL (i.e., any of the 
> closed-source drivers) is later installed.  The problem seems to be that 
> symbols like glBegin are in libglapi.
> Is this fixable?

I think the usual cause for this is linking with libtool. By default,
libtool will read the libGL.la file associated with your libGL.so, and
add all of the dependency libraries listed in the .la file to the link
command line, even if the operating system does not require them to be
linked in.

(There are some options that some versions of ld have that will cause ld
to ignore these libraries and not *actually* link them in; some newer
distributions are starting to use these options)

The easy workaround is simply to delete the libGL.la file after
installation, to force libtool to link *only* to libGL.so.

Calvin Walton <calvin.walton at kepstin.ca>

More information about the mesa-dev mailing list