From ripley at stats.ox.ac.uk  Mon Aug 23 13:33:56 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon Aug 23 13:34:08 2004
Subject: [Rd] Re: [R] Installing R on DEC Alpha - problems with dynamic
	loading
In-Reply-To: <BAF5C0B1B1FE5A41B28C71CC977422E904964776@ukapphresmsx01.ukapd.astrazeneca.net>
Message-ID: <Pine.LNX.4.44.0408231216540.15116-100000@gannet.stats>

The line in the script as distributed is

   unloadNamespace("splines")

That is not the same thing at all.  Please confirm that you actually have
a problem with that form.  (Your examples should not work, and do not work
for me.)  If you do, it is likely that your system's dlclose is
non-standard/broken.  However, unloadNamespace is not normally used so it
may be that this does not impact your users.

Please read the posting guide: this is not an appropriate question for 
R-help so I have diverted it to R-devel.


On Mon, 23 Aug 2004, Firth, Mike A (ALDP) wrote:

> I have recently installed R on DEC Alpha OSF 5.1.
> 
> The first regression test (reg-test-1.R) failed with an unresolved symbol in
> lapack.so:
> 
> 2246839:/data/h1/bifdev/apps/wga/R-1.9.1/bin/R.bin: /sbin/loader: Fatal
> Error: call to unresolved symbol from
> /data/h1/bifdev/apps/wga/R-1.9.1/modules/lapack.so (pc=0x3ffbfe22b60)
> 
> Further investigation has revealed that there is NO problem with lapack.so.
> The problem seems to lie in the use of 'unloadNamespace' earlier in the
> script.
> 
> On our machine the following line:
> 
> 	unloadNamespace(splines)
> 
> seem to really confuse the dynamic linking/symbol resolution. I have a very
> small example to demonstrate:
> 
> 	data(iris)
> 	library(splines)
> 	unloadNamespace(splines)
> 	data(iris)
> 
> works fine, but:
> 
> 	library(splines)
> 	unloadNamespace(splines)
> 	data(iris)
> 
> falls over with:
> 
> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
>         unable to load shared library
> "/data/h1/bifdev/apps/wga/R-1.9.1/library/tools/libs/tools.so":
>   dlopen: /data/h1/bifdev/apps/wga/R-1.9.1/library/stats/libs/stats.so:
> symbol "bdrsplerr_" unresolved
> Execution halted
> 
> The unloadNamespace has effectively unloaded a symbol from a completely
> different shared object.
> 
> Can anybody shed any light on this problem?

-- 
Brian D. Ripley,                  ripley@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


[Rd] Re: [R] Installing R on DEC Alpha - problems with dynamic loading
Prof Brian Ripley