-
Notifications
You must be signed in to change notification settings - Fork 38
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
gcc 12.2 build with patches for M1 #928
Conversation
Game for moving things from gcc11 to gcc12, but rmods will be difficult since r-base itself hardcodes the used gcc version and that then propagates to the rmods. For this:
|
Also, why did a bunch of other pkgs get added here (like glib2)? And help2man is now using the token |
Those are all [B]Deps that require patching, or in some cases, updates to a newer upstream, to build on arm64.
Yes,
Even if the 'system' architecture could be fixed next, I am not sure if this is the preferable choice, as there seem to be just as many packages that can handle Pushed 11.3 as well, but I have not tried to build any r-base so far. |
I'll by fixing my branch for M processors soonish, I have an M1 with macOS 13 on it ready, just need time |
I cherry picked the gcc11/12 specific commits since they're the lowest packages and this way they don't wait on the other stuff being completed. |
Latest gcc11 update changes some dyld linking among lib/lib*.dylib in a way that breaks previously-compiled binaries at runtime ([Fink-users] dyld: Library not loaded: @rpath/libgcc_s.1.1.dylib). For example, whereas gcc11-11.3.0-1 gave me:
gcc11-11.3.0-2 gave me:
|
Yes, those are the iains-gcc patches now setting Also I had added the patched gcc11 version due to the difficulties getting r-base to use gcc12; however so far I was unable to build 11.3 on 13.1 (neither for x86_64/Rosetta not arm64). So perhaps we should just stick with gcc12 now. |
Hopefully fixed all relative dylib paths now, and this should resolve #934 as well. |
The
Modify the
|
Doh, should have sticked to the wildcard expression! |
Pushed the new gccNN changes for rpath. That should deal with #934. |
libffi bumped SOVERSION after our 3.2.1, so we'll need a new libN for it (libffi8). We can't just bump the version and change the library name like in 33d1a6e. Working on a new .info for that now. ETA: pushed the new libffi8 package. Will we have to update the gcc11/12 packages to use this so that they works cleanly on ARM? |
Thanks; yes, and whatever else uses libffi6. I've built python310 and ruby26, and for those it's simply a drop-in replacement. |
I pushed those two. Thanks! |
Is libffi6 then unbuildable on ARM? |
Someone might take a shot at that assembly code, or perhaps try to force compilation without it (there are probably less-optimised C routines for all the same functionality). |
I see rubyXX back to 24 was migrated to libffi8 whereas ruby 20-23 (and cascaded dependencies on it) were instead tagged NOARM_FFI6. Do those older ruby not migrate cleanly for you? On my 10.13, ruby20 had identical build transcripts with libffi6 vs libffi8. Since I can't help with ARM, I can instead work towards killing off libffi6 altogether. |
It was mostly a matter of perl <= 23 using crazy old openssl100, so I figured it wasn't worth dragging that along and this gave another reason to stop propagating them. |
On 12.6.1/arm64 the status is
The last 2 don't seem specific to the architecture so should be testable elsewhere. |
Fixed (upstream goof in the tarball)--un-goofed it rather than hiding the message about it. It would have been an error on XCode >= 12ish on all platforms (vs only a warning on older). |
(Ambitiously trying to build emacs on M1)
Not sure if this is a solved issue on M1 systems or not. I would rather not re-invent things here since it looks like this would happen for a lot of packages.
But libid3tags does not recognize the CPU-Manufacturer-OS string that is passed to configure.sub.
The error is in running
sudo /bin/sh ./config.sub -apple-darwin21.6.0
config.sub: invalid option -apple-darwin21.6.0
Try `config.sub --help' for more information.
/bin/sh ./config.sub arm64-apple.darwin21.6.0
results in
Invalid configuration `arm64-apple-darwin21.6.0': machine `arm64-apple' not recognized
So it seems that in passing this to config.sub the creation of the CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM or the CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM is failing? What routing calls config.sub? Configure I would guess?
Any help/pointers would be great.
…-Scott
|
I finished migrating the whole dist from libffi6 to libffi8 and turned off the libffi6 headers package. Thanks everyone who worked on test-building! |
I have patched this with
which let it compile without further changes for 12.6.1. |
you like doing lots of work? Just use UpdateConfigGuess: or UpdateConfigGuessInDirs: instead of patching |
No, just copying solutions from existing packages where alternatives are not documented in https://www.finkproject.org/doc/packaging/format.php; thanks for the pointer (link to usage even more welcome). |
This PR is building the current gcc 12.2 suite (including gfortran) for
arm
[arm64
] on Monterey (tested on 12.5/12.6) using the patches from https://github.com/iains/gcc-12-branch/releases/tag/gcc-12.2-darwin-r0 as collected in the Homebrew patch https://github.com/Homebrew/formula-patches/blob/master/gcc/gcc-12.2-arm.diff .Since there is no settled architecture setup for Apple Silicon or even an official install path on macOS 11 or later, this is necessarily experimental, but tested on 12.5/12.6 both for
arm64
andx86_64
(under Rosetta) and on 10.14 with the same patches. Note that I have omitted the original PatchFiles0-3 here as gcc built on all archs without them, but if they are still required for older systems, it should still be possible to include them.Equivalent patches also exist for gcc 11.3, but the arm64 patches are most likely to make it into the 12.x release (the earliest), so it's probably better to build on this (and upgrade all the packages just moved to gcc11 to gcc12).
The other commits include ports or upstream updates for dependencies that don't build on arm in the current version.