Problem loading R library

Issue #228 resolved
thwiouz created an issue


I tried to load the "PerformanceAnalytics" library through rpy2 whith the following:

import rpy2.robjects as robjects


but got the following error message:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  impossible de charger l'objet partagé '/usr/local/lib/R/site-library/PerformanceAnalytics/libs/':
  /usr/local/lib/R/site-library/PerformanceAnalytics/libs/ undefined symbol: dgemm_

It seems to be a function defined in the lapack / blas library which is installed. Nevertheless, the package loading in pure R works fine. Is it a problem of path or permissions? FYI, I'm under Ubuntu 14.04 with rpy2 2.4.4

Could you help? Thanks,

Comments (10)

  1. Laurent Gautier

    When installing rpy2, what does the console output says about the compiling environment (near the beginning of the output, there are few lines about include_dirs, library_dirs, etc...) ?

    Also, are you using a stock ubuntu blas library ? Are you using an intel compiler rather than gcc ?

  2. mike space

    sorry if my response is newbie like:

    I installed rpy2 with pip, on an amazon ubuntu build. Added libblas-dev, liblapack-dev.

    Console output on compiling envir: Compilation parameters for rpy2's C components: include_dirs = ['/usr/share/R/include'] library_dirs = ['/usr/lib/R/lib'] libraries = ['R'] extra_link_args = []

    Using x86_64-linux-gnu-gcc

  3. Laurent Gautier

    This is strange. rpy2 is generally working on ubuntu. Where did you obtain R from ? The official Ubuntu, a PPA, compiled it yourself ?

  4. Laurent Gautier
    • changed status to open

    I can reproduce it with that one R package (PerformanceAnalytics).

    For some reason the link to BLAS is not functioning when in rpy2. May be the issue is upstream, in the package PerformanceAnalytics. I am observing that the package authors have defined a file src/ (rev. 3485) with the comment Adding file to link against BLAS and LAPACK libraries. However this is for Windows only.

  5. Laurent Gautier

    Creating a file src/Makevars as copy of src/ in the source for that package is solving the issue, hinting further that the problem might be be more with R and PerformanceAnalytics.

    I am contacting the authors of the packages with a proposed fix, and I am closing this issue.

  6. Brian Peterson

    Makevars file added in PerformanceAnalytics v. 1.4.3558 on R-Forge, binaries should be available shortly, source available now. Thanks for the report - Brian

  7. Log in to comment