[R-sig-Debian] building rpy against lenny-cran

Dirk Eddelbuettel edd at debian.org
Tue Jun 1 01:45:37 CEST 2010


On 31 May 2010 at 02:26, owzar001 wrote:
| Hi.
| 
| On all of my machines, except for a netbook cursed with the GMA500
| chipset, the R packages are synced to lenny-cran.
| 
| I have been using rpy in a chroot using the official lenny
| R packages (2.7.1) given that i have not been able to find
| compatible rpy deb packages to work with lenny-cran.
| 
| I am able to build the rpy deb package from source in
| a 32-bit lenny chroot (with the stock R packages) using
| the following sequence
| 
| kolmogorov:/tmp$ sudo apt-get source python-rpy
| kolmogorov:/tmp/rpy-1.0.3$ sudo apt-get build-dep python-rpy
| kolmogorov:/tmp/rpy-1.0.3$ sudo dch -l local 'localrpy'
| kolmogorov:/tmp/rpy-1.0.3$ sudo debuild -us -uc
| 
| I am running into problems when I am trying to build
| the deb packages from source against the AMD64 lenny-cran
| packages. Specifically the last step fails. It complains
| about (among other things) not finding the R version.

That may be a clue as there is an oooooold bug in rpy -- each R triggers a
need for new build as the R version gets hardcoded into the library name.
Worse, the regexp assume single digits for each of a.b.c which started to
break with R 2.10.0 (as 10 has two digits). The patch I once committed is
simple, so try rpy from svn, or from a more recent Debian package. IIRC the
fix was 

    # edd 05 Apr 2006  version = re.search("R +([0-9]\.[0-9]\.[0-9])", output)
    # edd 16 Oct 2009  version = re.search("R +([0-9]\.[0-9]+\.[0-9])", output)
    version = re.search(" +([0-9]\.[0-9]+\.[0-9])", output)

this in rpy_tools.py.  See if that helps.

Dirk


| This command seems to work 
| $ R --version
| R version 2.11.0 (2010-04-22)
| Copyright (C) 2010 The R Foundation for Statistical Computing
| ISBN 3-900051-07-0
| 
| 
| I hope that this is an appropriate forum for seeking
| help for building rpy against the lenny-cran R packages.
| 
| Sincerely,
| 
| Kouros
| 
| 
| Kouros Owzar
| Biostatistics and Bioinformatics
| Duke University
| 
| kolmogorov:/tmp/rpy-1.0.3# debuild -us -uc
|   dpkg-buildpackage -rfakeroot -D -us -uc
| dpkg-buildpackage: warning: using a gain-root-command while being root
| dpkg-buildpackage: set CFLAGS to default value: -g -O2
| dpkg-buildpackage: set CPPFLAGS to default value:
| dpkg-buildpackage: set LDFLAGS to default value:
| dpkg-buildpackage: set FFLAGS to default value: -g -O2
| dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
| dpkg-buildpackage: source package rpy
| dpkg-buildpackage: source version 1.0.3-2local1
| dpkg-buildpackage: source changed by root <root at kolmogorov>
| dpkg-buildpackage: host architecture amd64
|   fakeroot debian/rules clean
| dh_testdir
| dh_testroot
| rm -f build-stamp configure-stamp
| [ ! -f Makefile ] || /usr/bin/make distclean
| (cd doc/ && make clean && rm -vf manual.pdf manual.info manual.dvi \
|  		&& rm -vfr manual_html manual_html.tgz)
| make[1]: Entering directory `/tmp/rpy-1.0.3/doc'
| rm -f rpy.cp rpy.cps rpy.fn rpy.fns rpy.ky
| rm -f rpy.kys rpy.log rpy.pg rpy.pgs rpy.tmp
| rm -f rpy.toc rpy.tp rpy.tps rpy.vr rpy.vrs
| rm -f rpy.aux
| make[1]: Leaving directory `/tmp/rpy-1.0.3/doc'
| for python in python2.4 python2.5; \
|  		do $python setup.py clean; \
|  	done
| RHOMES= []
| DEBUG= True
| Setting RHOMES to  ['/usr/lib64/R']
| Traceback (most recent call last):
|    File "setup.py", line 109, in ?
|      RVERSION = rpy_tools.get_R_VERSION(RHOME, force_exec=True)
|    File "/tmp/rpy-1.0.3/rpy_tools.py", line 103, in get_R_VERSION
|      raise RuntimeError("Couldn't obtain version number from output\n"
| RuntimeError: Couldn't obtain version number from output
| of `R --version'.
| 
| RHOMES= []
| DEBUG= True
| Setting RHOMES to  ['/usr/lib64/R']
| Traceback (most recent call last):
|    File "setup.py", line 109, in <module>
|      RVERSION = rpy_tools.get_R_VERSION(RHOME, force_exec=True)
|    File "/tmp/rpy-1.0.3/rpy_tools.py", line 103, in get_R_VERSION
|      raise RuntimeError("Couldn't obtain version number from output\n"
| RuntimeError: Couldn't obtain version number from output
| of `R --version'.
| 
| make: *** [clean] Error 1
| dpkg-buildpackage: failure: fakeroot debian/rules clean gave error exit 
| status 2
| debuild: fatal error at line 1319:
| dpkg-buildpackage -rfakeroot -D -us -uc failed
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
  Regards, Dirk



More information about the R-SIG-Debian mailing list