[R] Compiling R, cannot open vars.mk

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 20 16:27:44 CET 2004


On Tue, 20 Jan 2004, Arne Gjuvsland wrote:

> Using GNU make solved the first problem, but now I got into trouble
> with a shared library lapack.so. I found a thread in the mailing list 
> concerning this problem where it was suggested that I try dyn.load from R
> or the ldd on lapack.so I did that. The results are pasted under.

The advice I know of was

R CMD lapack.so

as the R wrapper sets the library paths.  Here is what I get on Linux

gannet% Rdev CMD ldd lapack.so
        libRlapack.so => /users/ripley/R/R-devel/bin/libRlapack.so (0x4000c000)
        libg2c.so.0 => /usr/local/lib/libg2c.so.0 (0x402af000)
        libm.so.6 => /lib/libm.so.6 (0x402dd000)
        libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x402ff000)
        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x40307000)
        libdl.so.2 => /lib/libdl.so.2 (0x40333000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40336000)
        libc.so.6 => /lib/libc.so.6 (0x40376000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

libRlapack should either contain the BLAS or link to somewhere that does 
(which might be the R executable).  It is possible that Tru64 is unable to 
do the latter -- has anyone else built on Tru64 since 1.7.0?

One possible line is to build a BLAS library yourself and specify it at 
configure time: then libRlapack.so would not need to link against symbols 
in the executable.



> 
> Arne
> 
>  >./configure CC=cc CXX=cxx F77=f77 MAKE=gmake 
> SHLIB_CXXLDFLAGS=-L/lib/cmplrs/cxx --prefix=/home/gjuvslan/R-1.8.1 --with-x
>  >gmake
> 
> Using gmake check I get the following problem:
>  >gmake check
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 329640:/home/gjuvslan/R-1.8.1/bin/R.bin: /sbin/loader: Fatal Error: call to 
> unresolved symbol from /home/gjuvslan/R-1.8.1/modules/lapack.so 
> (pc=0x3ffbfde341c)
> gmake[3]: *** [reg-tests-1.Rout] Error 1
> gmake[2]: *** [test-Reg] Error 2
> gmake[1]: *** [test-all-basics] Error 1
> gmake: *** [check] Error 2
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 
>  > dyn.load("modules/lapack.so")
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>          unable to load shared library 
> "/home/gjuvslan/R-1.8.1/bin/modules/lapack.so":
>    dlopen: Can't open needed library: 
> /home/gjuvslan/R-1.8.1/bin/modules/lapack.so
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 
>  >ldd -r lapack.so: (./modules/)
> --------------------------------------------------------------------------------------------------------------------------------------------------
> 345322:lapack.so: ldd: Fatal Error: Cannot generate dynamic dependencies 
> for library libRlapack.so
> --------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 
>  >ldd -r libRlapack.so (./bin og  ./src/modules/lapack)
> --------------------------------------------------------------------------------------------------------------------------------------------------
> ldd -r libRlapack.so
> Unresolved symbol in libRlapack.so: dsymv_
> Unresolved symbol in libRlapack.so: dgemm_
> Unresolved symbol in libRlapack.so: dtpsv_
> Unresolved symbol in libRlapack.so: drot_
> Unresolved symbol in libRlapack.so: xerbla_
> Unresolved symbol in libRlapack.so: dtrmv_
> Unresolved symbol in libRlapack.so: dspr2_
> Unresolved symbol in libRlapack.so: dtbsv_
> Unresolved symbol in libRlapack.so: daxpy_
> Unresolved symbol in libRlapack.so: zgemm_
> Unresolved symbol in libRlapack.so: dsyr2_
> Unresolved symbol in libRlapack.so: dsyr2k_
> Unresolved symbol in libRlapack.so: dnrm2_
> Unresolved symbol in libRlapack.so: dsymm_
> Unresolved symbol in libRlapack.so: ddot_
> Unresolved symbol in libRlapack.so: dtrsm_
> Unresolved symbol in libRlapack.so: dtbmv_
> Unresolved symbol in libRlapack.so: dasum_
> Unresolved symbol in libRlapack.so: dcopy_
> Unresolved symbol in libRlapack.so: dgemv_
> Unresolved symbol in libRlapack.so: dger_
> Unresolved symbol in libRlapack.so: dswap_
> Unresolved symbol in libRlapack.so: dscal_
> Unresolved symbol in libRlapack.so: idamax_
> Unresolved symbol in libRlapack.so: dsbmv_
> Unresolved symbol in libRlapack.so: dsyr_
> Unresolved symbol in libRlapack.so: dsyrk_
> Unresolved symbol in libRlapack.so: dspmv_
> Unresolved symbol in libRlapack.so: dspr_
> Unresolved symbol in libRlapack.so: dtrmm_
> Unresolved symbol in libRlapack.so: dtpmv_
> Unresolved symbol in libRlapack.so: dgbmv_
> Unresolved symbol in libRlapack.so: dtrsv_
> Unresolved symbol in libc.so: __ldr_data
> Unresolved symbol in libc.so: __Argc
> Unresolved symbol in libc.so: __Argv
> 
>          Main  =>   libRlapack.so
>          libUfor.so  =>   /usr/shlib/libUfor.so
>          libfor.so  =>   /usr/shlib/libfor.so
>          libFutil.so  =>   /usr/shlib/libFutil.so
>          libm.so  =>   /usr/shlib/libm.so
>          libots.so  =>   /usr/shlib/libots.so
>          libm_c32.so  =>   /usr/shlib/libm_c32.so
>          libexc.so  =>   /usr/shlib/libexc.so
>          libc.so  =>   /usr/shlib/libc.so
> ------------------------------------------------------------------------------------------------------------
> 
> 
> At 16:24 19.01.2004, Prof Brian Ripley wrote:
> >On Mon, 19 Jan 2004, Arne Gjuvsland wrote:
> >
> > >
> > > Hi!
> > >
> > > I am trying to compile R-1.8.1 on an alphaserver running Tru64 Unix.
> > > I use the compilers cc,cxx and f77. After the compilation
> > > I try: make check
> > > and get the following message:
> > >
> > > Make: Cannot open /share/make/vars.mk.  Stop.
> >
> >Some context would have been very helpful.
> >
> > > Does anyone have any suggestions on why?
> >
> >Do you have R_HOME set (to an empty string)?
> >
> >Is this GNU make, and if not can you try GNU make?
> >
> >Otherwise, more information please, including if this is GNU make
> >(probably not) and what directory make is working in (or at least the
> >preceding 10 lines of output).
> >
> >--
> >Brian D. Ripley,                  ripley at stats.ox.ac.uk
> >Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> >University of Oxford,             Tel:  +44 1865 272861 (self)
> >1 South Parks Road,                     +44 1865 272866 (PA)
> >Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list