Skip to content

Fix build on FreeBSD#737

Merged
StrikerX3 merged 3 commits intoStrikerX3:mainfrom
bsdcode:fix_ci_freebsd
Jan 29, 2026
Merged

Fix build on FreeBSD#737
StrikerX3 merged 3 commits intoStrikerX3:mainfrom
bsdcode:fix_ci_freebsd

Conversation

@bsdcode
Copy link
Contributor

@bsdcode bsdcode commented Jan 29, 2026

build: fix vcpkg fetch ninja on FreeBSD

Recent vcpkg switched to using "vcpkg fetch ninja" for providing Ninja to the build. This exposed a long-standing bug in the underlying vcpkg-tool, which tried to find Ninja with an unreasonable version number on platforms without a tool download link for Ninja. This broke the Ymir build on FreeBSD.

Although this bug is already fixed in the master branch of vcpkg-tool, there isn't a tagged release with the fix yet and vcpkg itself still references the vcpkg-tool without the fix.

To unbreak the Ymir build on FreeBSD, a patch is provided which points vcpkg to the first vcpkg-tool commit containing the fix. This patch is applied in the CI and instructions are given in COMPILING.md.

References:
microsoft/vcpkg#49242
microsoft/vcpkg-tool#1897
microsoft/vcpkg-tool@9cf284d

I put the patch inside the cmake folder while I'm not sure if this is the best place. Hopefully this patch isn't needed for long and vcpkg makes a proper release with the fix included.

build: fix SDL3 build on FreeBSD

This adds the missing dependency libXtst and removes the explicit PKG_CONFIG_PATH setup. This was fixed by upstream vcpkg.

docs: remove RtMidi note on FreeBSD

Ymir's commit 51fe01b removes the need for this precaution. Ymir will now startup and initialize successfully
even if alsa-libs were installed during compilation.

Recent vcpkg switched to using "vcpkg fetch ninja" for providing Ninja
to the build. This exposed a long-standing bug in the underlying vcpkg-
tool, which tried to find Ninja with an unreasonable version number on
platforms without a tool download link for Ninja. This broke the Ymir
build on FreeBSD.

Although this bug is already fixed in the master branch of vcpkg-tool,
there isn't a tagged release with the fix yet and vcpkg itself still
references the vcpkg-tool without the fix.

To unbreak the Ymir build on FreeBSD, a patch is provided which points
vcpkg to the first vcpkg-tool commit containing the fix. This patch is
applied in the CI and instructions are given in COMPILING.md.

References:
microsoft/vcpkg#49242
microsoft/vcpkg-tool#1897
microsoft/vcpkg-tool@9cf284d
This adds the missing dependency libXtst and removes the explicit
PKG_CONFIG_PATH setup. This was fixed by upstream vcpkg.
Ymir's commit 51fe01b removes the need
for this precaution. Ymir will now startup and initialize successfully
even if alsa-libs were installed during compilation.
@StrikerX3
Copy link
Owner

Thanks! I was hoping you'd help out with this. I did take some time to try to understand the issue, but my complete lack of knowledge on FreeBSD stopped me from going further than noticing the strange version requirement for ninja and looking at vcpkg-tool for a bit.

The RtMidi workaround was implemented because Ymir stopped working under WSL, which is how I usually test the Linux version. I'm glad this also helps eliminate a workaround for the FreeBSD version, and it should also fix problems with other systems that have incomplete or broken ALSA setups.

@StrikerX3 StrikerX3 merged commit 35b3e21 into StrikerX3:main Jan 29, 2026
7 checks passed
@bsdcode bsdcode deleted the fix_ci_freebsd branch January 30, 2026 08:23
@bsdcode
Copy link
Contributor Author

bsdcode commented Jan 31, 2026

No Problem! I was also VERY confused by this version error message :)

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.

2 participants