[Mesa-dev] [PATCH 9/9] Don't explicitly link libOsmesa with libmesa's dependency libglapi

Eric Anholt eric at anholt.net
Wed Jul 11 07:56:36 PDT 2012


Jon TURNEY <jon.turney at dronecode.org.uk> writes:

> On 09/07/2012 17:36, Eric Anholt wrote:
>>> We must either:
>>> (i) Not link libmesa with libglapi, and link anything that uses libmesa with
>>> libglapi as well, or
>>> (ii) Link libmesa with libglapi, and not link anything that uses libmesa with
>>> libglapi
>>>
>>> I choose (ii) just because it's least change, but I'm not sure it's right.
>>>
>>> Note that drivers/X11 makes libGL by linking with libmesa, but not libglapi,
>>> so it's a bit unclear to me how this was working correctly before in both cases
>>> (It might be some sort of accidental side-effect of what mklib's expand_archives()
>>> function does that this ever worked before?)
>>> ---
>>>  src/mesa/drivers/osmesa/Makefile.am |    3 +--
>>>  1 files changed, 1 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am
>>> index a91d9e2..cfba658 100644
>>> --- a/src/mesa/drivers/osmesa/Makefile.am
>>> +++ b/src/mesa/drivers/osmesa/Makefile.am
>>> @@ -40,8 +40,7 @@ lib at OSMESA_LIB@_la_SOURCES = osmesa.c
>>>  lib at OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ -shared
>>>  lib at OSMESA_LIB@_la_LIBADD = \
>>>  	$(top_srcdir)/src/mesa/libmesa.la \
>>> -	$(top_srcdir)/src/mapi/glapi/libglapi.la \
>>> -	$(top_srcdir)/src/glsl/libglsl.la
>>> +	$(top_srcdir)/src/mapi/glapi/libglapi.la
>> 
>> This commit actually looks like it drops linking with libglsl.  What's
>> up?
>
> Sorry, I had some kind of brain spasm when writing the comment for this
> commit, it should of course say libglsl everywhere it says libglapi.
>
> The libmesa convenience library is linked with the libglsl convenience
> library.  libOsmesa is linked with libmesa, and also directly with libglsl.
> This gives rise to duplicate symbol errors.

Cool.  I totally agree with the content of the change.  libglsl's code
should be part of libmesa.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120711/ed75a383/attachment.pgp>


More information about the mesa-dev mailing list