Search
Question: Running R without X11?
0
gravatar for Amy Johnson
9.2 years ago by
Amy Johnson40
Amy Johnson40 wrote:
Hi, I'm trying to run batch R scripts that is triggered online with PHP code: exec(R --no-save -q < myscript.r > output.txt 2>&1); However, as there are some R libraries, e.g. qvalue, webbioc needs X11 (tcltk) loaded, I got the following errors: Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/local/lib/R/library/tcltk/libs/tcltk.so': /usr/lib/libXft.so.2: undefined symbol: FT_GlyphSlot_Embolden Error : .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' Execution halted I have no problem to run the script on the shell when X11 is lauched. How do I launch X11 before running R scripts in batch from the web? Is there a way to avoid loading tcltk when loading R libraries like qvalue and webbioc? As far as I remember, the old versions of qvalue and webbioc do not require tcltk. Thanks Amy.
ADD COMMENTlink modified 9.2 years ago by ALok170 • written 9.2 years ago by Amy Johnson40
0
gravatar for Hervé Pagès
9.2 years ago by
Hervé Pagès ♦♦ 13k
United States
Hervé Pagès ♦♦ 13k wrote:
Hi Amy, Our build system here in Seattle faces the same problem: it needs to run 'R CMD build' and 'R CMD check' non-interactively on all the BioC packages. Running these commands will execute the code that is in the vignettes and in the example section of the man pages of every package. For some packages that means that they will try to connect to an X server. One solution to this is to start the X virtual server (Xvfb) and then define the DISPLAY environment variable. From the Bourne shell (bash): PID=$$ Xvfb :$PID -screen 0 800x600x16 & xvfb_pid=$! export DISPLAY=:$PID.0 Then your batch R scripts will be able to connect to this virtual server. That means that the above commands must be executed early enough so that your R scripts actually see the DISPLAY variable in their environment. When you are done, shutdown the X virtual server with: kill $xvfb_pid Hope this helps, H. Amy Johnson wrote: > Hi, I'm trying to run batch R scripts that is triggered online with PHP code: > > exec(R --no-save -q < myscript.r > output.txt 2>&1); > > However, as there are some R libraries, e.g. qvalue, webbioc needs X11 > (tcltk) loaded, I got the following errors: > > Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath = DLLpath, ...) > : > unable to load shared library > '/usr/local/lib/R/library/tcltk/libs/tcltk.so': > /usr/lib/libXft.so.2: undefined symbol: FT_GlyphSlot_Embolden > Error : .onLoad failed in 'loadNamespace' for 'tcltk' > Error: package/namespace load failed for 'tcltk' > Execution halted > > I have no problem to run the script on the shell when X11 is lauched. How do > I launch X11 before running R scripts in batch from the web? Is there a way > to avoid loading tcltk when loading R libraries like qvalue and webbioc? As > far as I remember, the old versions of qvalue and webbioc do not require > tcltk. > > Thanks > > Amy. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENTlink written 9.2 years ago by Hervé Pagès ♦♦ 13k
0
gravatar for ALok
9.2 years ago by
ALok170
ALok170 wrote:
The problem you mentioned unable to load shared library '/usr/local/lib/R/library/tcltk/libs/tcltk.so': One option is to install R by using tar package. to configure R in share library mode you can use the option ../configure --enable-R-shlib This will allow you to share the R library hope it will work. ALok On Sat, Sep 6, 2008 at 3:07 AM, Amy Johnson <a7johnson@gmail.com> wrote: > Hi, I'm trying to run batch R scripts that is triggered online with PHP > code: > > exec(R --no-save -q < myscript.r > output.txt 2>&1); > > However, as there are some R libraries, e.g. qvalue, webbioc needs X11 > (tcltk) loaded, I got the following errors: > > Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath = DLLpath, > ...) > : > unable to load shared library > '/usr/local/lib/R/library/tcltk/libs/tcltk.so': > /usr/lib/libXft.so.2: undefined symbol: FT_GlyphSlot_Embolden > Error : .onLoad failed in 'loadNamespace' for 'tcltk' > Error: package/namespace load failed for 'tcltk' > Execution halted > > I have no problem to run the script on the shell when X11 is lauched. How > do > I launch X11 before running R scripts in batch from the web? Is there a way > to avoid loading tcltk when loading R libraries like qvalue and webbioc? As > far as I remember, the old versions of qvalue and webbioc do not require > tcltk. > > Thanks > > Amy. > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Ph.D scholar Centre of Computational Biology and Bioinformatics School of Information Technology JNU New Delhi [[alternative HTML version deleted]]
ADD COMMENTlink written 9.2 years ago by ALok170
On Sat, Sep 6, 2008 at 2:12 AM, ALok <foralok at="" gmail.com=""> wrote: > The problem you mentioned > > unable to load shared library > '/usr/local/lib/R/library/tcltk/libs/tcltk.so': > > One option is to install R by using tar package. > to configure R in share library mode > you can use the option > ../configure --enable-R-shlib > This will allow you to share the R library Alok, The --enable-R-shlib will compile the R library as a shared library so that it can be included in other programs. However, it does not affect library building for R, so reconfiguring will not improve matters. In other words, R uses shared libraries with foreign language packages (C, Fortran code), which is what the error message is implying is a problem. In additino, R can be a shared library itself for other programs, and the -enable-R-shlib enables this. Sean > On Sat, Sep 6, 2008 at 3:07 AM, Amy Johnson <a7johnson at="" gmail.com=""> wrote: > >> Hi, I'm trying to run batch R scripts that is triggered online with PHP >> code: >> >> exec(R --no-save -q < myscript.r > output.txt 2>&1); >> >> However, as there are some R libraries, e.g. qvalue, webbioc needs X11 >> (tcltk) loaded, I got the following errors: >> >> Loading Tcl/Tk interface ... Error in dyn.load(file, DLLpath = DLLpath, >> ...) >> : >> unable to load shared library >> '/usr/local/lib/R/library/tcltk/libs/tcltk.so': >> /usr/lib/libXft.so.2: undefined symbol: FT_GlyphSlot_Embolden >> Error : .onLoad failed in 'loadNamespace' for 'tcltk' >> Error: package/namespace load failed for 'tcltk' >> Execution halted >> >> I have no problem to run the script on the shell when X11 is lauched. How >> do >> I launch X11 before running R scripts in batch from the web? Is there a way >> to avoid loading tcltk when loading R libraries like qvalue and webbioc? As >> far as I remember, the old versions of qvalue and webbioc do not require >> tcltk. >> >> Thanks >> >> Amy. >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > > > -- > Ph.D scholar > Centre of Computational Biology and Bioinformatics > School of Information Technology > JNU New Delhi > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLYlink written 9.2 years ago by Sean Davis21k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 152 users visited in the last hour