[R-SIG-Mac] problem unloading dynamic library
Michael Lachmann
lachmann at eva.mpg.de
Fri Aug 6 02:45:18 CEST 2010
I see the same problem with 2.12.0 on OSX downloaded from here:
http://R.research.att.com/
The linux version doesn't seem to have this problem.
Michael
On 6 Aug 2010, at 12:49AM, Michael Lachmann wrote:
> Hi,
>
> The following was a topic on r-help, which I now realize fits better
> here.
>
> In my latest version of R (2.11.1) on OSX, loading a dynamic library
> twice, or unloading a loaded library causes R to get stuck.
>
> Thus, if testR.c is:
> ---
> #include <stdio.h>
> #include <math.h>
>
> #include <R.h>
> #include <Rinternals.h>
> #include <R_ext/Rdynload.h>
>
>
> void
> R_init_testR(DllInfo *info)
> {
> fprintf( stderr, "got to load\n") ;
> }
>
> void
> R_unload_testR(DllInfo *info)
> {
> fprintf( stderr, "got to unload\n") ;
> }
>
> void test() {
> }
> ----
> and I compile it with
> R CMD SHLIB testR.c
>
> and then inside R call:
> > dyn.load("testR.so")
> got to load
> > dyn.load("testR.so")
> got to unload
> [this never terminates]
>
> (The R_init_testR and R_unload_testR are not the culprit - I get the
> same problem without them)
> Same happens if I just load and unload the library.
>
> Thanks,
> Michael
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
More information about the R-SIG-Mac
mailing list