[R-sig-Debian] How to change Rlapack by lapack (for rpy2 installation)?
Dirk Eddelbuettel
edd at debian.org
Sat Mar 21 16:41:33 CET 2009
On 21 March 2009 at 13:13, Matthieu Stigler wrote:
| Sorry, my e-mail went too early, give some more complements about the
| problem I had which may be similar to yours
|
| 2009/3/21, Matthieu Stigler <Matthieu.Stigler at gmail.com>:
| > I had I similar problem and could not really resolve it... I can give you
| > nevertheless some hints:
| >
| >
| > It looks like there is a bug, missing library, or change in the set-up of
| > libRlapack with Ubuntu 8.04,
| > see:
| > -http://sourceforge.net/mailarchive/forum.php?thread_name=de8c7cb40809160055mbc5af8fu55cfd1c19f915f08@mail.gmail.com&forum_name=rkward-users
|
| The solution I found was to
| cd /usr/lib/R/modules
| sudo ln -s ./lapack.so ./libRlapack.so
I do not recommend that approach.
As I just said in another reply, "it all works for me" without any effort
whatsoever. On Ubuntu, I simply point to Ubuntu repos and the Ubuntu CRAN
mirror. On Debian I use my packages.
$ dpkg -S /usr/lib/R/modules/lapack.so
r-base-core: /usr/lib/R/modules/lapack.so
$ ldd /usr/lib/R/modules/lapack.so
linux-vdso.so.1 => (0x00007fff01fff000)
libR.so => /usr/lib/R/lib/libR.so (0x00007fc3f987c000)
liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00007fc3f8dba000)
libblas.so.3gf => /usr/lib/libblas.so.3gf (0x00007fc3f8b2a000)
libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007fc3f884e000)
libm.so.6 => /lib/libm.so.6 (0x00007fc3f85c9000)
libc.so.6 => /lib/libc.so.6 (0x00007fc3f8256000)
libreadline.so.5 => /lib/libreadline.so.5 (0x00007fc3f8016000)
libpcre.so.3 => /lib/libpcre.so.3 (0x00007fc3f7ded000)
libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007fc3f7bdb000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fc3f79c3000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fc3f77bf000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc3f9fd7000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fc3f75a6000)
libncurses.so.5 => /lib/libncurses.so.5 (0x00007fc3f736b000)
$ dpkg -S /usr/lib/libblas.so.3gf
libblas3gf: /usr/lib/libblas.so.3gf
$
Dirk
| But this is pretty dirty... Dirk Eddelbuettel kindly directed me to:
|
| R actually tells you what to use, so this is easy to fix with a modicum of
| configure scripting knowledge:
|
| edd at ron:~$ R CMD config --help
| Usage: R CMD config [options] [VAR]
|
| Get the value of a basic R configure variable VAR which must be among
| those listed in the 'Variables' section below, or the header and
| library flags necessary for linking against R.
|
| Options:
| -h, --help print short help message and exit
| -v, --version print version info and exit
| --cppflags print pre-processor flags required to compile
| a program using R as a library
| --ldflags print linker flags needed for linking against
| the R library
|
| Variables:
| BLAS_LIBS flags needed for linking against external BLAS libraries
| CC C compiler command
| CFLAGS C compiler flags
| CPICFLAGS special flags for compiling C code to be turned into a
| shared library
| CPP C preprocessor
| CPPFLAGS C/C++ preprocessor flags, e.g. -I<dir> if you have
| headers in a nonstandard directory <dir>
| CXX C++ compiler command
| CXXCPP C++ preprocessor
| CXXFLAGS C++ compiler flags
| CXXPICFLAGS special flags for compiling C++ code to be turned into a
| shared library
| DYLIB_EXT file extension (including '.') for dynamic libraries
| DYLIB_LD command for linking dynamic libraries which contain
| object files from a C or Fortran compiler only
| DYLIB_LDFLAGS
| special flags used by DYLIB_LD
| F77 Fortran 77 compiler command
| FFLAGS Fortran 77 compiler flags
| FLIBS linker flags needed to link Fortran code
| FPICFLAGS special flags for compiling Fortran code to be turned
| into a shared library
| FC Fortran 9x compiler command
| FCFLAGS Fortran 9x compiler flags
| FCPICFLAGS special flags for compiling Fortran 9x code to be turned
| into a shared library
| JAR Java archive tool command
| JAVA Java interpreter command
| JAVAC Java compiler command
| JAVAH Java header and stub generator command
| JAVA_HOME path to the home of Java distribution
| JAVA_LIBS flags needed for linking against Java libraries
| JAVA_CPPFLAGS C preprocessor flags needed for compiling JNI programs
| LAPACK_LIBS flags needed for linking against external LAPACK libraries
| LIBnn location for libraries, e.g. 'lib' or 'lib64' on this platform
| LDFLAGS linker flags, e.g. -L<dir> if you have libraries in a
| nonstandard directory <dir>
| OBJC Objective C compiler command
| OBJCFLAGS Objective C compiler flags
| MAKE Make command
| SAFE_FFLAGS Safe (as conformant as possible) Fortran 77 compiler flags
| SHLIB_CFLAGS additional CFLAGS used when building shared objects
| SHLIB_CXXLD command for linking shared objects which contain
| object files from a C++ compiler
| SHLIB_CXXLDFLAGS
| special flags used by SHLIB_CXXLD
| SHLIB_EXT file extension (including '.') for shared objects
| SHLIB_FFLAGS additional FFLAGS used when building shared objects
| SHLIB_LD command for linking shared objects which contain
| object files from a C or Fortran compiler only
| SHLIB_LDFLAGS
| special flags used by SHLIB_LD
| SHLIB_FCLD, SHLIB_FCLDFLAGS
| ditto when using Fortran 9x
| TCLTK_CPPFLAGS
| flags needed for finding the tcl.h and tk.h headers
| TCLTK_LIBS flags needed for linking against the Tcl and Tk libraries
|
| Report bugs to <r-bugs at r-project.org>.
| edd at ron:~$ R CMD config --ldflags
| -L/usr/lib/R/lib -lR
| edd at ron:~$ R CMD config BLAS_LIBS
| -lblas
| edd at ron:~$ R CMD config LAPACK_LIBS
| -llapack
| edd at ron:~$
|
| Hope that helps
| > -the bug I commited:
| > https://bugs.launchpad.net/ubuntu/+source/rmatrix/+bug/299141
| > Agustin Lobo a crit :
| >>
| >> (I asked an earlier question on the rpy2 installation
| >> to the rpy2 list, the solution there was to
| >> edit the setup.py script, but this looks beyond what I can do unless
| >> someone tells me exactly what to modify).
| >>
| >> I have R 2.8.1 on 2 machines running ubuntu 8.04
| >> (packages R-base and R-base-dev, among others, installed using Synaptic)
| >> and while the installation
| >> of rpy2 went fine on machine1, failed on machine2 with:
| >>
| >> python setup.py install
| >> /usr/bin/ld: cannot find -lRlapack
| >> collect2: ld returned 1 exit status
| >> error: command 'gcc' failed with exit status 1
| >>
| >> I think that the reason is that while on machine1 I get:
| >> R CMD config LAPACK_LIBS
| >> -llapack
| >>
| >> on machine2 I get
| >> R CMD config LAPACK_LIBS
| >> -L/usr/lib/R/lib -lRlapack
| >>
| >> Could someone tell me (or point me to a relevant link) what should I do in
| >> order to reconfigure R on machine2
| >> so that it has the same liblapack settings than machine1 ?
| >> (I really don't remember having done anything different on
| >> machine2 for installing R, but probably I did)
| >>
| >> Thanks
| >>
| >> Agus
| >>
| >>
| >>
| >> ________________________________
| >> _______________________________________________
| >> R-SIG-Debian mailing list
| >> R-SIG-Debian at r-project.org
| >> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
| >>
| >
| >
| >
|
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
--
Three out of two people have difficulties with fractions.
More information about the R-SIG-Debian
mailing list