iains / gcc-darwin-arm64

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

Parallel build failure: fatal error: libgcc_tm.h: No such file or directory #61

Closed ryandesign closed 2 years ago

ryandesign commented 2 years ago

Building the latest gcc source from this repo (at least up to a3a48770291014cf1a73a4d2e032fbe13c2deec6 anyway) fails intermittently with:

fatal error: libgcc_tm.h: No such file or directory

This was reported to MacPorts by three users here:

and was also experienced by the MacPorts automated build system here:

One user reported success when not using parallel building (when not using e.g. make -j8); another reported success when retrying the build without cleaning first.

I don't know if this is an upstream gcc problem or is specific to this fork, but since two of the reporters were using Apple Silicon machines (and thus this fork) and the third reporter didn't specify, I thought I'd start by reporting the problem here.

A similar problem was reported to gcc a long time ago and fixed:

iains commented 2 years ago

However - the current source [ 1cd4f4450ffbf734baf3e427f2d6e1d2e83e9c0e] needs a small patch to bootstrap.

Please wait for this weekend's rebase -- Sunday perhaps.

iains commented 2 years ago

As of https://github.com/iains/gcc-darwin-arm64/commit/fb3177f9479b0b25a3699c43bf378dd17846d733

I believe that this is OK on aarch64-darwin20/21

full disclosure: There is a latent race condition in building the new shared EH lib that shows up on powerpc-darwin9 [but I didn't manage to reproduce on any other platform] (this will be fixed in the next build cycle).

this cycle took a while - because of lack of access to hardware at the moment.

iains commented 2 years ago

is this now working for you? (a new update has been posted today, which certainly builds -j8 for me).

michaelld commented 2 years ago

I just updated gcc-devel to the latest commit, and in my testing parallel build works ... but I've only tried it twice. I left the command to disable parallel builds in place until others have had a chance to do testing.

iains commented 2 years ago

thanks, keep me posted - I've bootstrapped and tested at least half a dozen times over the last few days, and I suspect @fxcoudert has too.

michaelld commented 2 years ago

@iains FYI I re-enabled parallel builds for ARM64 gcc-devel port yesterday https://github.com/macports/macports-ports/commit/6b34373ca200cde3bc567c105969fb2e3af73925

michaelld commented 2 years ago

I'd say go ahead and close this

iains commented 2 years ago

great! thanks for letting us know