Skip to content

Build-Script: FreeBSD Package Preset #83159

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

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

etcwilde
Copy link
Member

Adding a preset for building the FreeBSD toolchain and runtime package. This is very similar to the Linux package build, but the main difference is the lack of WASM build. The WASM runtime build system uses GNU extensions in its makefiles that are not compatible with the make or gmake on FreeBSD and therefore cannot be built there.

Adding a preset for building the FreeBSD toolchain and runtime package.
This is very similar to the Linux package build, but the main difference
is the lack of WASM build. The WASM runtime build system uses GNU
extensions in its makefiles that are not compatible with the make or
gmake on FreeBSD and therefore cannot be built there.
@etcwilde etcwilde requested a review from shahmishal July 17, 2025 22:19
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde
Copy link
Member Author

preset=freebsd_package
@swift-ci Please test with preset Linux Platform

@etcwilde etcwilde added the FreeBSD Platform: FreeBSD label Jul 17, 2025
@etcwilde etcwilde self-assigned this Jul 17, 2025
@etcwilde etcwilde moved this to In Progress in Swift on FreeBSD Jul 17, 2025
@etcwilde
Copy link
Member Author

The preset test failure is:

[2025-07-17T23:17:57.960Z] /usr/bin/ld: /tmp/lit-tmp-_jhxz0v8/Library-db3eab.o: relocation R_X86_64_PC32 against protected symbol `$s7Library17UnavailableStructVMa' can not be used when making a shared object
[2025-07-17T23:17:57.960Z] /usr/bin/ld: final link failed: bad value
[2025-07-17T23:17:57.960Z] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[2025-07-17T23:17:57.960Z] <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

This is because the bfd linker that the preset is defaulting to on Ubuntu 20.04 is too old to support the relocations that Swift emits. This preset is not intended to run on Linux (though it should work on newer versions of bfd or versions that default /usr/bin/ld to lld), but on FreeBSD, which uses lld as the default linker.

@etcwilde etcwilde merged commit b97df26 into swiftlang:main Jul 18, 2025
3 of 4 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Swift on FreeBSD Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FreeBSD Platform: FreeBSD
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants