Dear S-listers,
I want to call some IMSL fortran functions in a c procedure, which in turn
will be called by a Splus function. However, Splus complains fatal
relocation error and unfound reference symbol. I am using Splus 5.1 for
unix and has set $(LINK_FNL) as local library flags.
I have searched the S-news archives and helps there are limited. Can
anybody help me on this?
Thanks a lot.
Xiaofei
Details from Splus make and error messages are as follows.
Information generated by Splus5 make
f77 -c random.f
cc -I${SHOME}/include -Xa -c -o ztest.o ztest.c
/afs/isis.unc.edu/pkg/splus-51/cmd/Splus5 LIBRARY S.so random.o ztest.o "-lM77
-lF77 -lsunmath_mt"
-R/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris
-L/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris -Bdynamic
-limsl -limslblas -ldl -lnsl -lsocket
-R/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris
-L/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris -Bdynamic
-limsl -xlic_lib=sunperf -ldl -lnsl -lsocket
-R/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris
-L/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris -Bdynamic
-limsl -limslblas -ldl -lnsl -lsocket
-R/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris
-L/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris -Bdynamic
-limsl -xlic_lib=sunperf -ldl -lnsl -lsocket
where random.f is a fortran interface calling IMSL function "dkapmr", for
example
and ztest.c called functions in random.f.
Error message I got from Splus when call c function "ztest" is
.C("ztest", as.double (xx$x[,1]), as.integer(xx$d[,1]),
as.double (xx$x[,1]+xx$x[,2]), as.integer(xx$d[,2]),
as.integer(xx$z),
as.double(testst), as.double(testvar), as.double(ntestst) )
ld.so.1: /afs/isis.unc.edu/pkg/splus-51/cmd/Sqpe: fatal:
relocation error: file
/afs/isis/pkg/vni-30/.install/sun4x_58/CTT3.0/lib/lib.solaris/libimsl.so:
symbol __f_index: referenced symbol not found Killed
|