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

Build error on Mac OS X #9

Closed
afrubin opened this issue May 2, 2018 · 4 comments
Closed

Build error on Mac OS X #9

afrubin opened this issue May 2, 2018 · 4 comments

Comments

@afrubin
Copy link

afrubin commented May 2, 2018

Installation fails on Mac OS X because -fopenmp is not supported:

* installing *source* package ‘malan’ ...
** libs
clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppArmadillo/include" -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppProgress/include" -I/usr/local/include  -fopenmp  -fPIC  -Wall -g -O2 -c PROTO.cpp -o PROTO.o
clang: error: unsupported option '-fopenmp'
make: *** [PROTO.o] Error 1
ERROR: compilation failed for package ‘malan’

It appears this is a common issue (see discussion and resolution here velocyto-team/velocyto.R#2) and may involve installing another version of llvm via homebrew.

Is it possible to change the build scripts to work around this?

@mikldk
Copy link
Owner

mikldk commented May 2, 2018

Thanks for discovering this. I think I just have to disable OpenMP for Armadillo in Makevars, but I'll have to test it first (maybe on Travis). I'll get back :-).

@mikldk
Copy link
Owner

mikldk commented May 2, 2018

I was able to reproduce this. Thank you for discovering and reporting it.

It should be fixed by 616bf58 that disables OpenMP. See also Travis where I have now added OSX target: https://travis-ci.org/mikldk/malan.

Can you confirm that it now compiles and works on Mac OS X for you, too?

@afrubin
Copy link
Author

afrubin commented May 4, 2018

Great, this works for me now.

I should add that as a workaround I tried installing into a new conda environment. This worked since conda has its own version of llvm, but for some reason the vignettes were not installed:

> library('malan')
> vignette(package = 'malan')
no vignettes found

I did some google searching and this might be a bug when installing from GitHub, but the vignettes do appear when installing from GitHub in RStudio.

@mikldk
Copy link
Owner

mikldk commented May 4, 2018

Good to hear. Closing as this should be resolved.

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

2 participants