I am on Solaris 7, using R_1.7.1 developing packages for both Splus and R.
We have a working R-package for haplo.score and now converting to haplo.stats.
R CMD INSTALL -l /people/biostat3/sinnwell/Rdir/library haplo.stats_1.1.0.tar.gz
works like a charm-- as comparable to our working version of haplo.score.
But problems are when I'm loading the library within R.
Within my package I have three C files, one of which I believe is causing the
dynamic library error below.
> library(haplo.stats,
lib.loc="/people/biostat3/sinnwell/Rdir/library")
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"/people/biostat3/sinnwell/Rdir/library/haplo.stats/libs/haplo.stats.so":
ld.so.1: /opt/tools/R/current-version/lib/R/bin/R.bin: fatal: relocation
error: file
/people/biostat3/sinnwell/Rdir/library/haplo.stats/libs/haplo.stats.so: symbol
errmsg: referenced symbol not found
Error in library(haplo.stats, lib.loc =
"/people/biostat3/sinnwell/Rdir/library") :
.First.lib failed
When I remove this one C file from the package, though remaining R-functions
depend on it, the library loads beautifully. We've followed guidelines in
Venebles and Ripley's S Programming to handle Calloc, Free, and S_alloc in
all
three files. I think there is a possibility the problem is there.
I looked at R-help archive emails with similar error messages, and those looked
like fortran compiler version issues. Am I also dealing with a compiler issue?
FYI:
We have the whole haplo.stats package working in S.
Also, zzz.R for haplo.stats package:
.First.lib <- function(lib, pkg) {
library.dynam("haplo.stats", pkg, lib)
}
Thank you for your help,
Jason
-------------------------
Jason P. Sinnwell, M.S.
Mayo Clinic, Rochester
Health Sciences Research
Division of Biostatistics
507.284.3270