Skip to content
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

Update FreeBSD versions to 13.4 on x86-64 and 14.1 on AArch64 #418

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Feb 18, 2025

Companion to JuliaPackaging/Yggdrasil#10402

To do:

  • Update PlatformSupport
    • Fix the ones renamed from previous releases so that the tarballs unpack with an appropriately named directory
  • GCC
    • All versions for FreeBSD 13.4 x86-64
    • Versions 9+ for FreeBSD 14.1 AArch64
    • Either fix 7 and 8 for FreeBSD 14.1 AArch64 for parity with current 13.2 or update the package code to use 9+
  • Remove artifacts for FreeBSD 13.2 (except older PlatformSupport) since those always seem to interfere (unless we do Consider OS version when matching artifacts to platforms #419 and it actually works)
  • Bump package version for a new release

Notably updates FreeBSD to 13.4 on x86-64 and 14.1 on AArch64.
@ararslan
Copy link
Member Author

There's one decision remaining here, and it's in regard to how we want to handle GCC.

All GCC versions built successfully for FreeBSD 13.4 on x86-64, but only 9+ built for FreeBSD 14.1 on AArch64; GCC 7 and 8 failed with a linker error. For those versions, it's complaining about an unrecognized file format for crtn.o in the sysroot, but I haven't found anything obviously amiss with that file. The file command recognizes it as a FreeBSD ELF file, and readelf can read it. My knowledge of object files is admittedly rather limited, and Google hasn't been much help regarding the error, so I'm not sure where I'd go from here for further debugging. My only guess would be that the system compiler on 14.1 (Clang 18, IIRC) is too new to build old GCC, but I'm not confident about that assessment nor would I know how to address it.

What I've implemented as a stopgap is to remove the artifacts for GCC 9+ on 13.2 AArch64 but keep the existing artifacts for 7 and 8. This means that a build preferring an earlier GCC version will actually be targeting 13.2 instead of 14.1 for any component compiled with the GCC toolchain, so OS version targets may be mixed. That shouldn't be an issue in theory, and indeed, I've been using binaries built for 13.2 on 14.1 mostly successfully. However, I did encounter an issue with MPFR that was fixed by using a native build, which suggests that the problem is with the artifact built for 13.2. Newer builds would be targeting 14.1... that is, unless they need GCC 7 or 8, I suppose.

So I guess the question is this: Which is better, what I've implemented currently and described above, or dropping GCC 7 and 8 and requiring 9+ on 14.1 AArch64? I don't have a good sense of the implications of the latter, including any potential for breakage.

@giordano
Copy link
Member

I think dropping GCC 7 and 8 is fine. Note you'll have to restrict expand_libgfortran to v5 for this platform (as we do already for aarch64-darwin and riscv64)

We were able to build GCC 7 and 8 on FreeBSD 13.2 AArch64, but neither
builds successfully with 14.1. For both 7 and 8, an error about the file
format of `crtn.o` is thrown from `collect2`/`ld`. It's unclear why
that's happening and I'm not sure I care enough to figure it out and fix
it vs. just bumping the minimum GCC version on FreeBSD AArch64 to 9.
(That is what I did.)
Some changes this release:
- Introduction of PlatformSupport v2025.2.15, now the default
- FreeBSD on x86-64 now targets FreeBSD 13.4 instead of 13.2
- FreeBSD on AArch64 now targets FreeBSD 14.1 instead of 13.2, unless
  GCC 7 or 8 is used, in which case the target is still 13.2
@ararslan ararslan marked this pull request as ready for review February 21, 2025 21:11
@ararslan ararslan requested a review from giordano February 21, 2025 21:12
@ararslan
Copy link
Member Author

Is this good to go, @giordano? Also, can you remind me whether we need to update a manifest somewhere once a new release here is registered or if the latest version gets used automatically?

@ararslan
Copy link
Member Author

Can you also remind me of the proper merge order of this and JuliaPackaging/Yggdrasil#10402?

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remind me whether we need to update a manifest somewhere once a new release here is registered or if the latest version gets used automatically?

https://github.com/JuliaPackaging/Yggdrasil/actions/workflows/update_manifest.yml

Can you also remind me of the proper merge order of this and JuliaPackaging/Yggdrasil#10402?

No particular order

@ararslan ararslan merged commit be6a14c into master Feb 25, 2025
8 checks passed
@ararslan ararslan deleted the aa/freebsd-14.1 branch February 25, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants