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

Problem Installing Version 3.18.0 - clang: error: the clang compiler does not support '-march=native' #68

Open
MedSciMay opened this issue Dec 5, 2022 · 2 comments

Comments

@MedSciMay
Copy link

The most recent Version 3.18.0 fails to install on my computer. Version 3.15.2 installs correctly.

I think this may be due to a C++ compiling error on Mac with M1 Pro chip.
See: https://stackoverflow.com/questions/65966969/why-does-march-native-not-work-on-apple-m1

Is there any way to change the clang version used when compiling CoGAPS?

My apologies in advance if I'm not using computing terms correctly! I'm new to CompBio.

Thanks!

Old packages: 'CoGAPS'
Update all/some/none? [a/s/n]: 
a
Package which is only available in source form, and may need
  compilation of C/C++/Fortran: ‘CoGAPS’
Do you want to attempt to install these from sources? (Yes/no/cancel) yes
installing the source package ‘CoGAPS’

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/CoGAPS_3.18.0.tar.gz'
Content type 'application/x-gzip' length 20839969 bytes (19.9 MB)
==================================================
downloaded 19.9 MB

* installing *source* package ‘CoGAPS’ ...
** using staged installation
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ -arch arm64 -std=gnu++14 accepts -g... yes
checking how to run the C++ preprocessor... clang++ -arch arm64 -std=gnu++14 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether clang++ -arch arm64 -std=gnu++14 accepts -g... (cached) yes
./configure: line 2752: AX_COMPILER_VENDOR: command not found
./configure: line 2753: AX_COMPILER_VERSION: command not found
./configure: line 2764: AX_OPENMP: command not found
building on  compiler version 
Using AVX instructions if available
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=0 -DGAPS_DISABLE_CHECKPOINTS -D__GAPS_R_BUILD__ -Iinclude -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include' -I/opt/R/arm64/include  -march=native  -fPIC  -falign-functions=64 -Wall -g -O2  -c Cogaps.cpp -o Cogaps.o
clang: error: the clang compiler does not support '-march=native'
make: *** [Cogaps.o] Error 1
ERROR: compilation failed for package ‘CoGAPS’
@jeanettejohnson
Copy link
Collaborator

Hello, thanks for this report and looking into it now. I think I need to regenerate the config script used to compile the C.

@jeanettejohnson
Copy link
Collaborator

pushed a fix-- should be able to install now using
devtools::install_github("FertigLab/CoGAPS", force=TRUE)

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