iains / gcc-darwin-arm64

GCC master branch for Darwin with experimental support for Arm64. Currently GCC-15.0.0 [September 2024]
GNU General Public License v2.0
268 stars 33 forks source link

GCC 11.3 #91

Closed ilg-ul closed 2 years ago

ilg-ul commented 2 years ago

I tried a build with the just released 11.3 and the result was:

*** Configuration aarch64-apple-darwin20.6.0 not supported
make[1]: *** [Makefile:4386: configure-gcc] Error 1
make[1]: Leaving directory '/Users/ilg/Work/gcc-11.3.0-1/darwin-arm64/build/gcc-11.3.0'
make: *** [Makefile:973: all] Error 2
ilg@cloud ~ % 

It looks like it also needs patching...

iains commented 2 years ago

I will be preparing a branch with the arm64 stuff on it - it will take a few days (adding arm64 support is not a "regression fix" so is not a normal candidate for backports),

mathomp4 commented 2 years ago

@iains And maybe a 12.1 as well? 😄 Or maybe that's an @fxcoudert sort of thing.

(Just saw 12.1 was released. Now the fun time to see if our fancy Fortran breaks it!)

iains commented 2 years ago

ironically, the 12.1 release is going to be ready before the 11.3 ... too many release close together (9.5 and 10.4 are coming soon)

mathomp4 commented 2 years ago

ironically, the 12.1 release is going to be ready before the 11.3 ... too many release close together (9.5 and 10.4 are coming soon)

Thanks, though it turns out gfortran 12.1 crashes with our code (on macOS at least) while 11.3 works. Fun times trying to figure out why since it only crashes with optimization on! Grah!

iains commented 2 years ago

ironically, the 12.1 release is going to be ready before the 11.3 ... too many release close together (9.5 and 10.4 are coming soon)

Thanks, though it turns out gfortran 12.1 crashes with our code (on macOS at least) while 11.3 works. Fun times trying to figure out why since it only crashes with optimization on! Grah!

Which branch is the compiler built from? What is the platform (x86 / arm64)? and which version of the branch? could you open an issue with some debug info?

optimisation enables a lot more action in the compiler, it's not surprising to find differences - and in some cases those differences can be a crash (does the optimisation level make any difference?)

we need to fix 12.x of course :)

fxcoudert commented 2 years ago

gfortran 12.1 crashes with our code

@mathomp4 do you mean the compiler crashes, or the generated compiled code crashes?

mathomp4 commented 2 years ago

@fxcoudert @iains 12.1 crashes on Intel for me, throwing an FPE that 11.3 doesn't.

As for M1, I'm still trying to get 11.x M1 working. My M1 Macbook is vexing me. Homebrew seems to not work because I can't install in /opt/homebrew (work laptop, so I build in $HOME/.homebrew) and my attempts to build from source are being stymied by some weird Xcode issues.

fxcoudert commented 2 years ago

@mathomp4 do you mean the compiler crashes, or the generated compiled code crashes?

iains commented 2 years ago

the compiler crashes or the program built with it? (FPE is surprising for the compiler, since it's not a big user of FP).

Are you able to install to /User/Shared? (I would expect so - since that's shared)?

ilg-ul commented 2 years ago

Any progress on this?

An update to 11.3 for Arm HomeBrew would be great, since now gcc.rb is still based on 11.2.

iains commented 2 years ago

Any progress on this?

An update to 11.3 for Arm HomeBrew would be great, since now gcc.rb it is based on 11.2.

this is my recommended branch for 11.3 aarch64 darwin. https://github.com/iains/gcc-11-branch/releases/tag/gcc-11.3-darwin-r0

ilg-ul commented 2 years ago

@fxcoudert, do you think you'll find some time to prepare the archive for a new HomeBrew 11.3 release, as you did with previous releases?

fxcoudert commented 2 years ago

The new Homebrew release has been tested over the past two weeks (https://github.com/Homebrew/homebrew-core/pull/100411), but it has exposed a bug in cmake that needs to be fixed before we can ship (https://gitlab.kitware.com/cmake/cmake/-/issues/23500)

ilg-ul commented 2 years ago

If I understand those links right, they refer to 12.1. I'm not yet there, for my distribution I would need 11.3. @fxcoudert, do you plan any 11.3 update for HomeBrew?

iains commented 2 years ago

If I understand those links right, they refer to 12.1. I'm not yet there, for my distribution I would need 11.3. @fxcoudert, do you plan any 11.3 update for HomeBrew?

https://github.com/iains/gcc-11-branch/releases/tag/gcc-11.3-darwin-r0

^^ 11.3 recommended branch for darwin (including Arm64).

fxcoudert commented 2 years ago

At Homebrew we focus right now on testing and shipping GCC 12.1, then I'll deal with 11.3 after that. The link @iains gave above gcc-11-branch at tag gcc-11.3-darwin-r0 is the stable version of gcc 11.3 for darwin, which we will (and you should) use.

ilg-ul commented 2 years ago

Thank you @iains, I appreciate it.

If necessary I'll merge your branch into my fork, but I'd still prefer to directly use a ready made HomeBrew source archive, if available.

fxcoudert commented 2 years ago

@ilg-ul just to be clear, Homebrew… well… I, really… I do not produce my own branches, I just pick specific states of Iain's work. While the work was still considered experimental, I chose to value “stability” over “latest developments”, which is why I stayed on this “older” state of the port for quite some time (the one still currently in Homebrew).

Once we move past that (in a couple of days, hopefully), we will use directly Iains' branches (12.1 and 11.3) for Homebrew.

(And for the record, you can download a source archive from any commit or tag at github)

ilg-ul commented 2 years ago

Yes, I highly appreciate the work of both of you, just that, due to very limited resources, for me it is easier to follow a well established distribution, like HomeBrew, over Iain's branches and tags, which are more dynamic over time.

ilg-ul commented 2 years ago

My 11.3 release is out, with the HomeBrew patch:

I think this ticket can be closed.

iains commented 2 years ago

https://github.com/iains/gcc-11-branch/releases/tag/gcc-11.3-darwin-r2

please put any further GCC 11 issues here: https://github.com/iains/gcc-11-branch/issues