[R-sig-Debian] Compiling R-2.11.0 with ATLAS-tuned BLAS and LAPACK

Dirk Eddelbuettel edd at debian.org
Thu Jun 3 20:06:41 CEST 2010


On 2 June 2010 at 15:44, Andrew Piskorski wrote:
| On Wed, Jun 02, 2010 at 07:11:09AM -0500, Dirk Eddelbuettel wrote:
| 
| > On 2 June 2010 at 02:08, Andrew Piskorski wrote:
| > | Dirk, that reminds me.  I DO build R myself from scratch, but it often
| > 
| > I'm curious -- Why?
| 
| Partly just historical practice; we started doing this on ancient
| non-Debian-based Linux boxes where there wasn't any other option.
| However, we also want to use the same exact version of R on different
| machines, we want to be able to upgrade to the bug-fix ("patched")

Yes, I'd like to (one day..) modify the r-base-core package so that we can
have r-release and r-patched (and/or r-devel) coexist. But don't hold your
breath...

| branch versions of R on our own schedule, and we like the capability
| to deploy our own modified R if necessary.
| 
| Also, and more concretely, some of our own in-house compiled code, due
| to its own dependencies on other libraries, insists on having R linked
| in particular ways.  One of our *.so shared libraries has always ran
| fine with R's default build process, but gdb would then gets terribly
| confused by the fact that our *.so is using some libraries which
| themselves may be internally multi-threaded.  gdb would completely
| break, saying only:
| 
|   [Thread debugging using libthread_db enabled] 
|   Error while reading shared library symbols: 
|   Cannot find new threads: generic error 
|   (gdb) 
| 
| That's why I build R with "LIBS=-lpthread", it fixes that gdb problem.

I got by just be adding -lpthread to build processes involving libR.so (via
embedding, say).  Telling R (which is famously single-threaded) to be
multithreaded strikes me as odd :)

| The "--enable-threads" didn't seem to actually have any effect, but I
| figured it might be safer to include it too.
| 
| > You could peek into my my obviously public configure call (by looking at
| > debian/rules), I use --with-blas and --with-lapack and you differ in at least
| 
| Actually I had, by building the *.deb package on my laptop, but I
| overlooked your use of --with-lapack, thanks!  (Also thanks for the
| debian/rules hint; I've never dug into the guts of Debian packages
| before.)

That debian/rules is particular long and cumbersome. Others are much easier,
my favourite is the two-liner for jags :)

But in general, if you have suggested modifications that would make the
Debian R package better, please do not hold back. We gladly borrow
improvements. 
 
-- 
  Regards, Dirk



More information about the R-SIG-Debian mailing list