[Rd] Sligthly OT Re: Makefile for embedding OpenBUGS in R package
Hin-Tak Leung
hin-tak.leung at cimr.cam.ac.uk
Tue Aug 7 22:31:41 CEST 2007
Prof Brian Ripley wrote:
> OpenBUGS is distributed under GPL2, so this seems not to apply.
> It is distributed as source and as binaries: the difficulty is that it
> is written in Object Pascal for which a compiler is not readily available.
Argh, I just thought of a proper technical reason, and I think I have
spotted a possible bug in the original poster's code! Some choose to do
dlopen() when the DLL/so is in a non-standard/non-system location, as an
alternative to setting LD_LIBRARY_PATH explicitly or other link-loader
magics.
The line:
handle = dlopen("./brugs.so", RTLD_LAZY);
Seems to suggest this, However, the problem with this code, is that
the current directory (./) may not be where the user thinks it is.
I think the user meant to prepend $R_HOME/library/<package>/inst/
somehow to "brugs.so", and dlopen'ing
"$R_HOME/library/<package>/inst/brugs.so" instead.
Hin-Tak
<snipped>
More information about the R-devel
mailing list