[ESS] ESS and LD_LIBRARY_PATH
Erik Iverson
iverson at biostat.wisc.edu
Wed Oct 18 22:57:45 CEST 2006
Rodney -
Ok, that does work! I'm able to load package Cairo successfully if I
start Xemacs from the shell in KDE. I also tried a Gnome session. It
works from the command line *and* when I start it from Gnome with "run
application" or whatever similar option there is in Gnome. It's only in
KDE when I start it from "Run command" or from my shortcut that it
doesn't work.
Well, I realize at this point it's probably not an ESS issue, and I'm
content with starting Xemacs from my shell. Still kind of puzzling, but
don't know if there's anything to do about it. If I ever figure it out,
I'll post here. Seems at this point to be KDE related?
Thanks so much,
Erik
Rodney Sparapani wrote:
> Hi Erik:
>
> So, if you set LD_LIBRARY_PATH appropriately in a terminal window
> and then launch xemacs; is the environment variable inherited or not?
>
> Rodney
>
> Erik Iverson wrote:
>
>>Hello -
>>
>>Apologies if this is something simple; I've tried everything I can think
>>of! I am on RHLE 4, R version 2.3.1, ESS 5.3.0.
>>
>>I have downloaded an R package called Cairo (not on CRAN). The package
>>Cairo needs to have the Cairo library (www.cairographics.org) installed
>>to function. Because I'm doing this at work, and do not have root
>>access, I have installed the Cairo graphics library in ~/lib, as is my
>>standard practice (I'm *not* talking about the R package Cairo here, I'm
>>talking about the Cairo graphics library). I then have LD_LIBRARY_PATH
>>set to ~/lib in my .cshrc file. I then installed the R Cairo package
>>with R CMD INSTALL.
>>
>>Now, from my shell in KDE, I can start R and load the Cairo package.
>> > library(Cairo)
>> >
>>This is great!
>>
>>However, I try from ESS 5.3.0 under XEmacs, also using R version 2.3.1
>> > library(Cairo)
>>Error in dyn.load(x, as.logical(local), as.logical(now)) :
>> unable to load shared library '/u/iverson/R.tools/lib/Cairo/libs/Cairo.so':
>> libcairo.so.2: cannot open shared object file: No such file or directory
>>Error in library(Cairo) : .First.lib failed for 'Cairo'
>>
>>It can't find libcairo.so.2, which is in ~/lib.
>>
>>I can't figure out why when starting R from my shell, I can load Cairo,
>>but not when using R under ESS.
>>
>>I check the LD_LIBRARY_PATH environment variable from the R session
>>started in my shell:
>> > Sys.getenv("LD_LIBRARY_PATH")
>>LD_LIBRARY_PATH
>>"/s/pkg/linux/R/2.2.1/lib/R/lib: ... :/u/iverson/lib"
>>I omit some paths here, but note it has ~/lib.
>>
>>I now check LD_LIBRARY_PATH from the R session in ESS:
>> > Sys.getenv("LD_LIBRARY_PATH")
>>
>>
>> LD_LIBRARY_PATH
>>"/s/pkg/linux/R/2.2.1/lib/R/lib: ..."
>>This returned the same string as above, *except* for ~/lib!
>>I thought, no problem, I'll just append ~/lib to LD_LIBRARY_PATH using
>>Sys.putenv() in R under ESS.
>>
>>It looked like it appended ~/lib correctly according to Sys.getenv(),
>>but library(Cairo) still wouldn't work, same error as above to my
>>surprise. Setting LD_LIBRARY_PATH in my .Renviron file didn't change
>>the error message either.
>>
>>Any thoughts on this? I was able to get the Cairo package loaded in an
>>R session started from my Xemacs shell also, so my naive guess is that
>>this isn't an Xemacs issue.
>>
>>Thanks for any help or suggestions anyone can offer, I've tried all I
>>can think of!
>>Erik Iverson
>>
>>______________________________________________
>>ESS-help at stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list