Probably not much help to you, but for what it's worth:
* on my system cairo.h is in /usr/include/cairo
Perhaps the CAIRO flags that you set are not adequately guiding the search.
* you need to have the *development* version of cairo installed; on my
system (Fedora 17) I do:
sudo yum install cairo-devel.x86_64
to effect this.
* I believe that to get cairo to fly properly you also need to have
(the development version of) *pango* installed. On my system I do
sudo yum install pango-devel.x86_64
to effect this.
* I don't know how (or even if it is possible) to get yum to install
packages to a "custom" location --- as you would apparently need to do,
since you have created a custom ".../usr/local" under your home directory.
* I was under the impression that to get cairo to fly one needs to do
./configure --with-cairo
All of the foregoing may be a red herring, off the point and have
nothing to do with the problem that you are having. I don't really know
what I'm doing. I just follow recipes. :-) Good luck.
cheers,
Rolf Turner
On 29/04/14 07:26, Fong Chun Chan wrote:
Hi,
I am trying to get the R package Cairo installed. I've been successfully in
building the latest version of Cairo library (1.12.16,
http://cairographics.org/) from source and installed into ~/usr/local using
./configure --prefix=/home/fong/usr/local
I set the my CAIRO_LIBS and CAIRO_CLAGS environment variables in my
~/.bashrc:
export CAIRO_LIBS=${HOME}/usr/local/lib
export CAIRO_CFLAGS=${HOME}/usr/local/include
When I try to install Cairo in R using:
install.packages('Cairo')
I get the following error:
checking for pkg-config... /home/fong/usr/local/bin/pkg-config
configure: CAIRO_CFLAGS=/home/fong/usr/local/include/cairo
checking if R was compiled with the RConn patch... no
checking cairo.h usability... no
checking cairo.h presence... no
checking for cairo.h... no
configure: error: Cannot find cairo.h! Please install cairo (
http://www.cairographics.org/) and/or set CAIRO_CFLAGS/LIBS correspondingly.
ERROR: configuration failed for package 'Cairo'
But I can see the cairo.h header in /home/fong/usr/local/include/cairo. I
been trying to scouring the internet for answers, but I can't seem to find
any work for me. If anyone has any suggestions that would be helpful.
Thanks
sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] vimcom.plus_0.9-93 setwidth_1.0-3 colorout_1.0-2
loaded via a namespace (and not attached):
[1] tcltk_3.1.0 tools_3.1.0
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.