[R] Package specific dependencies...
Neil Shephard
nshephard at gmail.com
Thu Nov 22 16:58:16 CET 2007
Hi,
I noticed recently when installing the GDD package for R under
GNU/Linux that it required the gd library (http://libgd.org/) for
generating graphics.
The resolution of this was to simply install the library on my system,
and then GDD successfully installed without any complaints.
However, the variant of GNU/Linux that I use is Gentoo, so I filed a
bug requesting that a USE flag be set for the R ebuild so that users
could automatically pull in the library when installing R simply by
setting a flag for the package (Gentoo's package management system
Portage allows specific packages to have USE flags for setting a packages
./configure flags and pulling in package dependencies and so forth,
this isn't particularly relevant to the question, but more info can be
found at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3).
A recent revision of the ebuild for R removed this flag as there was
no direct requirement of the gd library by R.
Anyway, after a few short discussions with one of the Gentoo
maintainers for R I was asked various questions about how this should
be dealt with, and being unable to answer everything I am asking the
wider R community for assistance and advice. The main aim is to
improve the way in which Gentoo handles the various packages that are
available for R, and improve on the way in which dependencies such as
the above are handle when compiling R.
Q.1 How many packages on CRAN have package specific dependencies?
Only using a subset of the R packages I'm only aware of the GDD
dependency on libgd. Are there others out there?
Q.2. Is R capable of tracking dependencies of packages on CRAN?
To my knowledge it isn't, as (to the best of memory, it was about six
months ago now) I simply received a non-zero exit when trying to
install GDD when I didn't have libgd installed. R had no way of
saying "Hang on this package needs this library, lets install it" and
I wouldn't expect R to as it would make it particularly problematic if
a user has installed locally or doesn't have the correct permissions etc. But
would it be appropriate for R to have a configure option to check for
a dependency required by various packages? I do realise that this is
putting the cart before the horse. Perhaps 'stricter' management of
package inclusion would help so that all dependencies of a submitted
package are passed onto R developers and appropriate configure flags
can be added (although again this still leaves the horse behind the
cart).
Q.3. Does anyone have experience of dealing with this on other distributions?
How does Debian/Slackware/Fedora etc. deal with problems like this?
Particularly given that these are often pre-compiled (under Gentoo
everything is compiled from source), does this mean that package
maintainers of R for these various distros are aware of the
dependencies of all packages and include the relevant libraries when
compiling?
The Gentoo R maintainer is going to look at alternatives for managing
CRAN packages (one possible option is http://paludis.pioto.org/ which
has some CRAN support already).
Something similar has been done for Perl/CPAN (see
http://www.gentoo.org/proj/en/perl/g-cpan.xml) and this may be an
option for CRAN.
Any and all comments and thoughts are more than welcome.
Regards
Neil
--
"Don't remember what you can infer." - Harry Tennant
Email - nshephard at gmail.com / n.shephard at sheffield.ac.uk
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
--
"Don't remember what you can infer." - Harry Tennant
Email - nshephard at gmail.com / n.shephard at sheffield.ac.uk
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
More information about the R-help
mailing list