[cairo] install latest cairo + pango + gtk

Chris Wilson chris at chris-wilson.co.uk
Mon Oct 29 03:33:19 PDT 2007


Nguyen Vu Hung (vuhung16plus at gmail.com) said: 
> Hi all,
> 
> Under a system that already has cairo + pango + gtk system-wide
> installed, all of them are not latest versions, I want to install them
> into my $HOME. First of all, I want to test the Unicode text rendering
> of pangocairo as Chris recommended.

I use jhbuild [svn://svn.gnome.org/svn/jhbuild] to maintain parallel
development environments, and it is especially useful where you need to
compile, install and use the latest library versions from within your
writeable area.

> I've tried:
> 
>  1060  cd cairo-1.4.10
>  1061  ls
>  1062  ./configure --prefix=$HOME; make; make install
>  1067  vi config-vh.sh
>  1068  ./config-vh.sh
>  1069  make
>           make install
> $cat config-vh.sh
> #!/bin/sh
> 
> CPPFLAGS=-I$HOME/include
> export CPPFLAGS
> LDFLAGS=-L$HOME/lib
> export LDFLAGS
> PKG_CONFIG_PATH=$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig
> export PKG_CONFIG_PATH
> ./configure --prefix=$HOME
> 
> # compile test code:
> 1045  cc -L~/lib `pkg-config --cflags --libs pangocairo --libs cairo
> --libs pango` utf8test-pango.c -o utf8test-pango
> ]$./utf8test-pango
> ./utf8test-pango: error while loading shared libraries:
> libpangocairo-1.0.so.0: cannot open shared object file: No such file
> or directory

All you're missing here is 'export LD_LIBRARY_PATH=$HOME/lib'. You may
also consider adding 'export PATH=$HOME/bin:$PATH' as well, as a few
libraries install binaries that are used during the compilation phase.
However, for the toolchain you are compiling, they should all be using
paths provided by pkg-config.

Hope this helps.
--
Chris Wilson


More information about the cairo mailing list