From ripley@stats.ox.ac.uk  Wed Nov 18 18:56:19 1998
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Wed, 18 Nov 1998 18:56:19 +0000 (GMT)
Subject: [jar@oriole.er.usgs.gov: Re: [R] loading fortran with Redhat 5.1]
In-Reply-To: <199811181828.TAA26120@sophie.ethz.ch>
Message-ID: <Pine.GSO.3.96.981118184902.6457E-100000@localhost>

On Wed, 18 Nov 1998, Martin Maechler wrote:

> I can not answer this (message only to me).
> Certainly, some of you do..

Fluke, I think.  If he had used

g77 -c -fpic varna.f

then I believe varna.o would be a valid shared library on Solaris.  It is
likely that varna.f is simple enough not to need any relocation when
compiled. This certainly works for a single subprogram in the file, but is
definitely not recommended.

It is hard to tell if dlopen actually works, as it is used with the
`lazy' flag in R. One day one tests something never tried before and
it fails....  (Like the first time I actually hit some error-recording
code.)

Brian

>   From: "J. Andy Royle" <jar@oriole.er.usgs.gov>
>   To: Martin Maechler <maechler@stat.math.ethz.ch>
>   Subject: Re: [R] loading fortran with Redhat 5.1
>   In-Reply-To: <199811181812.TAA26068@sophie.ethz.ch>
> 
>   Hi Martin,
> 
>   The reason I was confused by this is because I used dyn.load
>   on varna.o from a Sun Ultra 10 (again compiled by g77 -c varna.f...
>   not gcc as I stated before....a typo).  Observe to following
>   from my Ultra 10:
> 
> 
>   /space/jar/ked-> g77 -c varna.f
>   /space/jar/ked-> R
> 
>   R : Copyright 1998, The R Development Core Team
>   Version 0.62.4  (October 24, 1998)
>   ..
>   ..
>   other startup info deleted
>   ..
>   ..
>   [Previously saved workspace restored]
> 
>   > dyn.load("varna.o")
>   >
> 
>   Thus, I figured I could do that in Linux.  Can you comment?
> 
> 
>   On Wed, 18 Nov 1998, Martin Maechler wrote:
> 
>   > >>>>> "J" == J Andy Royle <jar@oriole.er.usgs.gov> writes:
>   > 
>   >     J> Hello Martin, Thanks for your help.  This worked fine.. I didn't
>   >     J> know about the demo.  I seem to recall that I was doing it the Splus
>   >     J> way when I ran R on my Ultra 10.  Is this a new way of loading
>   >     J> fortran code into R?
>   > 
>   > No!
>   > The "R SHLIB" abbreviation is somewhat new,  but you always had to 
>   > 	dyn.load(...shared.library...)
>   > 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[jar@oriole.er.usgs.gov: Re: [R] loading fortran with Redhat 5.1]
Prof Brian D Ripley