An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20130725/04abdcbe/attachment.pl>
Building R with Cairo
3 messages · Ben Warren, Brian Ripley, Dirk Eddelbuettel
On 25/07/2013 20:35, Ben Warren wrote:
All-
I have been hacking on an R 2.15 build on an Ubuntu 10.4 box, and I do
not know how to debug R's error message regarding cairo "working".
Configuration completes without the expected additional capability (cairo)
We don't support obsolete versions of R. (Although there never was a '2.15', this seems to be 2.15.1, four versions old. See the posting guide.) You will need to look in config.log to see the details, but I expect the information in the 'R Installation and Administration Manual' covers this. You really do want pango for decent font support.
R is now configured for x86_64-unknown-linux-gnu
Source directory: . Installation directory: /app/vendor/R C compiler: gcc -std=gnu99 -g -O2 Fortran 77 compiler: gfortran -g -O2 C++ compiler: g++ -g -O2 Fortran 90/95 compiler: gfortran -g -O2 Obj-C compiler: Interfaces supported: External libraries: readline Additional capabilities: PNG, NLS Options enabled: shared R library, shared BLAS, R profiling Recommended packages: yes configure: WARNING: you cannot build info or HTML versions of the R manuals configure: WARNING: you cannot build PDF versions of the R manuals configure: WARNING: you cannot build PDF versions of vignettes and help pages
and it appears the relevant error is: checking whether pkg-config knows about cairo and pango... no
checking whether pkg-config knows about cairo... yes checking whether cairo is >= 1.2 and works... no
Does anyone have perspective on what flags/tests to run in debugging this? Many thanks in advance for your perspective, and apologies for socializing such a minor problem; I am so very close, but have been banging my head on this for a while. Many thanks, Ben My build script: #!/usr/bin/env bash
#Get apt looking in the right places sudo apt-get update #Give the box the tools it needs to manage software sudo apt-get install -y curl make pkg-config g++ #Install the dependencies for the packages below sudo apt-get install -y freetype* libxml2 libxml2-dev libpng12-dev gfortran sudo mkdir -p /app sudo chown -R vagrant /app INSTALL_LOCATION=/app/vendor mkdir -p $INSTALL_LOCATION/lib mkdir -p $INSTALL_LOCATION/include mkdir -p $INSTALL_LOCATION/compiled mkdir -p $INSTALL_LOCATION/vulcan cd $INSTALL_LOCATION/include curl http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.9.0.tar.gz-o fontconfig-2.9.0.tar.gz tar -zxf fontconfig-2.9.0.tar.gz cd fontconfig-2.9.0 ./configure --prefix $INSTALL_LOCATION make mkdir -p $INSTALL_LOCATION/include/fontconfig cp -v fontconfig/fcfreetype.h fontconfig/fcprivate.h fontconfig/fontconfig.h $INSTALL_LOCATION/include/fontconfig/ make install make clean cd - cd $INSTALL_LOCATION/include curl http://cairographics.org/releases/pixman-0.26.0.tar.gz -o pixman-0.26.0.tar.gz tar -zxf pixman-0.26.0.tar.gz cd pixman-0.26.0/ ./configure --prefix $INSTALL_LOCATION make mkdir -p $INSTALL_LOCATION/include/pixman-1 cp -v pixman/pixman.h pixman/pixman-version.h $INSTALL_LOCATION/include/pixman-1/ make install make clean cd - cd $INSTALL_LOCATION/include curl http://www.cairographics.org/releases/cairo-1.10.0.tar.gz -o cairo-1.10.0.tar.gz tar -zxf cairo-1.10.0.tar.gz cd cairo-1.10.0/ # Tell Cairo where fontconfig and pixman are # export LD_LIBRARY_PATH=$INSTALL_LOCATION/lib # This does not do it. export PKG_CONFIG_PATH=$INSTALL_LOCATION/lib/pkgconfig export FONTCONFIG_CFLAGS="-I${INSTALL_LOCATION}/include/fontconfig -I${INSTALL_LOCATION}/include" export FONTCONFIG_LIBS="-L${INSTALL_LOCATION}/lib -lpixman-1" export pixman_CFLAGS="-I${INSTALL_LOCATION}/include/pixman-1 -I${INSTALL_LOCATION}/include" export pixman_LIBS="-L${INSTALL_LOCATION}/lib -lfontconfig" ./configure --prefix $INSTALL_LOCATION/cairo make make install make clean cd - # echo "******************************************" curl http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz -o R-2.15.1.tar.gz tar -zxf R-2.15.1.tar.gz cd R-2.15.1/ # Tell R where Cairo is export MAIN_CFLAGS="-I${INSTALL_LOCATION}/include -I${INSTALL_LOCATION}/cairo/include" export LDFLAGS="-L${INSTALL_LOCATION}/lib -L${INSTALL_LOCATION}/cairo/lib" export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${INSTALL_LOCATION}/cairo/lib/pkgconfig:${INSTALL_LOCATION}/lib/pkgconfig" ./configure --prefix $INSTALL_LOCATION/R --enable-R-shlib --without-x --with-cairo --with-libpng make make docs make install cd -
[[alternative HTML version deleted]]
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
| On 25/07/2013 20:35, Ben Warren wrote:
| > I have been hacking on an R 2.15 build on an Ubuntu 10.4 box, and I do | > not know how to debug R's error message regarding cairo "working". Well -- there is a formally supported package so you could just use what I use in the official Debian / Ubuntu package. Here is eg from my build-log for R 2.10.1-2 from early 2010 (to reflect your Ubuntu 10.4 requirement) -- cutting and pasting from a grep for 'pango\|cairo': Get:98 http://ftp.us.debian.org sid/main libcairo2 1.8.8-2 [508kB] Get:100 http://ftp.us.debian.org sid/main libpango1.0-common 1.26.1-1 [103kB] Get:104 http://ftp.us.debian.org sid/main libpango1.0-0 1.26.1-1 [298kB] Get:115 http://ftp.us.debian.org sid/main libcairo2-dev 1.8.8-2 [584kB] Get:116 http://ftp.us.debian.org sid/main libpango1.0-dev 1.26.1-1 [369kB] [...] Setting up libpango1.0-0 (1.26.1-1) ... Setting up libcairo2-dev (1.8.8-2) ... Setting up libpango1.0-dev (1.26.1-1) .. [...] checking whether pkg-config knows about cairo and pango... yes checking whether cairo including pango is >= 1.2 and works... yes Additional capabilities: PNG, JPEG, TIFF, NLS, cairo These days, on current releases, it looks similar, apart from the fact that we are of course using current release vesions. As you probably should too. Note that there is excellent support for pre-built binaries versions of Ubuntu on CRAN as well, but I fear it only goes back as far currently supported versions including the last long-term support as detailed in the README. The r-sig-debian list is there for help on matters Debian/Ubuntu too. Dirk
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com