-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rApache not reading ldpaths #47
Comments
Ideally, you should use
then for Java to work you'd run
instead. Alternatively, whatever you're starting can use |
We should probably do this before our call to |
What's happening is that the linux service script(unity, init, system, etc.) ought to be amended to update the LD_LIBRARY_PATH (And other side effects of R CMD sh) prior to starting the server. Typically, the service script runs in a minimal environment. I've known about this issue for a long time, but I'm not sure the best way to fix it. |
Here's a version of the init script that ultimately get's placed into /etc/init.d/apache2 on ubuntu: It references a file that's typically located at /etc/apache2/envvars Maybe we need an additional config tool that outputs the side effects of |
Modifying global apache configs is difficult to setup and sound dangerous, especially if people are running other (non-R) websites on the same apache box. Can we just output the variables we need to a file and run |
You'll see in the /etc/init.d/apache2 script that the environment has to be set up at the invocation of apachectl. The facility for setting up that enviroment seems to be defined by the content of /etc/apache2/envvars, which would affect all the sites including non-R sites. |
Something like this would populate the R environment to /etc/apache2/envvars:
Then run
But this doesn't solve it completely as there are some env vars that contain spaces like:
So that shows up as two lines in the /etc/apache2/envvars like this:
And then there are other strange env vars like:
|
I really don't like hardcoding that stuff in |
What I don't understand is what |
Just confirming that I was able to solve the same issue by adding Another issue arose however from the same rJava-dependent function call (mailR::send.mail) which works fine as user
|
@alexvpickering I have never seen this stack smashing detected error. If you can reproduce it you can open a separate issue. |
Running Ubuntu 16.04 with
r-cran-java
. LoadingrJava
in the console works fine, but when loading it insiderApache
on the same machine gives:I think
/usr/bin/R
sources/usr/lib/R/etc/ldpaths
which setsLD_LIBRARY_PATH
to the path wherelibjvm.so
lives (i.e.${JAVA_HOME}/jre/lib/amd64/server
) before starting the repl.What would be the most natural way to do this accomplish the same thing in rapache? The problem is that
ldpaths
is a shell script which sets an environment variable, so calling this viasystem()
does not work because that sets theLD_LIBRARY_PATH
only in thesystem()
subprocess.The text was updated successfully, but these errors were encountered: