[GRASS-dev] GRASS 7: cairo compilation problem

Markus Neteler neteler at osgeo.org
Sat Aug 28 10:31:59 EDT 2010


On Sat, Aug 28, 2010 at 3:06 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Markus Neteler wrote:
>
>> > IOW, cairo can't make up its mind whether it was built with fontconfig
>> > support or not. Is it possible that you have more than one version,
>> > and it's using the headers from one version and libraries (and
>> > pkg-config data) from another.
>>
>> rpm -qa | grep 'cairo\|fontconf' | sort
>
>> lib64cairo2-1.9.6-3mdv2010.1
>
>> libcairo2-1.9.6-3mdv2010.1
>
> Is it possible that one of these has FreeType support and the other
> doesn't?

Both appear to have support:

[neteler at north ~]$ rpm -qil lib64cairo2-1.9.6-3mdv2010.1 | grep 'so.'
/usr/lib64/libcairo-script-interpreter.so.2
/usr/lib64/libcairo-script-interpreter.so.2.10906.0
/usr/lib64/libcairo.so.2
/usr/lib64/libcairo.so.2.10906.0

[neteler at north ~]$ ldd /usr/lib64/libcairo.so.2 | grep 'free\|fontc'
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f3be8b80000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f3be88f8000)

[neteler at north ~]$ rpm -qil libcairo2-1.9.6-3mdv2010.1 | grep 'so.'
/usr/lib/libcairo-script-interpreter.so.2
/usr/lib/libcairo-script-interpreter.so.2.10906.0
/usr/lib/libcairo.so.2
/usr/lib/libcairo.so.2.10906.0

[neteler at north ~]$ ldd /usr/lib/libcairo.so.2 | grep 'free\|fontc'
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xf75e7000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xf7563000)

>> As I understand, the pkg-config output here is wrong since it is used:
>> configure.in:CAIROLIB=`pkg-config --libs $cairo`
>
> Yes.

I have opened a bug report in the Mandriva tracker.

> Also, because of issues with pkg-config (e.g. not existing on
> platforms other than Linux), configure also has:
>
>  --with-cairo-includes=DIRS
>                          cairo include files are in DIRS
>  --with-cairo-libs=DIRS  cairo library files are in DIRS
>  --with-cairo-ldflags=FLAGS
>                          cairo needs FLAGS when linking
>
> So --with-cairo-ldflags=-lfontconfig may be able to work around this.

Yes, this works as workaround, thanks.

Markus


More information about the grass-dev mailing list