I'm trying to install xps in R, and have installed ROOT from CERN.
during compile I get:
TMLMath.cxx:51:19: fatal error: TMath.h: No such file or directory
#include "TMath.h"
^
compilation terminated.
make: *** [TMLMath.o] Error 1
ERROR: compilation failed for package ‘xps’
I tried adding this file manually, then another was required, then another, ... until the error was not just missing files but things being redefined (see notes here), and again compile failed.
My ROOT details are:
Version 5.34/14 16 December 2013 ROOT 5.34/14 (heads/v5-34-00-patches@v5-34-13-131-gd110ad3, Jan 07 2014, 00:12:00 on linuxx8664gcc) CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
whereis root root: /usr/bin/root /usr/bin/root.exe /etc/root /usr/bin/X11/root /usr/bin/X11/root.exe /usr/include/root /usr/share/root /usr/share/man/man1/root.1.gz
I tried to make uninstall on a freshly downloaded version of root and perhaps worryingly it did nothing (I deleted the folder I originally make'd from)
I'm guessing perhaps the version of ROOT I have is missing some of these because xps relies on an older version of ROOT? The manual shows a very recent date however, so it's not like this is neglected software (if I understand correctly)...
ROOT installed fine, and all prerequisites I could find were installed:
sudo apt-get install build-essential dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev xfs xfstt t1-xfree86-nonfree ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac xfonts-75dpi xfonts-100dpi
Any help would be appreciated, please let me know if I ought provide more details of my system.
Full output from Bioconductor installation:
> biocLite('xps')
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.2.
Installing package(s) 'xps'
trying URL 'http://bioconductor.org/packages/3.0/bioc/src/contrib/xps_1.26.0.tar.gz'
Content type 'application/x-gzip' length 6669399 bytes (6.4 Mb)
opened URL
==================================================
downloaded 6.4 Mb
* installing *source* package ‘xps’ ...
checking for gcc... gcc -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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for gcc... (cached) gcc -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 accepts -g... (cached) yes
checking for gcc -std=gnu99 option to accept ANSI C... (cached) none needed
found ROOT version 5.34/14 in directory /usr
** libs
** arch -
g++ -I/usr//include -O2 -Wall -fPIC -pthread -m64 -I/usr/include/root -c TMLMath.cxx
TMLMath.cxx:51:19: fatal error: TMath.h: No such file or directory
#include "TMath.h"
^
compilation terminated.
make: *** [TMLMath.o] Error 1
ERROR: compilation failed for package ‘xps’
* removing ‘/home/louis/R/x86_64-pc-linux-gnu-library/3.1/xps’
The downloaded source packages are in
‘/tmp/RtmpZVOlbW/downloaded_packages’
Warning message:
In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
installation of package ‘xps’ had non-zero exit status
Edit: I followed ROOTSYS variable changes before running R:
export ROOTSYS=/usr/ export "PATH=$ROOTSYS/bin:$PATH"
I initially had been using ROOTSYS=/usr/include/root, which is where I find the program with whereis root. This gives a different error however - /usr/bin/root/include not a directory. Hence using ROOTSYS=/usr ...
> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.0 (BiocInstaller 1.16.1), ?biocLite for help
> biocLite('xps')
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.2.
Installing package(s) 'xps'
trying URL 'http://bioconductor.org/packages/3.0/bioc/src/contrib/xps_1.26.0.tar.gz'
Content type 'application/x-gzip' length 6669399 bytes (6.4 Mb)
opened URL
==================================================
downloaded 6.4 Mb
* installing *source* package ‘xps’ ...
checking for gcc... gcc -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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for gcc... (cached) gcc -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc -std=gnu99 accepts -g... (cached) yes
checking for gcc -std=gnu99 option to accept ANSI C... (cached) none needed
found ROOT version 5.34/14 in directory /usr
** libs
** arch -
g++ -I/usr/bin/root/include -O2 -Wall -fPIC -pthread -m64 -I/usr/include/root -c TMLMath.cxx
cc1plus: error: /usr/bin/root/include: Not a directory
make: *** [TMLMath.o] Error 1
ERROR: compilation failed for package ‘xps’
* removing ‘/home/louis/R/x86_64-pc-linux-gnu-library/3.1/xps’
The downloaded source packages are in
‘/tmp/Rtmpc9EO9W/downloaded_packages’
Warning messages:
1: In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
installation of package ‘xps’ had non-zero exit status
2: installed directory not writable, cannot update packages 'maptools'
ROOTSYS? - user3710546ROOTSYSto/usr/... I don't think I set these before installing ROOT itself (which does seem to work) - Louis Maddox/usr/bin/root/include: Not a directorymeaning the compiler is trying to enter this directory, which doesn't exist. For example, what is the output oflocate TMLMath.hor similar command? - user3710546locate TMLMath.hreturns nothing,locate TMath.hgives my Downloads folder...~/Downloads/root-6.02.04/include/TMath.h~/Downloads/root-6.02.04/math/mathcore/inc/TMath.h- Louis Maddox