Skip to content

pow__ii

2 messages · Brian Ripley, Paul Gilbert

#
<R-devel@stat.math.ethz.ch>
Wait a minute. With SC4.2 installed on Solaris, __pow_ii is in
/opt/SUNWspro/lib/libF77.so.3, and if you followed the instructions
installing the compilers /opt/SUNWspro/lib/ will be in the library
search path, ahead of the system libraries.  And as R does call libF77,
__pow_ii is in a library it has already dlopen-ed, so it should always
be accessible.  Try ldd R.binary:

        libSM.so.6 =>    /usr/openwin/lib/libSM.so.6
        libICE.so.6 =>   /usr/openwin/lib/libICE.so.6
        libX11.so.4 =>   /usr/openwin/lib/libX11.so.4
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libz.so =>       /usr/local/lib/libz.so
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libm.so.1 =>     /opt/SUNWspro/lib/libm.so.1
        libF77.so.3 =>   /opt/SUNWspro/lib/libF77.so.3
        libsunmath.so.1 =>       /opt/SUNWspro/lib/libsunmath.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libXext.so.0 =>  /usr/openwin/lib/libXext.so.0
        libmp.so.2 =>    /usr/lib/libmp.so.2

(Solaris 2.6 aka SunOS 5.6).

I have just rebuilt R using the SC4.2 compilers and sent Bodo Ahrens
lots of detailed check information.  It works for me on several different
Solaris/compiler combinations.
Not on my system: you need n1**n2.
libraries
with
Current Solaris versions of S-PLUS even check up LD_LIBRARY_PATH for you.
I have not seen problems with this since about 1995, and have just checked
this out:

toucan% cat test.f
      subroutine mypow(n1, n2, n3)
      n2 = n1**n3
      end
toucan% Splus COMPILE test.f
toucan% nm -g test.o
[Index]   Value      Size    Type  Bind  Other Shndx   Name

[8]     |         0|       0|NOTY |GLOB |0    |UNDEF  |__pow_ii
[7]     |         0|      28|FUNC |GLOB |0    |2      |mypow_

and this dyn.loads into S-PLUS 3.4 without error.

toucan% R SHLIB test.f
ld -G -o test.so test.o -L/usr/local/lib -lblas 

[It also works on a machine without libblas installed.]
toucan% nm -g test.so

test.so:

[Index]   Value      Size    Type  Bind  Other Shndx   Name

[21]    |     66252|       0|OBJT |GLOB |0    |6      |_DYNAMIC
[23]    |         0|       0|OBJT |GLOB |0    |ABS    |_PROCEDURE_LINKAGE_TABLE_
[20]    |         0|       0|NOTY |GLOB |0    |UNDEF  |__pow_ii
[22]    |     66332|       0|OBJT |GLOB |0    |7      |_edata
[18]    |     66332|       0|OBJT |GLOB |0    |8      |_end
[24]    |       716|       0|OBJT |GLOB |0    |5      |_etext
[19]    |       688|      28|FUNC |GLOB |0    |5      |mypow_
[[1]]
[1] 4

[[2]]
[1] 64

[[3]]
[1] 3

I suspect Paul like me remembers when this was a problem on SunOS4 with static
libraries, but I don't think it is a problem for S-PLUS.

Brian
#
...
Well I do remember having these problems with dynamic libraries too, but 1995
would correspond to about the vintage of things which gave me so much trouble.
The S-Plus version would have been 3.3 and things may well have improved. I
haven't kept track of it much since I made the change to the fortran code, as it
has never again given me any trouble. I also have not been using SunPro.

Paul

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._