Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues installing - compilation failure #9

Closed
kyakimovich opened this issue Aug 15, 2019 · 6 comments
Closed

Issues installing - compilation failure #9

kyakimovich opened this issue Aug 15, 2019 · 6 comments

Comments

@kyakimovich
Copy link

Hello,
I'm trying to install fastbaps using the give code
devtools::install_github("gtonkinhill/fastbaps")
but it fails, and I cant figure out how to get it to work, everything is up to date.

Im working on a Mac, that is up to date, and in R v 3.6.0.

here is what prints:

Downloading GitHub repo gtonkinhill/fastbaps@master
Your system is ready to build packages!
✔ checking for file ‘/private/var/folders/16/dn_82z5s0hj1m8mlqj82w_jh0000gq/T/RtmpdskaR0/remotes82b61ec15bc2/gtonkinhill-fastbaps-cfe08b3/DESCRIPTION’ ...
─ preparing ‘fastbaps’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘fastbaps_1.0.0.tar.gz’

  • installing source package ‘fastbaps’ ...
    ** 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" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -DARMA_64BIT_WORD -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
    In file included from RcppExports.cpp:4:
    In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31:
    In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:26:
    In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/RcppCommon.h:29:
    In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/Rcpp/r/headers.h:59:
    In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/Rcpp/platform/compiler.h:100:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath:305:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found
    #include_next <math.h>
    ^~~~~~~~
    1 error generated.
    make: *** [RcppExports.o] Error 1
    ERROR: compilation failed for package ‘fastbaps’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/fastbaps’
    Error: Failed to install 'fastbaps' from GitHub:
    (converted from warning) installation of package ‘/var/folders/16/dn_82z5s0hj1m8mlqj82w_jh0000gq/T//RtmpdskaR0/file82b6286f2d54/fastbaps_1.0.0.tar.gz’ had non-zero exit status
@gtonkinhill
Copy link
Owner

Hi, are you able to install both Rcpp and RcppArmadillo? These are dependencies and might be causing the problem. They can be installed by running:

install.packages("Rcpp")
install.packages("RcppArmadillo")

If this doesn't work, I am in the process of putting fastbaps on conda which should make it more portable.

@kyakimovich
Copy link
Author

Ya, they are already installed, still not working :/. My friend with a PC could install it fine, so maybe its a Mac thing?

@gtonkinhill
Copy link
Owner

Sorry for the delay in getting back to you. I actually developed it on Mac so that shouldn't be the problem. It looks like something strange is happening with the way it is compiling as it cant seem to find the math.h c++ libraries. These should be available given you seem to have x-code installed. It could be something to do with your ~/.R/Makevars I'm trying to set up a conda package with fastbaps pre-installed so hopefully that should solve the issue. I'll let you know when I've got it set up.

@maesaar
Copy link

maesaar commented Feb 29, 2020

@gtonkinhill I have same issue is there a fix?

@gtonkinhill
Copy link
Owner

This is an issue with how R is set up to compile c++ code on your system. It's quite tricky for me to debug remotely but fortunately someone has kindly put fastbaps on conda!

You should be able to install it in a conda environment by running

conda install -c bioconda r-fastbaps

I'm planning to update the fastbaps documentation soon to add this information amongst other things.

@maesaar
Copy link

maesaar commented Mar 19, 2020

Running xcode-select --install solved my installation problem regarding compile issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants