-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How can i build source on Apple M1? #3071
Comments
As far as I know you will need a specially patched GCC , see #2814 |
I build GCC error too :< |
Can you post the error message (or attach the complete build log) here ? |
This file contains any messages produced by compilers while It was created by configure, which was $ ./configure ---------Platform.---------hostname = HuweideMBP-2.lan /usr/bin/uname -p = arm /bin/arch = unknown PATH: /Users/huwei/miniforge3/condabin -----------Core tests.-----------configure:2366: checking build system type ----------------Cache variables.----------------ac_cv_build=aarch64-apple-darwin20.2.0 -----------------Output variables.-----------------AR='' -------------------File substitutions.-------------------alphaieee_frag='' -----------confdefs.h.-----------/* confdefs.h */ configure: exit 1 |
What happens when you run |
@brada4 I do not think "gcc-darwin-arm64" exists there as an executable yet, this is an attempt to build it from source using the system compiler (for which clang 12.0.0 was reported somewhere in the configure output). |
That formatting. If clang cannot create executables then something is missing |
Please check clang works:
|
@brada4 |
So you can use clang to build BLAS and CBLAS APIs out of OpenBLAS. LAPACK components will not build without fortran. Why gcc |
https://stackoverflow.com/questions/65276102/compilation-errors-with-m1-macbook-pro-and-cmake suggests the SDKROOT variable may not be set correctly if stdio.h is not found. |
sudo ./configure --with-gmp=/opt/homebrew/Cellar/gmp/6.2.1 --with-mpfr=/opt/homebrew/Cellar/mpfr/4.1.0 --with-mpc=/opt/homebrew/Cellar/mpc/0.33 then i got this: checking for the correct version of gmp.h... yes |
It looks like you need to install the package "libmpc" from homebrew, searching for "mpc" on formulae.brew.sh tells me that what they call "mpc 0.33" is actually some music player client and not the multi-precision complex numbers library needed by gcc. |
If you don't mind using conda package manager, you can use https://github.com/conda-forge/miniforge#download and run |
Oh, great - did not know that conda already has packages for the M1. Need to update the wiki... |
You can untar those library tarballs and make unversioned symlinks inside gcc source directory. |
@martin-frbg , maybe it is a good idea to add support for nagfort. It has native M1 support. See https://www.nag.com/news/first-fortran-compiler-apple-silicon-macs |
Maybe, but probably makes less sense while I lack both the hardware and that particular compiler |
How can i build source on Apple M1?
The text was updated successfully, but these errors were encountered: