[cairo] Libtool missing a flag

Dave Yeo daveryeo at telus.net
Sat Apr 11 21:48:43 PDT 2009


On 04/11/09 01:52 pm, Gerdus van Zyl wrote:
>
> Hi,
>
> I am again trying to get cairo compiling using msys/mingw; Out of the
> box it fails when creating a dll failing at linking [error given
> below]. It seem libtool isn't specifying -lpixman-1 as it should
> because adding it to the gcc command libtool generates makes it
> compile.  Is there something I am missing in my environment setup?
>
> thanks,
> Gerdus
>
> --------
> make  all-recursive
> make[1]: Entering directory `/my/cairo'
> Making all in src
> make[2]: Entering directory `/my/cairo/src'
> make  all-am
> make[3]: Entering directory `/my/cairo/src'
> /bin/sh ../libtool --tag=CC   --mode=link gcc  -pipe -O2
> -mms-bitfields -march=i686  -version-info 10903:0:10901 -no-undefined
> -export-symbols cairo.def -L/usr/local/lib -o libcairo.la -rpath
> /usr/local/lib
[...]
> -LC:/msys/local/lib -lpixman-1      -LC:/msys/local/lib -lpng12
> -lgdi32 -lmsimg32     -lz -lz     -lm
>
> *** Warning: This system can not link to static lib archive
> /usr/local/lib/libpixman-1.la.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> libtool: link: rm -fr  .libs/libcairo.dll.a
> libtool: link: if test "x`/bin/sed 1q cairo.def`" = xEXPORTS; then cp
> cairo.def .libs/libcairo-2.dll.def; else echo EXPORTS>
> .libs/libcairo-2.dll.def; cat cairo.def>>  .libs/libcairo-2.dll.def;
> fi
> libtool: link:  gcc -shared .libs/libcairo-2.dll.def
[...]
> -L/usr/local/lib -LC:/msys/local/lib -lpng12 -lgdi32 -lpixman-1
> -lmsimg32 -lz  -mms-bitfields -march=i686   -o .libs/libcairo-2.dll
> -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
> .libs/libcairo.dll.a
> Creating library file: .libs/libcairo.dll.a
> make[3]: Leaving directory `/my/cairo/src'
> make[2]: Leaving directory `/my/cairo/src'
> make[1]: Leaving directory `/my/cairo'

Do you have a pixman-1.dll? Libtool is very conservative about creating 
DLLs unless all libraries are also DLLs. If one is static or libtool 
thinks one is static then you get the warning and end up with only a 
static lib.
Or am I missing something because it seems that your log shows 
libcairo-2.dll being created. Note that the dll will be in src/.libs
Dave


More information about the cairo mailing list