On Mon, 6 Jul 2009, chris wrote:
my last 2 patches didn't include new files, so I've added the
debugger
patch again. The debugger should now be able to skip loops and mle
constructs.
Thanks. Right now I'm still digesting the Rlib material, but I'll
get to the debugger as soon as I can.
Thanks for integrating the libr patches. Is it possible to use
the "normal" R headers and use libr with dlopen?
Not sure, I'll have to experiment, but my thought is that -- in a
Windows build for example -- we can:
* Make sure the appropriate R headers are available at build time.
* Write wrapper code to obtain pointers to the actual R functions
at runtime via dlopen.
* At runtime, check the registry and work out where R.dll might
be, and try opening it.
The attached libr patch fixes a bug in my code, that should make
current cvs usable again.
Ah, good. But note that
-static int Rinit;
+static int Rinit=0;
is not needed: static variables are automatically initialized to
zero (or NULL for pointers).
If anyone wants to experiment with Christoph's Rlib functionality,
you need to
* Ensure that the shared library, libR.so, is enabled in your R
installation and can be found by the dynamic linker. And also
that the pkg-config file libR.pc is accessible to pkg-config (use
PKG_CONFIG_PATH if needed). Re-run gretl's configure script.
* Ensure that R_HOME is set to the parent directory in the R tree
that contains etc/Renviron.
For example, on my system R lives in /opt/R, so I do:
waverley:~$ locate libR.pc
/opt/R/lib/pkgconfig/libR.pc
waverley:~$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/R/lib/pkgconfig
waverley:~$ locate Renviron
/opt/R/lib/R/etc/Renviron
waverley:~$ export R_HOME=/opt/R/lib/R
waverley:~$ grep lib/R /etc/ld.so.conf
/opt/R/lib/R/lib
Allin.