Skip to content

need help for building R in Ubuntu 8.04

6 messages · Tony Plate, Douglas Bates, Tyler Smith +2 more

#
[moving this to R-sig-debian]

Dirk, thanks for this info.

The r-wiki 
http://wiki.r-project.org/rwiki/doku.php?id=getting-started:installation:debian 
contained some slightly different suggestions, but I 
strongly suspect your suggestions are likely to be better.

So, I edited (minimally) the r-wiki to add your suggestions.
(1) added a link to 
http://cran.r-project.org/bin/linux/ubuntu/ (and debian)
  saying "look there first"
(2) added your 3 "apt-get install/build-dep" commands

I suspect more could be changed (i.e., deleting some 
unnecessarily complex advice), but first I wanted to try to 
get answers on two issues:

(1) The R-wiki recommends "aptitude" over "apt-get" (saying 
"Debian is well known for its apt-get command to install and 
update Debian packages. There is also aptitude, which is a 
bit better in handling dependencies etc.")  Is there any 
reason to prefer one over the other? 
(http://www.pthree.org/2007/08/12/aptitude-vs-apt-get/ ?) Is 
it generally OK to mix usage of the two on the same system? 
(and synaptic too?)  Do the two have the same/similar 
arguments and syntax?

(2) The R-wiki page suggests commands that seem designed to 
get around problems that might have been avoided had 
'apt-get build-deps r-base' been used (e.g., './configure 
--x-includes=/usr/include/X11' "?x-includes=/usr/include/X11 
was needed as configure script could not find header 
files.") Are these things better deleted from the Wiki page, 
or are they sometime necessary even in systems that have 
been correctly configured?

(And I'm happy to leave these suggestions alone too, but I 
know that when I've got suggestions from Dirk re Ubuntu, 
they've worked for me, and I've been able to drop the more 
complex fudgy stuff.)

-- Tony Plate
Dirk Eddelbuettel wrote:
#
On Thu, May 29, 2008 at 5:10 PM, Tony Plate <tplate at acm.org> wrote:
At the risk of confusing the issue further, I prefer to use "wajig"
which provides a unified command-line interface to apt-get, dselect
and all the other command line tools.  The first package that I
install on a Debian/Ubuntu system is wajig then I use that to do all
the other package maintenance.  It adds command completion and package
name completion for itself to the standard shell completions so I find
it more convenient to use than any GUI like aptitude or synaptic.

Although I would have written to the list what Dirk wrote about

apt-get build-depend r-base

(and I had started to create the message when Dirk's message arrived)
I would actually have used

wajig bui<tab>-<tab> r-base

to install the build-depend packages for r-base.  Then I would have
had to have checked which of the basic tools wajig calls to do the
build-depend installation.  The name wajig indicates that it is a jig
or wrapper around several other package-management functions.  It has
gotten to the point that I don't know which of the basic tools does
what (is it apt-get or dpkg or dpkg-deb or ...?) any more because I
always use wajig, which is even smart enough to prompt you for your
password and get sudo permission for you when you need it.  How many
times have you typed

apt-get install foo

only to realize that you should have typed

sudo apt-get install foo


Because wajig is so flexible it has an incredible number of possible
commands (see the output from

wajig com<tab>

but the basic commands are fast to learn.  I depend on

wajig search "expression"

to find suitable packages and

wajig install pkg_name

to install them.  Other variations include installr, installs and
installrs to install the package plus its recommended or the package
plus its suggested or the package plus its recommended and suggested
packages.

One of the first things I do when I log on to a computer at home or at
the office is to spring up a terminal and run

wajig daily-upgrade

which updates the list of packages and installs any upgrades.

I learned about wajig from Dirk and now use it exclusively.  Do you
still use it, Dirk?

I suppose that younger generations of users will not find it as
convenient as those of us who grew up with command-line interfaces
(and dial telephones that were bolted to the wall and had the handset
attached by a cord) but we older types think it's just groovy.
I would say that those are better deleted but I will defer to Dirk if
he says it is advisable to retain those flags.  I don't use those
flags myself and the configure script has no trouble finding the
include files there.

You can find out exactly what configure call Dirk uses to build the
Debian packages by running

wajig build-depend r-base
wajig build r-base

The latter takes a while.
#
On Thu, May 29, 2008 at 06:27:25PM -0500, Douglas Bates wrote:
Without taking anything away from wajig, which is a great tool, there
shouldn't be any problems using apt-get interchangeably with aptitude,
or even synaptic. All three are front-ends for the same underlying
mechanisms, as I understand it. Aptitude takes the same (more or less)
command line arguments as apt-get, and when run without arguments
provides a curses-style gui, which some prefer to synaptic.

Tyler
#
Hi Tony,
On 29 May 2008 at 16:10, Tony Plate wrote:
| [moving this to R-sig-debian]

Good move!  Thanks also to everybody for the follow-ups.  As wajig maintainer
and hence initial Debian user,  I fully concur with what Doug said in its
favour. Also note that wajig's author is now also a prolific R/CRAN author
and will keynote at Use R. Small world. Lastly, to add to Tyler's mail, wajig
does in fact call apt-get, aptitude, dselect, dpkg, apt-cache --- $whatever
needed -- to get the job done from _one single interface_.  Very useful.
 
| Dirk, thanks for this info.
| 
| The r-wiki 
| http://wiki.r-project.org/rwiki/doku.php?id=getting-started:installation:debian 
| contained some slightly different suggestions, but I 
| strongly suspect your suggestions are likely to be better.
| 
| So, I edited (minimally) the r-wiki to add your suggestions.

I saw that as I follow the RSS aggregator at http://planetr.stderr.org which,
among other things, sucks in changes from the R Wiki. So three cheers to you
for enhancing the wiki pages. Right approach!

| (1) added a link to 
| http://cran.r-project.org/bin/linux/ubuntu/ (and debian)
|   saying "look there first"
| (2) added your 3 "apt-get install/build-dep" commands
|
| I suspect more could be changed (i.e., deleting some 
| unnecessarily complex advice), but first I wanted to try to 
| get answers on two issues:

Agreed. I glanced at the page but was too pressed for time to fix anything.
 
| (1) The R-wiki recommends "aptitude" over "apt-get" (saying 
| "Debian is well known for its apt-get command to install and 
| update Debian packages. There is also aptitude, which is a 
| bit better in handling dependencies etc.")  Is there any 
| reason to prefer one over the other? 

They are interchangeable. What matters is the internal representation. To
that end, even 'apt' is a layer on top of dpkg, and there are more layers.
Choice is a good thing, not unlike the gazillion different ways in which we
can get the same or similar things done in R :-)

| (http://www.pthree.org/2007/08/12/aptitude-vs-apt-get/ ?) Is 
| it generally OK to mix usage of the two on the same system? 
| (and synaptic too?)  Do the two have the same/similar 
| arguments and syntax?

Wajig smoothes everything. I never use aptitude directly, swore off dselect
many many years ago and mostly just use wajig.
 
| (2) The R-wiki page suggests commands that seem designed to 
| get around problems that might have been avoided had 
| 'apt-get build-deps r-base' been used (e.g., './configure 
| --x-includes=/usr/include/X11' " x-includes=/usr/include/X11 

Yeah, the x11 thing looks strange. I never needed that.  Note that the
principal author (Kurt) of R's configure logic works on a Debian system so
that just tends to work. GG must have tried this just when xorg stuff was
moving. 

| was needed as configure script could not find header 
| files.") Are these things better deleted from the Wiki page, 
| or are they sometime necessary even in systems that have 
| been correctly configured?

I'd remove'em or comment'em out. But some gentle testing may be best.

Cheers, Dirk
 
| (And I'm happy to leave these suggestions alone too, but I 
| know that when I've got suggestions from Dirk re Ubuntu, 
| they've worked for me, and I've been able to drop the more 
| complex fudgy stuff.)
| 
| -- Tony Plate
| 
|
| Dirk Eddelbuettel wrote:
| > On Wed, May 28, 2008 at 02:29:10PM +0200, Martin Maechler wrote:
| >>>>>>> "EH" == Erin Hodgess <erinm.hodgess at gmail.com>
| >>>>>>>     on Sun, 25 May 2008 13:27:04 -0500 writes:
| >>     EH> Try: ./configure --with-x=no
| >>
| >> well......  no!  really don't.
| > 
| > Seconded. 
| > 
| > At best this qualified for the 'then do not do it' school of advice to the 'it hurts when I do this'.
| > But it truly missed the underlying issue. See below.
| > 
| >> If you want to enjoy a Linux system and building from the
| >> source, and then maybe learn how that is happening, learning
| >> about shell scripts and 'make' and ...
| >> then rather do get the extra ubuntu packages needed.
| > 
| > Or if you 'just' want to run it, install Ubuntu and learn to take
| > advantage of the work of others.
| > 
| >> The advice (below) to get the 'xorg-dev'
| >> is definitely good advice. I have it on the list of packages
| >> I'd always want to install in addition to the basic
| >> ubuntu/debian list.
| >>
| >> But you most probably will find that you need a few more tools /
| >> libraries / headers for your ubuntu system such that you can
| >> build R with all the bells and whistles possible.
| >>
| >> There's the Debian (and "hence" Ubuntu) package
| >> 'r-base-dev'
| >> which contains 'r-base' (i.e. a *binary* version of R; the one
| >> Dirk Eddelbuettel mentioned),
| >> but also most of the compilers/libraries/... that you'd want to
| >> build R from the sources.
| > 
| > Just to be a bit more precise:
| > 
| > i)   'apt-get install r-base' will get you r-base-core and all the
| >      recommended packages --- use this if you want to _run_ R
| > 
| > ii)  'apt-get install r-base-dev' will get all the common header files, 
| >      as well as r-base-core use this if you _also want to build /
| >      install R packages_ incl from CRAN
| > 
| > iii) 'apt-get build-dep r-base' will get you _build dependencies_ for
| >      R and is probably what Martin wanted here.
| > 
| >> Last time I did get 'r-base-dev' on a "virgin" ubuntu system,
| >> I vaguely remember that it did not contain *really* all the
| >> tools I'd wanted, but almost all.
| > 
| > Bug reports are always welcome and a more constructive form of moving
| > things forward than an off-hand comment here :-) Note that I tend not
| > to get the ones filed against Ubuntu so file against Debian please.
| > 
| >> e.g., you may also want the two packages
| >>
| >>   tcl8.4-dev
| >>   tk8.4-dev
| > 
| > Just curious: what did you need them for ? In case you wanted to build
| > R, see iii) above as a possibly more focussed way to get there.
| > 
| > Dirk
| > 
|
#
Thanks a lot, Doug and Dirk,
for 'wajig'.

I didn't know it but now plan to use it as well.

One thing though (wajig or apt-get or aptitude):

    apt-get build-dep r-base

has a bit a seemingly undesired effect on my ubuntu 8.04 system:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      atlas3-base-dev atlas3-headers r-base-dev refblas3-dev
    The following NEW packages will be installed:
      debhelper gettext html2text intltool-debian libblas-dev po-debconf
    0 upgraded, 6 newly installed, 4 to remove and 83 not upgraded.
    2 not fully installed or removed.
    Need to get 3181kB of archives.
    After this operation, 28.3MB disk space will be freed.
    Do you want to continue [Y/n]? 

I really don't think I'd want to remove r-base-dev and its
dependencies just because I want to get the remaining tools for 
building R (r-base) from the sources.

Is there still a misunderstanding (on my side) ?
Martin

        
DB> On Thu, May 29, 2008 at 5:10 PM, Tony Plate <tplate at acm.org> wrote:
>> [moving this to R-sig-debian]

    >> Dirk, thanks for this info.

    >> The r-wiki
    >> http://wiki.r-project.org/rwiki/doku.php?id=getting-started:installation:debian
    >> contained some slightly different suggestions, but I strongly suspect your
    >> suggestions are likely to be better.

    >> So, I edited (minimally) the r-wiki to add your suggestions.
    >> (1) added a link to http://cran.r-project.org/bin/linux/ubuntu/ (and debian)
    >> saying "look there first"
    >> (2) added your 3 "apt-get install/build-dep" commands

    >> I suspect more could be changed (i.e., deleting some unnecessarily complex
    >> advice), but first I wanted to try to get answers on two issues:

    >> (1) The R-wiki recommends "aptitude" over "apt-get" (saying "Debian is well
    >> known for its apt-get command to install and update Debian packages. There
    >> is also aptitude, which is a bit better in handling dependencies etc.")  Is
    >> there any reason to prefer one over the other?
    >> (http://www.pthree.org/2007/08/12/aptitude-vs-apt-get/ ?) Is it generally OK
    >> to mix usage of the two on the same system? (and synaptic too?)  Do the two
    >> have the same/similar arguments and syntax?

    DB> At the risk of confusing the issue further, I prefer to use "wajig"
    DB> which provides a unified command-line interface to apt-get, dselect
    DB> and all the other command line tools.  The first package that I
    DB> install on a Debian/Ubuntu system is wajig then I use that to do all
    DB> the other package maintenance.  It adds command completion and package
    DB> name completion for itself to the standard shell completions so I find
    DB> it more convenient to use than any GUI like aptitude or synaptic.

    DB> Although I would have written to the list what Dirk wrote about

    DB> apt-get build-depend r-base

    DB> (and I had started to create the message when Dirk's message arrived)
    DB> I would actually have used

    DB> wajig bui<tab>-<tab> r-base

    DB> to install the build-depend packages for r-base.  Then I would have
    DB> had to have checked which of the basic tools wajig calls to do the
    DB> build-depend installation.  The name wajig indicates that it is a jig
    DB> or wrapper around several other package-management functions.  It has
    DB> gotten to the point that I don't know which of the basic tools does
    DB> what (is it apt-get or dpkg or dpkg-deb or ...?) any more because I
    DB> always use wajig, which is even smart enough to prompt you for your
    DB> password and get sudo permission for you when you need it.  How many
    DB> times have you typed

    DB> apt-get install foo

    DB> only to realize that you should have typed

    DB> sudo apt-get install foo


    DB> Because wajig is so flexible it has an incredible number of possible
    DB> commands (see the output from

    DB> wajig com<tab>

    DB> but the basic commands are fast to learn.  I depend on

    DB> wajig search "expression"

    DB> to find suitable packages and

    DB> wajig install pkg_name

    DB> to install them.  Other variations include installr, installs and
    DB> installrs to install the package plus its recommended or the package
    DB> plus its suggested or the package plus its recommended and suggested
    DB> packages.

    DB> One of the first things I do when I log on to a computer at home or at
    DB> the office is to spring up a terminal and run

    DB> wajig daily-upgrade

    DB> which updates the list of packages and installs any upgrades.

    DB> I learned about wajig from Dirk and now use it exclusively.  Do you
    DB> still use it, Dirk?

    DB> I suppose that younger generations of users will not find it as
    DB> convenient as those of us who grew up with command-line interfaces
    DB> (and dial telephones that were bolted to the wall and had the handset
    DB> attached by a cord) but we older types think it's just groovy.

    >> (2) The R-wiki page suggests commands that seem designed to get around
    >> problems that might have been avoided had 'apt-get build-deps r-base' been
    >> used (e.g., './configure --x-includes=/usr/include/X11'
    >> "?x-includes=/usr/include/X11 was needed as configure script could not find
    >> header files.") Are these things better deleted from the Wiki page, or are
    >> they sometime necessary even in systems that have been correctly configured?

    DB> I would say that those are better deleted but I will defer to Dirk if
    DB> he says it is advisable to retain those flags.  I don't use those
    DB> flags myself and the configure script has no trouble finding the
    DB> include files there.

    DB> You can find out exactly what configure call Dirk uses to build the
    DB> Debian packages by running

    DB> wajig build-depend r-base
    DB> wajig build r-base

    DB> The latter takes a while.


    >> (And I'm happy to leave these suggestions alone too, but I know that when
    >> I've got suggestions from Dirk re Ubuntu, they've worked for me, and I've
    >> been able to drop the more complex fudgy stuff.)
    >> 
    >> -- Tony Plate
    >> 
    >>
>> Dirk Eddelbuettel wrote:
>>>
>>> On Wed, May 28, 2008 at 02:29:10PM +0200, Martin Maechler wrote:
>>>>>>>>> 
    >>>>>>>>> "EH" == Erin Hodgess <erinm.hodgess at gmail.com>
    >>>>>>>>> on Sun, 25 May 2008 13:27:04 -0500 writes:
    >>>> 
    EH> Try: ./configure --with-x=no
    >>>> 
    >>>> well......  no!  really don't.
    >>> 
    >>> Seconded.
    >>> At best this qualified for the 'then do not do it' school of advice to the
    >>> 'it hurts when I do this'.
    >>> But it truly missed the underlying issue. See below.
    >>> 
    >>>> If you want to enjoy a Linux system and building from the
    >>>> source, and then maybe learn how that is happening, learning
    >>>> about shell scripts and 'make' and ...
    >>>> then rather do get the extra ubuntu packages needed.
    >>> 
    >>> Or if you 'just' want to run it, install Ubuntu and learn to take
    >>> advantage of the work of others.
    >>> 
    >>>> The advice (below) to get the 'xorg-dev'
    >>>> is definitely good advice. I have it on the list of packages
    >>>> I'd always want to install in addition to the basic
    >>>> ubuntu/debian list.
    >>>> 
    >>>> But you most probably will find that you need a few more tools /
    >>>> libraries / headers for your ubuntu system such that you can
    >>>> build R with all the bells and whistles possible.
    >>>> 
    >>>> There's the Debian (and "hence" Ubuntu) package
    >>>> 'r-base-dev'
    >>>> which contains 'r-base' (i.e. a *binary* version of R; the one
    >>>> Dirk Eddelbuettel mentioned),
    >>>> but also most of the compilers/libraries/... that you'd want to
    >>>> build R from the sources.
    >>> 
    >>> Just to be a bit more precise:
    >>> 
    >>> i)   'apt-get install r-base' will get you r-base-core and all the
    >>> recommended packages --- use this if you want to _run_ R
    >>> 
    >>> ii)  'apt-get install r-base-dev' will get all the common header files,
    >>> as well as r-base-core use this if you _also want to build /
    >>> install R packages_ incl from CRAN
    >>> 
    >>> iii) 'apt-get build-dep r-base' will get you _build dependencies_ for
    >>> R and is probably what Martin wanted here.
    >>> 
    >>>> Last time I did get 'r-base-dev' on a "virgin" ubuntu system,
    >>>> I vaguely remember that it did not contain *really* all the
    >>>> tools I'd wanted, but almost all.
    >>> 
    >>> Bug reports are always welcome and a more constructive form of moving
    >>> things forward than an off-hand comment here :-) Note that I tend not
    >>> to get the ones filed against Ubuntu so file against Debian please.
    >>> 
    >>>> e.g., you may also want the two packages
    >>>> 
    >>>> tcl8.4-dev
    >>>> tk8.4-dev
    >>> 
    >>> Just curious: what did you need them for ? In case you wanted to build
    >>> R, see iii) above as a possibly more focussed way to get there.
    >>> 
    >>> Dirk
    >>> 
    >> 
    >> _______________________________________________
    >> R-SIG-Debian mailing list
    >> R-SIG-Debian at r-project.org
    >> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
    >>
#
On Fri, May 30, 2008 at 09:18:34AM +0200, Martin Maechler wrote:
No that looks like a bug, err, mis-feature.  Possibly just in Ubuntu.

And it is possibly due to the fact that Ubuntu has atlas-* packages
whereas Debian now has libatlas*. Not sure.

Dirk