[cairo] [PATCH 4/4] configure.ac: Fix broken build for Qt backend

Uli Schlachter psychon at znc.in
Wed Jul 9 02:29:20 PDT 2014


On 09.07.2014 03:13, Bryce W. Harrington wrote:
> When --enable-qt is specified, the build will break on newer versions of
> gcc with linker errors like:
> 
>   CCLD     cairo-test-suite
> /usr/bin/ld: ../boilerplate/.libs/libcairoboilerplate.a(libcairoboilerplate_cxx_la-cairo-boilerplate-qt.o): undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3'
> //usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> 
> This is because we're not linking against libstdc++ and libQtGui as
> required.
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59038
> Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
> ---
>  configure.ac |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index fca6fc5..6af5144 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -191,6 +191,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(qt, Qt, no, [
>  		    [qt_REQUIRES=""
>  		     use_qt="no (requires Qt4 development libraries)"
>  		     ])
> +  qt_NONPKGCONFIG_LIBS="-lQtGui -lstdc++"
>  ])
>  
>  dnl ===========================================================================
> 

I am not totally sure, but doesn't this just overwrite the results from
pkg-config? I was wondering why you also need to add -lQtGui and I guess this is
why.

Also, the correct fix would be to link libcairo.so with a c++ linker so that it
can automatically add the needed C++ libraries. However, I have no idea how to
do that. :/

-- 
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?" -- A. P. J.


More information about the cairo mailing list