Skip to content

problems building and installing some packages in 'unstable'

7 messages · Dirk Eddelbuettel, Douglas Bates, Sébastien Bihorel +1 more

#
Hi,

I'm keeping a Debian unstable system, and recently found 2 problems:

1) building a package (R CMD build diveMove, available from CRAN)
depending on KernSmooth fails with:

---<---------------cut here---------------start-------------->---
Loading required package: KernSmooth
Error in dyn.load(file, ...) : 
  unable to load shared library '/usr/lib/R/library/KernSmooth/libs/KernSmooth.so':
  libRblas.so: cannot open shared object file: No such file or directory
---<---------------cut here---------------end---------------->---

Needless to say, the package built fine until about 2 weeks ago and no
changes to the source have been made.

2) Installing a package (install.packages("tripEstimation")) requiring
mgcv fails with a similar message:

---<---------------cut here---------------start-------------->---
Loading required package: mgcv
Error in dyn.load(file, ...) : 
  unable to load shared library '/usr/lib/R/library/mgcv/libs/mgcv.so':
  libRblas.so: cannot open shared object file: No such file or directory
---<---------------cut here---------------end---------------->---

Interestingly, the shared libraries (KernSmooth.so and mgcv.so) do exist
at the specified path.  However, libRblas.so is nowhere to be found.

I've exchanged a few emails with Dirk Eddelbuettel, confirming that the
missing libRblas.so is expected in AMD64.

Are others following 'unstable' in AMD64 having the same problem?


Cheers,
#
On 27 January 2008 at 09:46, Sebastian P. Luque wrote:
| Hi,
| 
| I'm keeping a Debian unstable system, and recently found 2 problems:
| 
| 1) building a package (R CMD build diveMove, available from CRAN)
| depending on KernSmooth fails with:
| 
| ---<---------------cut here---------------start-------------->---
| Loading required package: KernSmooth
| Error in dyn.load(file, ...) : 
|   unable to load shared library '/usr/lib/R/library/KernSmooth/libs/KernSmooth.so':
|   libRblas.so: cannot open shared object file: No such file or directory
| ---<---------------cut here---------------end---------------->---
| 
| Needless to say, the package built fine until about 2 weeks ago and no
| changes to the source have been made.
| 
| 2) Installing a package (install.packages("tripEstimation")) requiring
| mgcv fails with a similar message:
| 
| ---<---------------cut here---------------start-------------->---
| Loading required package: mgcv
| Error in dyn.load(file, ...) : 
|   unable to load shared library '/usr/lib/R/library/mgcv/libs/mgcv.so':
|   libRblas.so: cannot open shared object file: No such file or directory
| ---<---------------cut here---------------end---------------->---
| 
| Interestingly, the shared libraries (KernSmooth.so and mgcv.so) do exist
| at the specified path.  However, libRblas.so is nowhere to be found.
| 
| I've exchanged a few emails with Dirk Eddelbuettel, confirming that the
| missing libRblas.so is expected in AMD64.
| 
| Are others following 'unstable' in AMD64 having the same problem?

For what it's worth, and given the brandnew sources on CRAN, I just updated
the Debian packages 
	r-cran-vr		## VR
	r-cran-kernsmooth	## KernSmooth
	r-cran-sandwich		## sandwich
	r-cran-rodbc		## RODBC
in the 'pbuilder' chroot environment (ie a pristine Debian unstable setting
with no manual configuration whatsoever).  No issues.

So I have no idea where the desire to link with libRblas.so comes from, which
I why I suggested to Seb to ask here. If anybody, in particular amd64 users
of Debian unstable, has a clue, please share it with us.

Thanks, Dirk
#
Hi again,

I should add that installation of the Debian packages r-cran-kernsmooth
and r-cran-mgcv proceeded without any problems.  It's just building and
installing packages requiring those (and possibly others) that are
giving the error.


Cheers,
#
Check if the file $R_HOME/lib/libRblas.so exists. If so, use

ldd $R_HOME/lib/libRblas.so

to see what further shared objects it needs.

Then check

ldd $R_HOME/library/KernSmooth/libs/KernSmooth.so

It probably has a reference to libRblas.so that is unresolved when you
check outside of R.  Part of the R startup adds $R_HOME/lib to the
LD_LIBRARY_PATH (see the shell script $R_HOME/etc/ldpaths or
$R_HOME/etc${ARCH}/ldpaths)
On Jan 27, 2008 10:21 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
#
On Sun, 27 Jan 2008 11:44:47 -0600,
"Douglas Bates" <bates at stat.wisc.edu> wrote:

            
libRblas.so doesn't exist at all in my system, and cross-checking with
Dirk, that seems to be ok in AMD64:

http://buildd.debian.org/fetch.cgi?&pkg=r-base&ver=2.6.1-2&arch=amd64&stamp=1200915120&file=log
Yes, that's definitely a problem:

,-----[ ldd /usr/lib/R/library/KernSmooth/libs/KernSmooth.so ]
| 	linux-vdso.so.1 =>  (0x00007fff461fd000)
| 	libRblas.so => not found
| 	libgfortran.so.2 => /usr/lib/libgfortran.so.2 (0x00002b4e64b01000)
| 	libm.so.6 => /lib/libm.so.6 (0x00002b4e64dbd000)
| 	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002b4e6503e000)
| 	libR.so => /usr/lib/R/lib/libR.so (0x00002b4e65255000)
| 	libc.so.6 => /lib/libc.so.6 (0x00002b4e6575c000)
| 	libblas.so.3gf => /usr/lib/libblas.so.3gf (0x00002b4e65aba000)
| 	libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00002b4e65d49000)
| 	libreadline.so.5 => /lib/libreadline.so.5 (0x00002b4e6601a000)
| 	libpcre.so.3 => /usr/lib/libpcre.so.3 (0x00002b4e66259000)
| 	libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00002b4e6647f000)
| 	libz.so.1 => /usr/lib/libz.so.1 (0x00002b4e66690000)
| 	libdl.so.2 => /lib/libdl.so.2 (0x00002b4e668a7000)
| 	/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
| 	libncurses.so.5 => /lib/libncurses.so.5 (0x00002b4e66aab000)
`-----
Checking on that:

,-----[ ldpaths ]
| : ${JAVA_HOME=}
| : ${R_JAVA_LD_LIBRARY_PATH=}
| : ${R_LD_LIBRARY_PATH=${R_HOME}/lib:/usr/lib/gcc/x86_64-linux-gnu/4.3}
| if test -n "${R_JAVA_LD_LIBRARY_PATH}"; then
|   R_LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${R_JAVA_LD_LIBRARY_PATH}"
| fi
| if test -z "${LD_LIBRARY_PATH}"; then
|   LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}"
| else
|   LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
| fi
| export LD_LIBRARY_PATH
`-----

Dirk just hinted to me that my installing mingw32 may have ruined my
building environment variables and other evils.  Can you guys suggest
what to check for?  Thanks for the input!
#
Hi Sebastian,

I just upgraded KernSmooth and mgcv from CRAN on an amd64 machine, and
then installed diveMove and tripEstimation without problems.
Unfortunately I did not try to just upgrade diveMove and tripEstimation
first.

Is it possible that after the rebuild of the KernSmooth and mgcv, the
installation of packages that depend on them is OK?  

In R 2.6.1-1, there was a libRblas.so on amd64, but it went away with R
2.6.1-2. So if an installation of KernSmooth linked to it, it's no
wonder it's not working properly.

Best regards,

Johannes Ranke


* Sebastian P. Luque <spluque at gmail.com> [080127 18:40]:

  
    
#
On Sun, 27 Jan 2008 21:14:12 +0100,
Johannes Ranke <jranke at uni-bremen.de> wrote:
[...]
That is spot on!  Locally installing KernSmooth and mgcv from CRAN, and
building them under my current 2.6.1-2 R, allowed installation/build of
the 2 packages to proceeded smoothly.  In fact, the only two references
to libRblas.so given by ldd /usr/lib/R/library/*/libs/*.so were from
KernSmooth and mgcv (and of all packages, diveMove and tripEstimation
need them!).

Thanks everyone for the input, I'm back in business now.