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

Updated FreeBSD from 13.2 to 13.4 / 14.1 #10402

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

stemann
Copy link
Contributor

@stemann stemann commented Feb 2, 2025

Enables better C++-17 support.

E.g. for MLX, which ran into error: constexpr variable cannot have non-literal type 'const std::array<uint32_t, 8>' (aka 'const array<unsigned int, 8>') with the FreeBSD 13.2 libc++ SDK in #10374 - which could be remedied by using FreeBSD 13.4 instead of 13.2: cea8b97

How to use another FreeBSD SDK for a CMake-based build:

sources = [
    ArchiveSource("http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/arm64/13.4-RELEASE/base.txz",
                  "730f4d4d850fa96263a874340d84a2f0575cb917fc035359ae34823cae56c809";
                  unpack_target="freebsd-base-aarch64"),
    ArchiveSource("http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/amd64/13.4-RELEASE/base.txz",
                  "8e13b0a93daba349b8d28ad246d7beb327659b2ef4fe44d89f447392daec5a7c";
                  unpack_target="freebsd-base-x86_64"),
]

script = raw"""
if [[ "$target" == *-unknown-freebsd* ]]; then
    sdk_root=$WORKSPACE/srcdir/freebsd-base-$(echo $target | cut -d - -f1)
    sed -i "s#/opt/$bb_target/$bb_target/sys-root#$sdk_root#" $CMAKE_TARGET_TOOLCHAIN
    sed -i "s#/opt/$bb_target/$bb_target/sys-root#$sdk_root#" /opt/bin/$bb_full_target/$target-clang*
    sed -i "s#/opt/$bb_target/$bb_target/lib#$sdk_root/usr/lib#" /opt/bin/$bb_full_target/$target-clang*
fi
"""

@giordano
Copy link
Member

giordano commented Feb 2, 2025

I think @ararslan has opinions here, probably wanted to jump to FreeBSD 14 altogether.

B/biber/build_tarballs.jl Outdated Show resolved Hide resolved
@stemann stemann force-pushed the feature/freebsd_13.4 branch from f32ab64 to bcec3ce Compare February 2, 2025 13:25
@stemann stemann changed the title Updated FreeBSD from 13.2 to 13.4 Updated FreeBSD from 13.2 to 14.2 Feb 2, 2025
@ararslan
Copy link
Member

ararslan commented Feb 3, 2025

Since FreeBSD 13 is still supported upstream, it'd be ideal if we could continue to build on 13 since binaries are forward but not backward compatible across FreeBSD versions. (The apparent exception to this is 13.2 on AArch64, as binaries built there seem not to work entirely as expected on 14+). It'd be unfortunate to completely drop support for anybody running 13 locally. If 13.4 fixes the issue then that seems like a good choice to me.

I'll need to try a 13.4 VM on AArch64 to see whether that fixes the issue we observed with MPFR not being forward compatible; we may need to go right to 14 (perhaps 14.1) on AArch64. IMO it's okay, albeit not entirely ideal, to have different system requirements on x86-64 and AArch64.

@giordano
Copy link
Member

giordano commented Feb 3, 2025

IMO it's okay, albeit not entirely ideal, to have different system requirements on x86-64 and AArch64.

That's what we do already on linux, we have different glibc versions for different architectures

@stemann stemann changed the title Updated FreeBSD from 13.2 to 14.2 Updated FreeBSD from 13.2 to 13.4 / 14.2 Feb 3, 2025
@ararslan
Copy link
Member

ararslan commented Feb 3, 2025

Okay cool, let's try 13.4 on x86-64 and 14.1 on AArch64 then.

0_RootFS/PlatformSupport/build_tarballs.jl Outdated Show resolved Hide resolved
0_RootFS/PlatformSupport/build_tarballs.jl Outdated Show resolved Hide resolved
0_RootFS/PlatformSupport/build_tarballs.jl Outdated Show resolved Hide resolved
0_RootFS/gcc_common.jl Outdated Show resolved Hide resolved
0_RootFS/gcc_sources.jl Outdated Show resolved Hide resolved
0_RootFS/gcc_sources.jl Outdated Show resolved Hide resolved
RootFS.md Outdated Show resolved Hide resolved
@stemann stemann changed the title Updated FreeBSD from 13.2 to 13.4 / 14.2 Updated FreeBSD from 13.2 to 13.4 / 14.1 Feb 3, 2025
@giordano
Copy link
Member

giordano commented Feb 3, 2025

The next question is "who's going to rebuild 22 different versions of GCC and hope nothing breaks because otherwise they'll have to deal with that?" 😉

@stemann
Copy link
Contributor Author

stemann commented Feb 3, 2025

I'm just giving FreeBSD 14.1 a spin in #10374 to see if the C++ issue is still fixed.

@stemann
Copy link
Contributor Author

stemann commented Feb 4, 2025

#10374 is happy with FreeBSD 14.1 as well :-)

@ararslan
Copy link
Member

ararslan commented Feb 4, 2025

The next question is "who's going to rebuild 22 different versions of GCC and hope nothing breaks because otherwise they'll have to deal with that?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants