R-alpha: Problems with dyn.load

Jim Robison-Cox (jimrc@mathfs.math.montana.edu)
Thu, 30 Jan 1997 10:48:19 -0700 (MST)


Date: Thu, 30 Jan 1997 10:48:19 -0700 (MST)
From: Jim Robison-Cox <jimrc@mathfs.math.montana.edu>
To: R testers <r-testers@stat.math.ethz.ch>
Subject: R-alpha: Problems with dyn.load

Hello,

  I'm running R-0.15 on a sun under  SunOS 5.3.  I would like to run the 
GEE functions Thomas Lumley has adopted for R, but can't get dyn.load to 
work right. When I run gee() I get:

> summary(gee(gsind~x2+x3+x4,id=id,data=testgee))
[1] "Beginning Cgee S-function, @(#) geeformula.q 4.4 96/09/27"
[1] "running glm to get initial regression estimate"
[1]  0.8107414  2.2933133 -1.1806841  1.4415174
ld.so.1: /opt/local/R/bin/R.binary: fatal: relocation 
error: symbol not found: R_alloc: referenced in /opt/local/R/lib/gee.so

And R dies.

So I've tried an easier example, the dynload demo provided in the 
distribution.  I get to where I call the loaded file, and R dies again:

> x0 <- zero(cube1, c(0,5))
ld.so.1: /opt/local/R/bin/R.binary: fatal: relocation error: symbol not 
found: call_S: referenced in /opt/local/R/demos/dynload/zero.so

The called functions do exist in the R.binary:

> nm bin/R.binary |fgrep "call_S"
000284a8 T call_S
> nm bin/R.binary |fgrep "S_alloc"
0003060c T S_alloc

But, for some reason, it's not finding them.  

Does dynload work for other SUN users?  Here are the settings I have in 
config.status, if that helps.    

s%@CFLAGS@%-g -O%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%%g
s%@DEFS@%-DHAVE_CONFIG_H%g
s%@LDFLAGS@%%g
s%@LIBS@%-ldl -ltermcap -lm %g
s%@exec_prefix@%${prefix}%g
s%@prefix@%/usr/local%g
s%@program_transform_name@%s,x,x,%g
s%@bindir@%${exec_prefix}/bin%g
s%@sbindir@%${exec_prefix}/sbin%g
s%@libexecdir@%${exec_prefix}/libexec%g
s%@datadir@%${prefix}/share%g
s%@sysconfdir@%${prefix}/etc%g
s%@sharedstatedir@%${prefix}/com%g
s%@localstatedir@%${prefix}/var%g
s%@libdir@%${exec_prefix}/lib%g
s%@includedir@%${prefix}/include%g
s%@oldincludedir@%/usr/include%g
s%@infodir@%${prefix}/info%g
s%@mandir@%${prefix}/man%g
s%@CC@%gcc%g
s%@SET_MAKE@%%g
s%@YACC@%bison -y%g
s%@RANLIB@%ranlib%g
s%@AR@%ar%g
s%@FC@%%g
s%@R_PRINTCMD@%lpr%g
s%@R_PAPERSIZE@%a4%g
s%@CPP@%gcc -E%g
s%@X_CFLAGS@% -I/opt/X11R6.1/include%g
s%@X_PRE_LIBS@%%g
s%@X_LIBS@% -L/opt/X11R6.1/lib -R /opt/X11R6.1/lib -lX11%g
s%@X_EXTRA_LIBS@% -lnsl -lsocket%g
s%@APPL_DIR@%applc%g
s%@FFLAGS@%%g
s%@XMKMF@%xmkmf%g
s%@LDCMD@%gcc%g
s%@DLLFLAGS@%%g
s%@PICFLAGS@%-fpic%g
s%@LIBSRC@%src-c%g
s%@SHLIBLDFLAGS@%-G -z text%g
s%@BLAS@%blas.o%g
 
This version of R configured and compiled nicely, I haven't had any other 
problems. I am using gcc, not the SUN cc.


Jim Robison-Cox                 ____________            
Department of Math Sciences    |            |           phone: (406)994-5340
2-214 Wilson Hall               \   BZM, MT |           FAX:   (406)994-1789
Montana State University         |  *_______|
Bozeman, MT 59717                 \_|         e-mail: jimrc@math.montana.edu 


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-