Problem with xps package and root installation
2
0
Entering edit mode
Mari RM • 0
@mari-rm-7759
Last seen 7.3 years ago
Brazil

Hi all,

​I've been trying to install and use xps package for weeks, without any success :(

​I carefully read installation instructions for root and looked for help in several forums. Based on this information, I already  tried to install versions ftp://root.cern.ch/root/root_v5.34.05.macosx106-x86_64-gcc-4.2.tar.gz and ftp://root.cern.ch/root/root_v5.26.00c.macosx106-x86_64-gcc-4.2.tar.gz (based on this post https://support.bioconductor.org/p/55744/) both in my home directory and in /usr/local

cd root

. bin/thisroot.sh

However, I've been getting this error message constantly when trying to load xps package on R:

> library(xps)

Error in dyn.load(file, DLLpath = DLLpath, ...) :

unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/xps/libs/xps.so':

dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/xps/libs/xps.so, 6): Library not loaded: /usr/local/root/lib/root/libGui.so  Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/xps/libs/xps.so

Error: package or namespace load failed for ‘xps’

Here is my session info:

> sessionInfo()

R version 3.2.0 (2015-04-16)

Platform: x86_64-apple-darwin13.4.0 (64-bit)

Running under: OS X 10.10.3 (Yosemite)

locale:

[1] C/UTF-8/C/C/C/C

attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:

[1] BiocInstaller_1.18.2

loaded via a namespace (and not attached):

[1] tools_3.2.0

Could somebody help me with this issue? Thanks a lot!

xps root • 2.6k views
0
Entering edit mode
cstrato ★ 3.9k
@cstrato-908
Last seen 3.9 years ago
Austria

Dear Mari,

First, please delete ROOT and everything related to ROOT from your Mac.

Second, I do not recommend to install ROOT in /usr/local
install ROOT in your home directory or in any other directory.

ftp://root.cern.ch/root/root_v5.34.30.macosx64-10.10-clang61.tar.gz
or, if you want to compile root yourself:
ftp://root.cern.ch/root/root_v5.34.30.source.tar.gz

As far as I know, older versions of ROOT do not run under Yosemite.

Then you need to create in your home directory the file '.bashrc'

Here is as example my '.bashrc' file:

# - - - - - - - - - - - - - - - - - -
# .bashrc

# User specific aliases and functions

#svn
export PATH=$PATH:/usr/local/bin # latex export PATH=/usr/texbin:$PATH

# ROOT settings
export MACOSX_DEPLOYMENT_TARGET=10.9
export TMPDIR=/Users/cstrato/temp

export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# - - - - - - - - - - - - - - - - - -

Best regards,
Christian

0
Entering edit mode

Dear Christian,

Thanks a lot for you comment. I'll try to do what you suggested and I'll let you know if I could successfully install root and xps.

Best regards,

Mari

0
Entering edit mode

Dear Christian,

Now I could make it work! :-)

Interestingly, it only works when using R in shell terminal. I normally use RStudio, but I could not install or load the xps package in Rstudio. Is this expected?

Mari

0
Entering edit mode

This is because in order for ROOT to work, it requires that the variables defined in that .bashrc available in the working environment.

When you launch a terminal session, .bashrc is run, and those variables that you put in there get defined. GUI apps get their environment variables via a different mechanism. The recommended way to define global environment variables that GUI apps have access to changes with different versions of OSX, so you can google how to do it "officially".

An easy way to get it to work, however, is to simply open RStudio from the command line, ie. fire up a terminal and run the following command:

open -a RStudio

I believe that should do the trick.

0
Entering edit mode
cstrato ★ 3.9k
@cstrato-908
Last seen 3.9 years ago
Austria

Dear Mari,

I am glad to hear that you got xps to work.

In my opinion it is best to use xps with xterm since by setting parameter
'verbose=TRUE' in the functions you can immediately follow the progress.

On the Mac 'R.app' is the official GUI for R, and xps should work with R.app, too.

I do not have RStudio and I have never tried it so I do not know what the
problem with RStudio may be.

Best regards,
Christian