ansariazim / treeBreaker

Algorithm to divide a phylogenetic tree into segments based on phenotypes at the leaves of the tree
25 stars 3 forks source link

Install problem in R #5

Open iqbal-lab opened 4 years ago

iqbal-lab commented 4 years ago

Hi there

I just tried to install in RStudio as instructed:

devtools::install_github('ansariazim/treeBreaker')

on a Mac, and it failed thus:

* installing *source* package ‘treeBreaker’ ...
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c mainR.cpp -o mainR.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c treeBreaker.c -o treeBreaker.o
treeBreaker.c:31:10: fatal error: 'gsl/gsl_rng.h' file not found
#include <gsl/gsl_rng.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make: *** [treeBreaker.o] Error 1
ERROR: compilation failed for package ‘treeBreaker’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/treeBreaker’
Error: Failed to install 'treeBreaker' from GitHub:
  (converted from warning) installation of package ‘/var/folders/q2/4r3s9l8n6cx991445ck7xwv8w8l0g5/T//RtmpySS1ht/file9f307da97acc/treeBreaker_1.1.tar.gz’ had non-zero exit status
> 

Should i go install GSL devel somehow, or is this expected to be bundled by the download?

Antonia-Chalka commented 3 years ago

I have the same issue. installing gsl via R doesn't ssem do the trick unfortunately.

ansariazim commented 3 years ago

Hi Antonia, If you want a quick fix, you could use the command line version. After cloning the repo, you can checkout the latest version from 2016:

git clone https://github.com/ansariazim/treeBreaker.git git checkout df73c0b5a00f6a5fe8346b23cf19d4389890c29c

Then read the README file and you can run the program in command line and use R to process the output file using the R file "treeBreaker.R".