unable to load xps
1
0
Entering edit mode
@amohamed11-8656
Last seen 9.4 years ago

Hi guys,

 

I want to process some CEL files, I came across R console to use. But, I had to use ROOT. 

I have tried every possible thing online to solve the problem. 

> 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
  Reason: image not found
Error: package or namespace load failed for ‘xps’

I have installed root 5 and 6 (didn't work), I uninstalled everything and install again, no way, I have went through everything online, no way. 

I have created .bash_profile, tested ROOT, everything is working properly except loading xps, library! 

Any ideas, before I give up! Thanks a lot. 

p.s I'm a very new user. 

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

Hi,

Please supply your sessionInfo() first, otherwise it is hard to guess your OS.

Furthermore, please tell me which version of ROOT you did install, i.e. please
supply the complete url for your download.


From your error message I assume that you are using Mac OS X. If this is the
case please do the following:

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.

For Yosemite you need to download:
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.

Please note that you need to install X11 on your Mac:
xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg

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

# here you add your path to root
export ROOTSYS=/Volumes/GigaData/ROOT/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
# - - - - - - - - - - - - - - - - - -


Christian

ADD COMMENT
0
Entering edit mode

Hi,

I am also facing the same issue. I installed the xps from source by following steps in the INSTALLATION file. But when i am trying to load the package in R it is giving me the following error:

Error: package or namespace load failed for ‘xps’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/jain/R/x86_64-redhat-linux-gnu-library/3.5/xps/libs/xps.so':
  libGui.so: cannot open shared object file: No such file or directory

Also, my sessioninfo is :

R version 3.5.0 (2018-04-23)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Workstation 7.5 (Maipo)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] lumi_2.32.0                          hugene10stv1cdf_2.18.0               panp_1.50.0                         
 [4] illuminaio_0.22.0                    hugene20sttranscriptcluster.db_8.7.0 hugene10sttranscriptcluster.db_8.7.0
 [7] pd.hugene.1.0.st.v1_3.14.1           pd.hugene.2.0.st_3.14.1              DBI_1.0.0                           
[10] RSQLite_2.1.1                        hgu133a.db_3.2.3                     org.Hs.eg.db_3.6.0                  
[13] AnnotationDbi_1.42.1                 biomaRt_2.36.1                       oligo_1.44.0                        
[16] Biostrings_2.48.0                    XVector_0.20.0                       IRanges_2.14.11                     
[19] S4Vectors_0.18.3                     oligoClasses_1.42.0                  affy_1.58.0                         
[22] Biobase_2.40.0                       BiocGenerics_0.26.0                  BiocInstaller_1.30.0                
[25] edgeR_3.22.3                         limma_3.36.3                        
ADD REPLY
0
Entering edit mode

Also, when I am trying to install it from RStudio via Bioconductor it is giving me error that ROOTSYS variable is not there.

> biocLite("xps",type="source")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.0 (2018-04-23).
Installing package(s) ‘xps’
trying URL 'https://bioconductor.org/packages/3.7/bioc/src/contrib/xps_1.40.0.tar.gz'
Content type 'application/x-gzip' length 6606158 bytes (6.3 MB)
==================================================
downloaded 6.3 MB

* installing *source* package ‘xps’ ...
checking for gcc... gcc -m64 -std=gnu99
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 gcc -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E
checking for gcc... (cached) gcc -m64 -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -m64 -std=gnu99 accepts -g... (cached) yes
checking for gcc -m64 -std=gnu99 option to accept ANSI C... (cached) none needed
checking for root-config... no

xps configuration error:

   You must set the shell variable ROOTSYS to the
   directory where ROOT resides and re-run R CMD INSTALL
   e.g., (using Bourne shell syntax):

      export ROOTSYS=/opt/root
      export "PATH=$ROOTSYS/bin:$PATH" 
      R CMD INSTALL xps

   Please consult the README file for more information

ERROR: configuration failed for package ‘xps’
* removing ‘/home/jain/R/x86_64-redhat-linux-gnu-library/3.5/xps’

but I have updated the .bashrc with the path and I can print the variable in the terminal.

[jain@dccnx182 counts]$ echo $ROOTSYS
/home/jain/Downloads/root

ADD REPLY
0
Entering edit mode

Hi Ashish,

As usual, the error indicates that xps does not find ROOT.

For this reason I need to know the following:

- Did you download ROOT from: https://root.cern.ch/content/release-53436

- Did you download and compile the source code yourself?
  (This is the option I recommend)

- Or did you install one of the Linux binaries, if so which one?
  (You would need to install the binary with the correct version of gcc)
  
- Where did you install ROOT?
  (as usual I do not recommend to install ROOT in /usr/local)
   
- Can you start ROOT from xterm by typing 'root'?
  (type '.q' to quit ROOT)
  
- Can you run the ROOT tutorials?
  $ cd /path/to/root/tutorials
  $ root
  root [0] .x demos.C  (you should see a columns with buttons you can press)
  root [1] .q


Best regards,
Christian

ADD REPLY
0
Entering edit mode

Hi Christian,

Thank you for the reply. Please find my answers below:

- Did you download ROOT from: https://root.cern.ch/content/release-53436

Yes, I downloaded ROOT from this link.

- Did you download and compile the source code yourself?
  (This is the option I recommend)

I did complied the source code myself.

- Or did you install one of the Linux binaries, if so which one?
  (You would need to install the binary with the correct version of gcc)

Complied the code myself.
  
- Where did you install ROOT?
  (as usual I do not recommend to install ROOT in /usr/local)

I installed root @ /home/jain/Downloads/root/

[jain@dccnx182 counts]$ echo $ROOTSYS
/home/jain/Downloads/root


- Can you start ROOT from xterm by typing 'root'?
  (type '.q' to quit ROOT)

Yes, I can start root from the terminal.


- Can you run the ROOT tutorials?
  $ cd /path/to/root/tutorials
  $ root
  root [0] .x demos.C  (you should see a columns with buttons you can press)
  root [1] .q

I did ran the example from the INSTALLATION file but demos.C is not there in the macros folder.

Regards,
Ashish Jain

ADD REPLY
0
Entering edit mode

And one more thing, I am able to install the package from the command line (from source) but I was not able to load it.

Error while loading:

Error: package or namespace load failed for ‘xps’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/jain/R/x86_64-redhat-linux-gnu-library/3.5/xps/libs/xps.so':
  libGui.so: cannot open shared object file: No such file or directory

 

ADD REPLY
0
Entering edit mode

This means still that xps does not find ROOT.

- Please run the ROOT tutorials to see if libGui.so does work.
  You find 'demos.C' in directory root/tutorials so you need to 'cd' there.

- How does the '.bashrc' file in your home directory look like?

- Does 'R CMD INSTALL xps' install xps?
  See the output of the build/check report of Bioconductor for Ubuntu:
  http://bioconductor.org/checkResults/release/bioc-LATEST/xps/malbec2-install.html
  Is there any difference?

- What is the output of 'R CMD check xps_1.40.0.tar.gz'?
  See the output of the build/check report of Bioconductor for Ubuntu:
  http://bioconductor.org/checkResults/release/bioc-LATEST/xps/malbec2-checksrc.html
  Is there any difference?


Best regards,
Christian

ADD REPLY
0
Entering edit mode

- I am able to run the 'demos.C' from the directory root/tutorials.

- My '.bashrc' file is:

# .bashrc

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

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
alias pip="/usr/bin/pip-python"

# added by Anaconda3 4.2.0 installer
#export PATH="/home/jain/anaconda3/bin:$PATH"
export PATH=$PATH:/home/jain/Placenta_Geo_Dataset/HOMER/bin/
export ROOTSYS=/home/jain/Downloads/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH

- I am using 'R CMD INSTALL xps_1.40.0.tar.gz' and there is no difference in the output

- Also there is no difference in the output for R CMD CHECK command.

One thing i found that the xps.so file in my installed xps package doesn't have the links for the libGui.so and other libraries.

[jain@dccnx182 libs]$ ldd xps.so 

linux-vdso.so.1 =>  (0x00007ffc3232d000)

libGui.so => not found

libCore.so => not found

libCint.so => not found

libRIO.so => not found

libNet.so => not found

libHist.so => not found

libGraf.so => not found

libGraf3d.so => not found

libGpad.so => not found

libTree.so => not found

libRint.so => not found

libPostscript.so => not found

libMatrix.so => not found

libPhysics.so => not found

libMathCore.so => not found

libThread.so => not found

libdl.so.2 => /lib64/libdl.so.2 (0x00007fec00c76000)

libGed.so => not found

libTreePlayer.so => not found

libTreeViewer.so => not found

libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fec0096f000)

libm.so.6 => /lib64/libm.so.6 (0x00007fec0066d000)

libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fec00457000)

libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fec0023b000)

libc.so.6 => /lib64/libc.so.6 (0x00007febffe6e000)

/lib64/ld-linux-x86-64.so.2 (0x00007fec015b6000)

ADD REPLY
0
Entering edit mode

Hi Ashish,

Please try the following in '.bashrc':

1, delete 'export DYLD_LIBRARY_PATH' which is only needed for Mac
   delete 'export LD_LIBRARY_PATH'
   Now test if xps does work. 
   
If there are still problems:
2, delete also 'export ROOTSYS'

In principle you should no longer need to define $ROOTSYS, since I had updated 
the file 'Makefile.arch' see: http://bioconductor.org/packages/3.7/bioc/news/xps/NEWS

Best regards,
Christian

ADD REPLY
0
Entering edit mode

Hi Christian,

It seems that DYLD_LIBRARY_PATH and LD_LIBRARY_PATH are required by xps (in Redhat also) as I was not able to install the package without these paths (As xps is not able to locate libClint.so file which is in lib folder of root). For a quick fix can you please point me to the files in xps where you are specifying the path of root libraries so that I can hardcode them with my root path.

Regards,

Ashish Jain

ADD REPLY
0
Entering edit mode

Hi Ashish,

Can you tell me how you have compiled and installed ROOT?

On Mac (BSD Unix) you have to do after make:
$ . bin/thisroot.sh   (the first symbol is a dot)

As far as I remember you need to run this command on Linux, too.

At least on Mac this command makes sure that the environment variables 
LD_LIBRARY_PATH and DYLD_LIBRARY_PATH are no longer necessary, 
so you can delete or uncomment the corresponding lines.

Note:
DYLD_LIBRARY_PATH was ONLY necessary for Mac, so this variable should not be set on Linux!

If you did not do '. bin/thisroot.sh' I would suggest to delete ROOT completely 
and recompile it.

Best regards,
Christian

ADD REPLY
0
Entering edit mode

Hi Christian,

I am now able to install xps from the source code (not from the tar file from bioconductor as it is not from the latest version). But for some reason, the package is still not loading on RStudio but is loading without any error from R terminal.

Thank you for all your support!

Regards,

Ashish Jain

Edited: I just realized that the new changes (and new .tar file) are there in xps development version but not in 3.7 release version.

ADD REPLY
0
Entering edit mode

Hi Ashish,

I am glad to hear that you could finally install xps.

It is strange that you had to use the source code from the development version,
since the relevant changes are also available in the release version.

I have no experience with RStudio, and usually I recommend to run xps from xterm.
This will make sure that you receive an interactive progression status (when verbose =TRUE).

Best regards,
Christian

ADD REPLY

Login before adding your answer.

Traffic: 302 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