[Mesa-dev] osmesa: static linking of talloc
Julien Cristau
jcristau at debian.org
Tue Jan 4 08:19:11 PST 2011
On Sun, Oct 24, 2010 at 13:23:28 +0200, Tormod Volden wrote:
> Commit 5a3ac74 added $(TALLOC_LIBS) to the mklib call in
> src/mesa/drivers/osmesa/Makefile and this breaks static builds on
> Linux since ar barfs on "-ltalloc". I have been looking at different
> ways of dealing with this without finding any elegant solution. We can
> change configure.ac to set TALLOC_LIBS to libtalloc.a for static
> builds, but ar needs the full path and something like this does not
> look pretty in there:
> TALLOC_LIBS="`$PKG_CONFIG --variable=libdir talloc`/libtalloc.a"
>
> Alternatively, I have a mklib hack to translate -lfoo into libfoo.a
> (searched for in different paths, also ugly) for static builds. I
> wonder if libtool can do this in a clever way instead, but I don't
> know libtool well enough.
>
> Finally, maybe reverting 5a3ac74 is better. For shared libs,
> TALLOC_LIBS is already added to OSLIB_MESA_DEPS in configure.ac. For
> static builds, configure.ac explicitly says to not link libraries
> "only link libraries with osmesa if shared". So this is in
> contradiction to 5a3ac74 AFAICS. But I am probably missing something,
> especially outside my own use case.
>
Revert sounds correct to me if we already get -ltalloc from
OSLIB_MESA_DEPS for the shared build. The static build doesn't need it.
Cc:ing ajax and Orion.
Cheers,
Julien
More information about the mesa-dev
mailing list