[Rd] Compiling R-3.1.0 on debian with libpng/libjpeg

Dirk Eddelbuettel edd at debian.org
Fri Jun 27 00:19:49 CEST 2014


On 26 June 2014 at 12:10, Prof Brian Ripley wrote:
| On 26/06/2014 07:46, Preussner, Jens wrote:
| > Dear r-developers,
| >
| > I currently face an issue while compiling R from source on a debian wheezy. When running the configure script (particularly with --enable-R-shlib --prefix=/packages/R/3.1.0/) I get a Makefile and the output
| > ...
| >    Interfaces supported:      X11
| >    External libraries:        readline
| >    Additional capabilities:   PNG, JPEG, NLS
| >    Options enabled:           shared R library, shared BLAS, R profiling
| > ...
| >
| > After compiling and checking the capabilities, R tells me the following:
| >> capabilities()
| >      jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
| >     FALSE    FALSE    FALSE    FALSE    FALSE    FALSE     TRUE     TRUE
| >    libxml     fifo   cledit    iconv      NLS  profmem    cairo
| >      TRUE     TRUE     TRUE     TRUE     TRUE    FALSE    FALSE
| >
| > I already have R on another machine with jpeg/png capabilities, also compiled on my own. I crosschecked the versions of the libpng-* and libjpeg-* packages installed there and could not find any difference. Also returning to R-3.0.2 doesn't work.
| > A last thing: The same question came up back in 2009, but there was no answer on the list.. https://stat.ethz.ch/pipermail/r-help/2009-December/222967.html
| >
| > Any suggestions how to get more information on what is going on here?
| 
| As you do not have capabilities for cairo nor X11, read ?png, e.g.
| 
|      type: character string, one of ‘"Xlib"’ or ‘"quartz"’ (some OS X
|            builds) or ‘"cairo"’.  The latter will only be available if
|            the system was compiled with support for cairo - otherwise
|            ‘"Xlib"’ will be used.  The default is set by
|            ‘getOption("bitmapType")’ - the ‘out of the box’ default is
|            ‘"quartz"’ or ‘"cairo"’ where available, otherwise ‘"Xlib"’.
| 
|       R can be compiled without support for some or all of the types for
|       each of these devices: this will be reported if you attempt to use
|       them on a system where they are not supported.  For ‘type =
|       "Xlib"’ they may not be usable unless the X11 display is available
|       to the owner of the R process.
| 
| So, the only type available to you appears to be "Xlib", and that 
| process does not have access to an X server.
| 
| The strongly recommended solution is to get cairographics working: see
| http://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Useful-libraries-and-programs

1)  Here are the Build-Depends: the actual Debian binary uses:

    Build-Depends: gcc (>= 4:4.1.0), g++ (>= 4:4.1.0), gfortran (>= 4:4.1.0),
    libblas-dev, liblapack-dev (>= 3.1.1), tcl8.5-dev, tk8.5-dev, bison,
    groff-base, libncurses5-dev, libreadline-dev, debhelper (>= 7.2.3),
    texinfo (>= 4.1-2), libbz2-dev, liblzma-dev, libpcre3-dev, xdg-utils,
    zlib1g-dev, libpng-dev, libjpeg-dev, libx11-dev, libxt-dev,
    x11proto-core-dev, libpango1.0-dev, libcairo2-dev, libtiff5-dev, xvfb,
    xauth, xfonts-base, texlive-base, texlive-latex-base,
    texlive-generic-recommended, texlive-fonts-recommended,
    texlive-fonts-extra, texlive-extra-utils, texlive-latex-recommended,
    texlive-latex-extra, default-jdk [!arm !hppa !kfreebsd-i386
    !kfreebsd-amd64 !hurd-i386], mpack, bash-completion

2)  Here is the relevant part from debian/rules calling configure:

	./configure --prefix=/usr			\
		    --with-cairo			\
		    --with-jpeglib			\
		    --with-readline			\
		    --with-tcltk			\
		    --with-system-bzlib			\
		    --with-system-pcre			\
		    --with-system-zlib			\
		    --mandir=/usr/share/man		\
		    --infodir=/usr/share/info		\
		    --datadir=/usr/share/R/share	\
		    --includedir=/usr/share/R/include	\
		    $(atlas)		\
		    $(lapack)		\
		    --enable-R-profiling		\
		    --enable-R-shlib			\
		    --enable-memory-profiling		\
		    --without-recommended-packages	\
		    --build $(buildarch)

    We select Cairo and Jpeg, Png gets autoselected when the header and
    library are found.

3)  None of this is secret. Our package sources have always been public.

Greetings from DSC,  Dirk

| 
| > Many thanks and best regards,
| >
| > Jens
| >
| >
| > 	[[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
| 
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-devel mailing list