NicolasAnquetil / RProjectConnector

RProjectConnector is a library providing a binding between Pharo and R
MIT License
2 stars 1 forks source link

To which file to copy `libR.so` #2

Open ElCep opened 3 years ago

ElCep commented 3 years ago

Since the update made by @VincentBlondeau I got into the test. I have a first semantic problem at installations. In the readme.md You say that you have to put the /usr/lib/R/libR.so in the vm folder . I don't know which file we're talking about. Is it :

NicolasAnquetil commented 3 years ago

Hi, glad you are having a look at that.

I started, but then got caught by something else and never could come back to it.

The directory to but the C libraries would be the one of the VM, so: Pharo/vms/whatever-vm-you-are-using for example that could be the '80-x86' vm (if you are using pharoLauncher)

ElCep commented 3 years ago

Sorry to get you into old stuff then! But it's impossible to put an issue on Vincent's fork. With R 4.0 installed and libR.so pasted in Pharo/vm/80-x86 it still crach

You will need to log out and log back in for the limits to take effect.
For more information please see
https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux
Fatal error: R home directory is not defined
NicolasAnquetil commented 3 years ago

Will try to look at it, but be aware that I am in no way an FFI expert. May be you want to also try to bring the issue to someone more knowledgeable

VincentBlondeau commented 3 years ago

@ElCep I now enabled the issues on my fork so you can submit them there. Sorry about the noise for you @NicolasAnquetil. For the issue, it should be due to a lack of config of the shell env var. You need to define R_HOME in your system. You also want to try to run R without pharo a first time and test if the R home is set: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Rhome.html Let us know how it goes.

NicolasAnquetil commented 3 years ago

thanks Vincent

ElCep commented 3 years ago

@VincentBlondeau Sorry for the delay, I have done

R.home(component = "home")
[1] "/usr/lib/R"
VincentBlondeau commented 3 years ago

Do you have still the same error in Pharo? Could you try to define the env variable in the shell: R_HOME=/usr/lib/R

ElCep commented 3 years ago

Nop ;-( , Find on stackoverflow

$ R_HOME=`R RHOME`
$ echo $R_HOME
/usr/lib/R

then I try to launch my pharo image and it still crashes