[MacPorts] #72657: For heavens sake, how to compile gcc15 on Apple Silicon ( not available in macports yet)
MacPorts
noreply at macports.org
Fri Jun 27 21:50:45 UTC 2025
#72657: For heavens sake, how to compile gcc15 on Apple Silicon ( not available in
macports yet)
-----------------------+--------------------
Reporter: Behinder | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: gcc15
Port: none |
-----------------------+--------------------
Description changed by Behinder:
Old description:
> I know gcc15 is not in macports and probably good reason, while it is in
> homebrew. Every instruction on internet include homebrew which i don't
> want to use because it does not support variants, and the team behind
> lacks manpower, and they tend to cut support for older OS very quickly.
> So that being said I tried to compile gcc15 and later integrate it with
> macports tree but failed.
>
> I am constantly getting `*** Configuration aarch64-apple-darwin23.6.0 not
> supported` errors and even i followed chatgpt suggestions ( nobody on SO
> know the answer so I needed to use AI help) it still gives me
>
> {{{
> make[2]: *** [configure-stage1-gcc] Error 1
> make[1]: *** [stage1-bubble] Error 2
> make: *** [all] Error 2
> }}}
>
> my configure command script is
> {{{
> #!/opt/local/bin/bash
> PREFIX=/opt/local
> export CC=/opt/local/bin/clang
> export CXX=/opt/local/bin/clang++
> cd build
> ../configure \
> --prefix=$PREFIX \
> --enable-versioned-jit \
> --with-ld=`which ld` \
> --disable-multilib \
> --with-mpc=${PREFIX} \
> --with-gmp=${PREFIX} \
> --with-mpfr=${PREFIX} \
> --with-mpc=${PREFIX} \
> --with-isl=${PREFIX} \
> --with-zstd=${PREFIX} \
> --enable-host-shared \
> --enable-languages=c,c++,jit \
> --with-sysroot="$(xcrun --sdk macosx --show-sdk-path)"
> }}}
> I can modify CC and CXX to inlcude true gcc instead of clang but error is
> the same. on the other hand using clang instead of gcc brings another
> errors as some flags used are incompatible.
> I mean..what the hell? why gcc14 exists in macport tree and compiles
> successfully and 15 does not. Shouldn't the source code be able to
> compile on multi platform if all prequistes are in place?
>
> I attach my config.log and config.sub. Maybe someone more experienced
> will find what is going on.
New description:
I know gcc15 is not in macports and probably good reason, while it is in
homebrew. Every instruction on internet include homebrew which i don't
want to use because it does not support variants, and the team behind
lacks manpower, and they tend to cut support for older OS very quickly. So
that being said I tried to compile gcc15 and later integrate it with
macports tree but failed.
I am constantly getting `*** Configuration aarch64-apple-darwin23.6.0 not
supported` errors and even i followed chatgpt suggestions ( nobody on SO
know the answer so I needed to use AI help) it still gives me
{{{
make[2]: *** [configure-stage1-gcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
}}}
my configure command script is
{{{
#!/opt/local/bin/bash
PREFIX=/opt/local
export CC=/opt/local/bin/clang
export CXX=/opt/local/bin/clang++
cd build
../configure \
--prefix=$PREFIX \
--enable-versioned-jit \
--with-ld=`which ld` \
--disable-multilib \
--with-mpc=${PREFIX} \
--with-gmp=${PREFIX} \
--with-mpfr=${PREFIX} \
--with-mpc=${PREFIX} \
--with-isl=${PREFIX} \
--with-zstd=${PREFIX} \
--enable-host-shared \
--enable-languages=c,c++,jit \
--with-sysroot="$(xcrun --sdk macosx --show-sdk-path)"
}}}
I can modify CC and CXX to inlcude true gcc instead of clang but error is
the same. on the other hand using clang instead of gcc brings another
errors as some flags used are incompatible.
I mean..what the hell? why gcc14 exists in macport tree and compiles
successfully and 15 does not. Shouldn't the source code be able to compile
on multi platform if all prequistes are in place?
I attach my config.log and config.sub. Maybe someone more experienced will
find what is going on. I wasted 4 days fighting with this to no result :(
--
--
Ticket URL: <https://trac.macports.org/ticket/72657#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list