[R-SIG-Mac] compile R on Mac OS 10.9.4 with cairo support
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 25 09:03:31 CEST 2014
On 23/08/2014 16:43, Tobias Verbeke wrote:
> Dear list,
>
> I'm trying to compile R from source on Mac OS 10.9.4 using the flags from
>
> https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R-build/conf.mavericks-x86_64
>
> I untarred the following libraries from http://r.research.att.com/libs/
>
> gfortran-4.8.2-darwin13.tar.bz2
> tcl8.6.0-darwin10-x86_64.tar.gz
> tk8.6.0-darwin10-x86_64.tar.gz
> freetype-2.5.3-darwin10-bin2.tar.gz
> pkg-config-0.25-darwin9-bin3.tar.gz
> fontconfig-2.11.1-darwin10-bin2.tar.gz
> fontconfig-2.11.1-add.tar.gz
> cairo-1.12.16-darwin10-bin2.tar.gz
> jpeg-v8d-darwin9-bin4.tar.gz
> libpng-1.5.18-darwin10-bin2.tar.gz
> tiff-4.0.3-darwin10-bin2.tar.gz
> pixman-0.32.4-darwin10-bin2.tar.gz
> xz-5.0.5-darwin10-bin2.tar.gz
>
> Then I applied the patch from http://r.research.att.com/libs/cairo-1.12.16-darwin13-static-pkgconfig.patch using
>
> cd /usr/local/lib/pkgconfig
> sudo curl -O http://r.research.att.com/libs/cairo-1.12.16-darwin13-static-pkgconfig.patch
> sudo patch < cairo-1.12.16-darwin13-static-pkgconfig.patch
>
> Some patches are rejected and the resulting 'fontconfig.pc.rej' looks as follows:
>
> ***************
> *** 13,18 ****
> Version: 2.11.0
> Requires: freetype2
> Requires.private: libxml-2.0
> - Libs: -L${libdir} -lfontconfig
> - Libs.private: -L/usr/local/lib -lfreetype -lxml2
> Cflags: -I${includedir} -I/usr/local/include/freetype2 -I/usr/local/include/libpng15 -I/usr/include/libxml2
> --- 13,18 ----
> Version: 2.11.0
> Requires: freetype2
> Requires.private: libxml-2.0
> + Libs: /usr/local/lib/libfontconfig.a
> + Libs.private: /usr/local/lib/libfreetype.a -lxml2
> Cflags: -I${includedir} -I/usr/local/include/freetype2 -I/usr/local/include/libpng15 -I/usr/include/libxml2
>
> Compilation itself goes fine, but I do not succeed in getting proper cairo support.
>
> The config.log has the following:
>
> checking whether pkg-config knows about cairo... yes
> Package libxml-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libxml-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libxml-2.0', required by 'Fontconfig', not found
> Package libxml-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libxml-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libxml-2.0', required by 'Fontconfig', not found
> Package libxml-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libxml-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libxml-2.0', required by 'Fontconfig', not found
> Package libxml-2.0 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libxml-2.0.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libxml-2.0', required by 'Fontconfig', not found
> checking whether cairo is >= 1.2 and works... no
>
> Executing
>
> sudo find / -name libxml-2.0.pc
>
> does not give any results.
>
> I must have overlooked something. Is there other information I can provide?
Apple overlooked something. The pkg-config you are using is not
provided by Apple, and Apple does not provide pkg-config files for the
software it provides[*] where installing from sources would do so.
I do have a /usr/local/lib/pkgconfig/libxml-2.0.pc, containing
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
modules=1
Name: libXML
Version: 2.9.1
Description: libXML library version2.
Requires:
Libs: -L${libdir} -lxml2
Libs.private: -lpthread -lz -liconv -lm
Cflags: -I${includedir}/libxml2
from a source installation of libxml2.
[*] Strangely, /usr/lib/pkgconfig is not quite empty on my box.
>
> Many thanks in advance for any pointers.
>
> Best,
> Tobias
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK
More information about the R-SIG-Mac
mailing list