Skip to content

A newbee problem compiling R in ubuntu.

4 messages · Paul Johnson, Dirk Eddelbuettel, Ross Boylan +1 more

#
On Sun, Jan 31, 2010 at 10:02 PM, Kenneth Roy Cabrera Torres
<krcabrer at une.net.co> wrote:
Dear Kenneth:

Let me share you a handy thing I learned. You can get the commands
that the R packages are built with, along with the source code.  Make
a directory (this will download a bunch of stuff)

apt-get source r-base-core

that should download a tarball of original R source code, a diff file
that is applied to build R deb, and it will open the code and apply
the diff.  You can look inside the directory, in a subdirectory
"debian", where the configure files that control package building are
kept.

If you type "dpkg-buildpackage -rfakeroot"  in the directory where all
that stuff got opened up (the one "above" the debian subdirectory), it
will build the debian packages.  It would not be an incredibly
difficult thing to replace that R source package with the new one you
want to use.  But I don't think you need to.  Just look in the rules
file under debian subdirectory, you will see the configure statement
they use.  I think in there you'll also find information about what
devel packages they assume you have.

I find it to be a little difficult to revise debian builds, so I don't
really mean you ought to do that. But you could.  And I often have!
#
On 1 February 2010 at 00:16, Paul Johnson wrote:
| On Sun, Jan 31, 2010 at 10:02 PM, Kenneth Roy Cabrera Torres
| <krcabrer at une.net.co> wrote:
| > Dear R users:
| >
| > Maybe it is a silly question, but I'm don't understand what am I doing
| > wrong (I make the same steps, and it works).
| >
| > In a new karmik koala ubuntu installation I compile the last patched
| > 2.10.1 version of R (r51070).
| >
| > Every thing was right (I install all the dev libraries I need).
| >
| > First I type:
| >
| > ./configure ?--enable-R-shlib
| >
| > And I obtain:
| >
| 
| 
| Dear Kenneth:
| 
| Let me share you a handy thing I learned. You can get the commands
| that the R packages are built with, along with the source code.  Make
| a directory (this will download a bunch of stuff)
| 
| apt-get source r-base-core

I often recommend that too but ... 
| 
| that should download a tarball of original R source code, a diff file
| that is applied to build R deb, and it will open the code and apply
| the diff.  You can look inside the directory, in a subdirectory
| "debian", where the configure files that control package building are
| kept.

... if all you want is, say, the configure invocation then you are better off
just downloading the associated 'diff.gz' file which will be much, much smaller.

Dirk

| If you type "dpkg-buildpackage -rfakeroot"  in the directory where all
| that stuff got opened up (the one "above" the debian subdirectory), it
| will build the debian packages.  It would not be an incredibly
| difficult thing to replace that R source package with the new one you
| want to use.  But I don't think you need to.  Just look in the rules
| file under debian subdirectory, you will see the configure statement
| they use.  I think in there you'll also find information about what
| devel packages they assume you have.
| 
| I find it to be a little difficult to revise debian builds, so I don't
| really mean you ought to do that. But you could.  And I often have!
| 
| 
| -- 
| Paul E. Johnson
| Professor, Political Science
| 1541 Lilac Lane, Room 504
| University of Kansas
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
#
On Mon, 2010-02-01 at 19:36 -0600, Dirk Eddelbuettel wrote:
For dpkg-buildpackage I always use -D, which checks that the build
dependencies are present.  Particularly if you're going through the
build the first time, it's a great check.

The man page is unclear whether -D is part of the default behavior; I
think I've found that it is not.

I also use -uc -b, though your style may differ.  See man
dpkg-buildpackage for more.

-r is one option I don't use; at least on lenny, fakeroot is the
default.

Continuing my string of non-R specific responses....

Ross
#
On Mon, Feb 1, 2010 at 7:50 PM, Ross Boylan <ross at biostat.ucsf.edu> wrote:
Another option for installing the necessary dependencies without
actually doing the build of the Debian/Ubuntu package is

wajig build-depend r-base

which I think corresponds to

apt-get build-dep r-base