Opened 2 years ago

Closed 21 months ago

#64840 closed defect (fixed)

gcc10 fails to compile on macOS 12.3 Monterey, Xcode 13.3 on arm64 (M1 Max)

Reported by: ChristopherMayes (Christopher Mayes) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: arm64 Cc: cooljeanius (Eric Gallager)
Port: gcc10

Description

port install gcc10 fails on macOS 12.3, Xcode 13.3 on arm64 (M1 Max). gcc11 does compile.

Attachments (1)

main.log (3.0 MB) - added by ChristopherMayes (Christopher Mayes) 2 years ago.

Change History (8)

Changed 2 years ago by ChristopherMayes (Christopher Mayes)

Attachment: main.log added

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

I think that's pretty well known. Use gcc-devel (gcc12) or later on Apple Silicon.

comment:2 Changed 2 years ago by ChristopherMayes (Christopher Mayes)

Hi Ryan, thanks. After completely removing macports and reinstalling, I can install gcc-devel.

But, how do I find out that this is well-known? Are there discussions or notes somewhere?

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

I feel like there have been other tickets about it, maybe mailing list discussion. For example searching tickets for port contains gcc10 I found #64372 which is about gcc10 failing on macOS Monterey. And searching for port contains gcc and summary contains arm I found #63148 about gcc11 (and thus probably earlier versions too) being completely nonfunctional on Apple Silicon. Searching for port contains gcc and keywords contains arm64 turned up #63780 about libgcc11 failing to build on Apple Silicon.

However it would be good if the ports were modified so that they would let you know if they won't work on a particular platform.

comment:4 Changed 2 years ago by kencu (Ken)

See also https://github.com/iains/gcc-10-branch and https://github.com/iains/gcc-10-branch/issues/4 where Iain has fixed gcc10, at least, for Monterey. It says also for arm64, but I haven't verified that myself as I have no arm64 Apple system as yet.

I can't tell if there is an arm64 working branch for gcc11 there too <https://github.com/iains/gcc-11-branch>, but homebrew has gcc11 working on arm64 <https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb> so it appears possible.

comment:5 Changed 2 years ago by kencu (Ken)

Oh, we are using homebrew's gcc11 fork on arm64, so presumably that works or we would not be:

https://github.com/macports/macports-ports/blob/8de606c392730aa2e77d24f74201caa21e87166b/lang/gcc11/Portfile#L46

comment:6 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:7 Changed 21 months ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: newclosed

Now resolved.

Note: See TracTickets for help on using tickets.