Building R with Cairo
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