Cannot install xps package, Mac OS 10.11, R 3.3
2
0
Entering edit mode
@sophie-marion-de-proce-11984
Last seen 3.3 years ago
University of Edinburgh

Dear all,

I've been trying to install the Bioconductor eps package for several days and cannot get it to work. I would be very grateful for any help.

After reading many forum posts and trying several methods, I've installed root version 5.34.36 using the dmg (root_v5.34.36.macosx64-10.11-clang70.dmg) and that works fine when I call root.

I've also set up my .bashrc file as follows, and sourced it before trying to install xps:

# .bashrc
export PATH=$PATH:/usr/local/bin
# ROOT settings
export MACOSX_DEPLOYMENT_TARGET=10.11
export TMPDIR=/Users/sdeproce/temp
export DISPLAY=/opt/X11/bin/XQuartz
# here you add your path to root
export ROOTSYS=/Applications/root_v5.34.36
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

I've tried installing xps both from the gzipped source and from source using Bioconductor.

In both cases, I get an error message. This is when I use the Bioconductor source installation:

source("http://bioconductor.org/biocLite.R")
biocLite("xps", type="source")

...
found ROOT version 5.34/36 in directory /Applications/root_v5.34.36
xps configuration error:
   You must set the shell variable LD_LIBRARY_PATH to the
   directory where ROOT resides and re-run R CMD INSTALL
   e.g., (using Bourne shell syntax):
      export "LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH"
      R CMD INSTALL xps
   Please consult the README file for more information
ERROR: configuration failed for package ‘xps’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/xps’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/xps’

And this is when I use the .tgz install:

R CMD INSTALL /Users/sdeproce/Downloads/xps_1.34.0.tgz
R
library(xps)

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/xps/libs/xps.so':  dlopen(/Library/Frameworks/R.framework/Versions/3.3/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.3/Resources/library/xps/libs/xps.so
  Reason: image not found
Error: package or namespace load failed for ‘xps’
My session info is:
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] BiocInstaller_1.24.0
loaded via a namespace (and not attached):
[1] tools_3.3.1

Thank you very much for any help,

Sophie.

xps installation • 2.6k views
ADD COMMENT
1
Entering edit mode
cstrato ★ 3.9k
@cstrato-908
Last seen 6.2 years ago
Austria

Dear Sophie,

First let me say that the latest version where I have tested xps is Yosemite, but I
hope that El Capitan is not too different. So I can give you only some suggestions
what may be the reason:

1, I assume that you have installed XCode and the 'Command Line Tools' for Xcode,
and updated to the latest version of XCode for El Capitan.
(If you want to install ROOT from source please see the README file how to install gfortran)

2, Usually I compile ROOT on my Mac from source, but the binary root...tar.gz is also ok.
I have never tried to install the root...dmg version in the Application folder, so I do 
not know whether the root libraries libGui.so can be accessed from xps.

As my README file mentions I would recommend to install ROOT in an easily accessible
directory, e.g. I always install ROOT in my home directory in ~/ROOT/. 

3, In order to compile xps with clang/clang++ you need to create an invisible directory '.R' 
(dot R) in your home directory, and create a text file named 'Makevars'.
Please read the README file how to do it.

4, I recommend to download the source file from xps and compile xps, e.g. 
   R CMD INSTALL -l ~/Library/R/3.0/library xps_1.34.0.tar.gz

To check if xps does work correctly I do also:
   R CMD check xps_1.34.0.tar.gz

5, If you still have problems then I would try to compile ROOT from source, see my
README file.

Best regards,
Christian

ADD COMMENT
0
Entering edit mode

Dear Christian,

Thank you for your  answer. I have started it all again to make sure I didn't miss anything from you reply and README file, and I still encounter the same issue. Here are details of what I have done.

I've installed gfortran.

I've installed ROOT from source using root_v5.34.36.source.tar.gz . For this, it was necessary for me to downgrade Xcode 8 to version 7.3.1 due to an issue mentioned here (https://root.cern.ch/phpBB3/viewtopic.php?t=22376).

export ROOTSYS=/Users/sdeproce/root
cd root
./configure macosx64 --with-f77="/usr/bin/local/gfortran"
make
source bin/thisroot.sh

I updated my .bashrc file to the following and sourced it:

export PATH=$PATH:/usr/local/bin
# ROOT settings
export MACOSX_DEPLOYMENT_TARGET=10.11
export TMPDIR=/Users/sdeproce/temp
export DISPLAY=/opt/X11/bin/XQuartz
# here you add your path to root
export ROOTSYS=/Users/sdeproce/root
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

This was successful and I was able to run the ROOT tutorials.

I have created an R library folder at /Users/sdeproce/Library/R/3.3/library.

I installed MacTex.

I created the invisible .R directory and put in the Makevars file as instructed in the README.

CC=clang
CXX=clang++
CFLAGS="-mtune=native -g -O2 -Wall -pedantic -Wconversion"
CXXFLAGS="-mtune=native -g -O2 -Wall -pedantic -Wconversion"

Then I ran the command for xps:

R CMD INSTALL -l /Users/sdeproce/Library/R/3.3/library /Users/sdeproce/Downloads/xps_1.34.0.tar.gz

This fails with error:

* installing *source* package ‘xps’ ...
checking for gcc... clang
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ANSI C... none needed
checking how to run the C preprocessor... clang -E
checking for gcc... (cached) clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether clang accepts -g... (cached) yes
checking for clang option to accept ANSI C... (cached) none needed
found ROOT version 5.34/36 in directory /Users/sdeproce/root
xps configuration error:
   You must set the shell variable LD_LIBRARY_PATH to the
   directory where ROOT resides and re-run R CMD INSTALL
   e.g., (using Bourne shell syntax):
      export "LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH" 
      R CMD INSTALL xps
   Please consult the README file for more information
ERROR: configuration failed for package ‘xps’
* removing ‘/Users/sdeproce/Library/R/3.3/library/xps’
* restoring previous ‘/Users/sdeproce/Library/R/3.3/library/xps’

 

And then in R, the library command doesn't work and gives an error:

library("xps",lib.loc="/Users/sdeproce/Library/R/3.3/library")

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Users/sdeproce/Library/R/3.3/library/xps/libs/xps.so':
  dlopen(/Users/sdeproce/Library/R/3.3/library/xps/libs/xps.so, 6): Library not loaded: /usr/local/root/lib/root/libGui.so
  Referenced from: /Users/sdeproce/Library/R/3.3/library/xps/libs/xps.so
  Reason: image not found
Error: package or namespace load failed for ‘xps’

I'm running out of ideas. Maybe something in my version of R or Mac OS is causing an incompatibility?

Thank you for your help so far,

Best wishes,

Sophie.

ADD REPLY
0
Entering edit mode

Could it possibly be because of this (https://cran.r-project.org/doc/manuals/r-patched/R-admin.html)? Although setting this variable doesn't work either.

"as from 10.11 (‘El Capitan’) the default behaviour had been changed for security reasons to discard these environment variables when invoking a shell script (and R is a shell script). That makes the only portable option to set R_LD_LIBRARY_PATH in the environment, something like"

export R_LD_LIBRARY_PATH="`R RHOME`/lib:/opt/local/lib"

 

ADD REPLY
0
Entering edit mode

Dear Sophie,

The error means that ROOT is still not found when trying to compile xps.
I need to investigate.

Meanwhile, could you please try to change in '.bashrc' the line:
  export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH
to:
  export DYLD_FALLBACK_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_FALLBACK_LIBRARY_PATH

and tell me whether this change works.

Best regards,
Christian

ADD REPLY
0
Entering edit mode

Dear Christian,

Thank you for your reply.

Unfortunately, replacing the DYLD_LIBRARY_PATH line in the .bashrc file by  the DYLD_FALLBACKLIBRARY_PATH didn't work either.

Best wishes,

Sophie.

ADD REPLY
1
Entering edit mode

Dear Sophie,

To replicate your error, I have installed Sierra on an external SSD and could compile
root_v5.34/36 only with Cmake (no longer with configure + make).

When trying to compile xps I could now replicate the error you get. You are right, Apple
has changed the security settings. However, you can disable these settings, see:
https://developer.apple.com/library/content/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html
https://dberzano.github.io/alice/install-aliroot/prereq-osx/#system_integrity_protection

When I did 'csrutil disable' I could compile xps, however, at the moment there is now
a problem with loading xps. I need to investigate further.

In your case it may be sufficient to disable the security settings. Please let me know
whether you did succed and if not which error you do get now.

Best regards,
Christian

ADD REPLY
0
Entering edit mode

Dear Christian,

Thank you very much for your help, disabling the System Integrity Protection by running csrutil disable in the terminal in the Recovery mode did work, I've finally had success installing xps!

> library(xps)
Welcome to xps version 1.34.0
    an R wrapper for XPS - eXpression Profiling System
    (c) Copyright 2001-2015 by Christian Stratowa

Best wishes,

Sophie.

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

I am glad to hear that you could now install xps, Christian

 

ADD COMMENT

Login before adding your answer.

Traffic: 569 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6