-
Notifications
You must be signed in to change notification settings - Fork 223
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
Installation Error: clang: error: unsupported option '-fopenmp' #2
Comments
I've made an updated to Makevars to remove explicit -fopenmp which only works on some platforms. Please try installing now. |
Unfortunately using the same installation protocol as above, I was returned the exact same error. |
@ShanSabri for macOS the default compiler Apple clang LLVM does not support openmp yet. From terminal if you do not have boost install that as well since boost is not included in macOS. This will also install hdf5 if you want to tryout with loom.
Or you can simply just try my fork of this package that does this for you in the package configure file. From R: |
I have the same issue with the python version. Is there any fix planned? |
I solved compiler problem on Mac relying on compilers installed using conda (try both conda install gcc and llvm). I realize this solution is a bit vague, but I don't remember exactly what command solved it for me but pretty sure that the conda provided one do the job with openmp. |
@tractatus Thanks for providing a solution for the OS X installation! Do you think it's general enough that I should merge it into the main repo? |
@pkharchenko my solution is a hack because of Apple's LLVM. However, openmp has been compatible for clang for a long time and there is no indication Apple are going to include it anytime soon (recent Xcode 9 didn't include it). Most kosher thing to do would maybe split the C++ code into openmp dependent and non-openmp dependent but that is a bunch of work. Personally, I think for users who do not know about build environments and "just want to get going" being able to install and get going using devtools::github_install() with a single line is the way to go. For that, the configure file will do its job. Another alternative is OS specific prerequirements installation instructions in the README.md. For windows support, you'll have to do this at some point regardless. If the configure file is used I would maybe just ad to the shell script that it asks the user y/n if you want to proceed since the ~/.R/Makevars will be changed. Then there will be the issue of users that have already installed the package and wants to update. It is highly annoying to wait for a bunch of shell script before having reinstalled. For those occasions maybe include a R function named
This function also has the benefit of not requiring users to remove the package quit R and reinstall the package but rather they can continue with the updated package in the current session. They'll just run:
And they'll know they running the latest version from GitHub. |
Quote from R (https://cloud.r-project.org/):
I followed the R's suggestion and no more errors:
Update Oct 16, 2018. export PATH=/usr/local/clang4/bin:$PATH |
Hello, Now I'm faced with another error though.
I have installed boost. Actually, I've tried both
Any idea what I should be doing? Session info:
Thanks |
@tractatus I really appreciate your suggestion: installing source package ‘velocyto.R’ ... |
@SamAllon running homebrew as root in configure file is no longer supported for obvious safety reasons. Just open terminal and run the part yourself (assuming you have homebrew).
Then install this repo as ordinary:
|
@tractatus Thank you so much! For whatever reason, /usr/local/clang4/ did not exist on my system after your first 4 steps. But your advice totally set me on the right direction. In addition to your steps, I did the following:
|
@tractatus Thanks |
@Caleb-Huo this sounds like a tab as separator issue. Since no other info is provided I can only guess your problem. But copy-paste the text you want to run into your preferred text editor and make sure tabs are tabs and not spaces. |
@Caleb-Huo I had exactly the same problem. Got it work by using a text editor to open the Makevars file, and only copy and paste the following:
|
I was able to solve this using @SamAllon 's method. I had the exact same problem. |
@SamAllon @tractatus Thanks so much! Was having this issue for over 3 hours, tried the Docker solution too... |
Does anyone know if it’s possible to make R substitute this standard variables automatically, upon install?
Without that, I am not sure how to configure the package so that it would work on both OS X and other platforms.
-peter.
… On Jan 25, 2018, at 6:47 PM, zhuo91 ***@***.***> wrote:
@Caleb-Huo <https://github.com/caleb-huo> I had exactly the same problem. Got it work by using a text editor to open the Makevars file, and only copy and paste the following:
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/clang4/bin/clang++
CXX11=/usr/local/clang4/bin/clang++
CXX14=/usr/local/clang4/bin/clang++
CXX17=/usr/local/clang4/bin/clang++
CXX1X=/usr/local/clang4/bin/clang++
LDFLAGS=-L/usr/local/clang4/lib
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALT78qJxpsFqZjlAoDarvBgNM5yWQ0niks5tORKtgaJpZM4QFNwF>.
|
@pkharchenko Given that Apple still do not support OpenMP with their clang distro I think you have two options:
The second option was what the author, @mikldk, of this package did: You can see the changes to their Makevars files here: If this is to get the R package ready for a larger audience I would suggest building static binaries of the package with OpenMP static libraries included. This way people can install quickly. Otherwise, you always run the risk of a larger audience getting stuck compiling from source and then giving up immediately. |
My favourite option is to install the conda version of gcc that will compile openMP without problems (see this answer velocyto-team/velocyto.py#53 <velocyto-team/velocyto.py#53>, It basically narrows down to this command: ``conda install llvm gcc libgcc``) but I like the idea to have the functions precompiled, we have this already in velocyto.py
|
@gioelelm thanks a lot for your comment. I managed to solved the clang error (clang: error: unsupported option '-fopenmp') by using this command: |
I got below error by running devtools::install_github('velocyto-team/velocyto.R') in R /usr/local/clang6/bin/clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/hdf5/1.10.4/include -I/usr/local/opt/szip/include -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I/usr/local/include -fPIC -Wall -g -O2 -c Attribute.cpp -o Attribute.o
I have MacOS Mojave 10.12.1 and XCode 10.1 and R version 3.5.1 |
@reza627 what command line tools (CLT) version do you have? It could be as easy as it is not up to date with your XCode 10.1. I would say it is probably that you upgraded to Mojave but haven't upgraded both XCode and CLT so they both are incompatible with eachother. To see your CLT version just run in terminal: |
@tractatus thanks for your response. I don't know still I should update CLT or not. If so, how can I update it? |
I'm was having similar problems. Combining answers here with answers from a few other places, here's something that worked for me on OS X 10.13.6:
I was prompted repeatedly to install Java, so I installed a JDK and JRE. at this point, I could run One note: when I run that notebook via
Obviously this looks like a loompy problem, not a velocyto problem, but I didn't figure out how to make it go away despite all of my googling. |
When I was trying |
@tractatus
|
@EDYAC the error states you havent installed or compiled binaries of clang. If you uncertain what that means I would recommend the following instead: |
@tractatus
Do you know what is that? |
@tractatus |
Maybe taka a look at the last item on this FAQ could help: |
"brew install hdf5" would work fine now. Although I still met error for "devtools::install_github('velocyto-team/velocyto.R')" But now I can install "devtools::install_github("nolanlab/Rclusterpp")" and spade tree as what I want. p.s.: I was redirected from nolanlab/spade#137 |
Perhaps not a direct answer to this question, but a solution for anyone struggling to install with gcc-8 or similar on macOS. Assuming gcc-8 and g++-8 are on your path, you will need to install the boost libraries (however you choose -- I used conda) and then copy/link them over to
I was able to fix the |
the original solution also works for clang6, just replace clang4 -> clang6 |
There's a related solution here: https://github.com/kharchenkolab/conos/wiki/Installing-Conos-for-Mac-OS |
Installation Error:
Session info:
Any advice would be appreciated.
The text was updated successfully, but these errors were encountered: