[S] loading C code function on Irix 6.5 UNIX system (2nd query)

Jae K. Lee (jaeklee@miner.nci.nih.gov)
Mon, 2 Nov 1998 17:46:17 -0500


Hi,

Thanks much for the responses to my first query.
Again, this problem is specifically for SGI IRIX 6.5 UNIX system.

(To mathsoft engineers: Have you configured out this problem for
the new operating system Irix 6.5 of SGI?)

My original question was:

>
> I'm working on S-PLUS 3.4 under SGI IRIX 6.5.
> I want to load a C coded function, but dyn.load and dyn.load2
> are not available in this platform.

The responses were, in large, two approaches:

A. for static loading, compile my code with careful flags as
error messages suggest

B. for dynamic loading, use "dyn.load.shared" function

I haven't been successful in both ways.
For A, I have experimented several options in S_makefile
under $SHOME/newfun/lib, but they didn't work well.

For B, I have compiled my C-code with:

discover 56% Splus SHLIB -o test.so test.c

targets= -f /opt/SHOME/newfun/lib/S_soMakefile test.so
make -f /opt/SHOME/newfun/lib/S_makefile -f
/opt/SHOME/newfun/lib/S_soMakefile test.so "SHLIB=test.so" "OBJS= test.o"
cc -c -I${SHOME-`Splus SHOME`}/include -cckr -O1 test.c
ld -o test.so -shared test.o

So, I have "test.so" shared library object at the current directory

2. On S-PLUS command line at the current directory, I tried to load it in:

SPLUS> dyn.load.shared("./test.so")

Error in .C("S_QPE_shobjlist_load",: Can't load (dlopen) library ./test.so:
260720:/opt/SHOME/cmd/Sqpe: rld: Fatal Error: Cannot Successfully map
soname './test.so' under any of the filenames ./test.so
Dumped
Error was while calling subroutine "S_QPE_shobjlist_load"

Even I tried the absolute path way like
dyn.load.shared("/usr/people/u5/jaeklee/Sdevel/test/test.so"),
but "test.so" object was not still found yet.
Hope you can easily point me out what I did wrong.
If anyone has been successful for this kind of trial under the Irix 6.5
system, would you provide me a simple example of your commands (for compiling
C-codes and loading it into S-PLUS 3.4)?

regards,

Jae K. Lee

-- 
--------------------------------------------------------------------------
Jae K. Lee, Ph.D.                         Tel:  (301) 496-9572
National Cancer Institute                 Email: jaeklee@miner.nci.nih.gov
National Institutes of Health              
Bldg. 37 Room 5D-02
37 Convent Dr.
Bethesda, MD 20892-4255                   Fax:  (301) 402-0752
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news