[R-SIG-Mac] Fwd: os x / g95 package namespace load problem
Simon Urbanek
simon.urbanek at r-project.org
Thu Jun 23 23:03:22 CEST 2005
Joel,
On Jun 23, 2005, at 3:39 PM, Joel Bremson wrote:
> I have a working package for linux, including fortran 95 code
> compiled with g95, that I need to port to OS X. The package works
> on Linux and seems to load on the Mac,but when I try to run a
> function that calls C or Fortran I'm told that the symbol is not
> loaded.
A high-level question first: what are you trying to do here? (I'm
assuming you're the author of the package - if not, send all this to
the author ;)). Using a fixed Makefile is a really bad idea, because
you lose all the flags that R configuration conveniently detected for
you, so that package is likely to run only on one specific system and
nowhere else. In most cases you don't need any Makefile at all,
because R supplies all that is needed. You can still specify any
additional flags or dependencies using Makevars. Finally, even if you
have a very complex setting, it's easier to use configure and
Makevars than building the entire Makefile (which involves using
autoconf anyway). Actually from the Makefile you provided it seems to
me that it's entirely superfluous, because you use no complex
settings at all.
> I was told to use the .dylib extension instead of .so
Who told you that? If you used the regular process for compiling
package code that R provides, you'd see that libraries in packages
still use .so, because they are loaded using dlopen so the name
doesn't have to conform to OS' conventions.
Please consult 'Writing R Extensions' ( http://cran.r-project.org/doc/
manuals/R-exts.html ) - it provides guidance and examples. Is also
says "Note that this mechanism [using Makevars] should be general
enough to eliminate the need for a package-specific Makefile. If such
a file is to be distributed, considerable care is needed to make it
general enough to work on all R platforms".
Cheers,
Simon
More information about the R-SIG-Mac
mailing list