[Rcpp-devel] RcppArmadillo inv() depends on Lapack, zgetri_ not available on CRAN / R-forge?

Dirk Eddelbuettel edd at debian.org
Sat Jun 4 02:04:21 CEST 2011


Baptiste,

On 4 June 2011 at 11:45, baptiste auguie wrote:
| Dear list,
| 
| My package cda, which I was hoping to release on CRAN, fails to
| compile on R-forge with error,
| 
| ** testing if installed package can be loaded
| Error in dyn.load(file, DLLpath = DLLpath, ...) :
|   unable to load shared object '/tmp/RtmpbztUMm/Rinst1829c04c/cda/libs/cda.so':
|   /tmp/RtmpbztUMm/Rinst1829c04c/cda/libs/cda.so: undefined symbol: zgetri_
| 
| It builds fine on my local machines (Mac OS 10.5, 10.6).
| 
| >From an older discussion on this list <
| http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/msg00678.html>
| the issue seems to be that Armadillo's inv() relies on a function that
| is not provided by R, only by LAPACK. I have just replaced inv() by
| pinv() and solve() in my code; merely to see what happens, but chances
| are they also require a full LAPACK. 

Sometime relatively early in the RcppArmadillo development process, Doug
convinced Romain and myself to go for a pure template solution with Armadillo
as all / most things found during the configure (or in this case, cmake)
stage can be assumed 'found' given that we have around us by design.  So no
testing, no local library and full reliance and what R gives us.

That was a brilliant idea, and has freed us from having to rely on building
and shipping a library, having to tell users how to set PKG_LIBS etc pp and I
firmly believe that this helped tremendously in getting RcppArmadillo more
widely used. So I would not want to revert this.

In any event, it seems that you need more LAPACK than R has for you.  That is
likely to be a dicey situation as you per se do not know whether R was built
and linked with its own (subset) copy of LAPACK, or whether it uses system
LAPACK libraries (as e.g. the Debian / Ubuntu systems do).  So you may be in
a spot bother and I not sure what I can recommend --- other than trying your
luck at some short configure snippets that will run at package build time to
determine whether the system you want to build cda on it 'rich' enough to
support it.  I can help you off list with some configure snippets as some of
my packages have configure code; adding a test for zgetri should be feasible.

| Does anybody have any experience
| dealing with such issues w.r.t releasing a package on R-forge / CRAN?
| Is there any chance they would consider installing LAPACK on those
| servers, or is there no point in asking such things?

I don't think it is a matter of fixing the R-Forge server. I think it is a
matter of making your package installable on the largest number of user
systems.  Also try win-builder.r-project.org to see how it fares on that
platform.

Dirk

-- 
Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com


More information about the Rcpp-devel mailing list