Skip to content
Prev 870 / 12125 Next

[R-pkg-devel] scripting R through lldb

Hi Guillaume,

I have a script that does this (for OS X) here, taking advantage of
the new '--batch' argument to lldb:

    https://github.com/kevinushey/etc/blob/master/lang/r/mac/bin/r-lldb

Note that, on recent versions of OS X due to system integrity
protection, this may not work with the system lldb, as it appears
there are restrictions on how certain environment variables, e.g.
DYLD_FALLBACK_LIBRARY_PATH, can be set for system executables. (If you
are indeed on OS X, you can try building your own version of lldb --
see e.g. https://github.com/kevinushey/etc/blob/master/platform/mac/install-llvm.sh
for that)

In the end, you should be able to use this script as e.g.

    r-lldb -f test.R

and this will launch lldb, set R as the target process, with '-f
test.R' passed to the R executable.

Depending on your OS / configuration, you might need to tweak the
script, but it will hopefully either 'work out of the box' or at least
serve as a starting point for your version.

Best,
Kevin

On Wed, Jun 15, 2016 at 12:39 PM, Guillaume Chapron
<carnivorescience at gmail.com> wrote: