Skip to content

try fix freebsd build#3513

Merged
tobbi merged 58 commits intoSuperTux:masterfrom
1111Windows:master
Jan 30, 2026
Merged

try fix freebsd build#3513
tobbi merged 58 commits intoSuperTux:masterfrom
1111Windows:master

Conversation

@1111Windows
Copy link
Contributor

This PR attempts to fix the BSD build.

Currently, only compiling SuperTux and testing its executability have been implemented.

I found that using the -DWERROR=ON option on FreeBSD causes compilation failures, so -DWERROR is disabled.

The current issue is: compilation is too slow.

@tobbi
Copy link
Member

tobbi commented Jan 2, 2026

@1111Windows Can you push a(n empty) commit (I've re-enabled the freebsd workflow on our side and want to see how it goes).

@1111Windows
Copy link
Contributor Author

@1111Windows Can you push a(n empty) commit (I've re-enabled the freebsd workflow on our side and want to see how it goes).

I changed some content to try to upload the file after compilation. Please allow it. Thank you.

@tobbi
Copy link
Member

tobbi commented Jan 3, 2026

I've re-disabled the FreeBSD builds again because they took too long to run. I will re-enable them as soon as they pass for you on your fork's CI.

@1111Windows
Copy link
Contributor Author

After unsuccessfully trying to fix the problem myself

Maybe we should try cloning SuperTux and compiling it on a FreeBSD VM?

@tobbi
Copy link
Member

tobbi commented Jan 4, 2026

After unsuccessfully trying to fix the problem myself

Maybe we should try cloning SuperTux and compiling it on a FreeBSD VM?

I tried that using the same VM that the workflow uses:

% python anyvm.py --os freebsd

I executed the same commands as the workflow. It worked and the issue didn't occur. Feel free to try yourself.

@1111Windows
Copy link
Contributor Author

It happens to build it multiple times because of: Re-run cmake file: CMakeFiles/cmake.check_cache older than: CMakeCache.txt. I have no idea why this happens.

This issue will cause the compilation to fail when creating a release.

See https://github.com/1111Windows/supertux/actions/runs/20692953472/job/59403728228

@tobbi
Copy link
Member

tobbi commented Jan 4, 2026

It happens to build it multiple times because of: Re-run cmake file: CMakeFiles/cmake.check_cache older than: CMakeCache.txt. I have no idea why this happens.

This issue will cause the compilation to fail when creating a release.

See https://github.com/1111Windows/supertux/actions/runs/20692953472/job/59403728228

The issue is in the compile step earlier:

fatal error: file '/home/runner/work/supertux/supertux/build/CMakeFiles/supertux2.dir/cmake_pch.hxx.cxx' has been modified since the precompiled header '/home/runner/work/supertux/supertux/build/CMakeFiles/supertux2.dir/cmake_pch.hxx.pch' was built: mtime changed (was 1767530112, now 1767530182)
note: please rebuild precompiled header '/home/runner/work/supertux/supertux/build/CMakeFiles/supertux2.dir/cmake_pch.hxx.pch'

@tobbi
Copy link
Member

tobbi commented Jan 4, 2026

I noticed that changing sync from 'zfs' to 'rsync' allows compilation to succeed, but at the next step it fails to find some files:

Error: An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/supertux/supertux/build'. No such file or directory

@1111Windows
Copy link
Contributor Author

After unsuccessfully trying to fix the problem myself

Maybe we should try cloning SuperTux and compiling it on a FreeBSD VM?

I tried that using the same VM that the workflow uses:

% python anyvm.py --os freebsd

I executed the same commands as the workflow. It worked and the issue didn't occur. Feel free to try yourself.

I'm currently testing the compilation of SuperTux in another repository. Once I've finished testing, I'll submit this pull request.I'm currently testing the compilation of SuperTux in another repository. Once I've finished testing, I'll submit this pull request.

If you're interested, you can check out https://github.com/1111Windows/FreeBSD-test/

@1111Windows
Copy link
Contributor Author

For some reason, after cloning SuperTux, it started complaining about not finding physfs, even though physfs was already installed. So I gave up on the idea of cloning SuperTux inside the FreeBSD VM.

After switching from ZFS to rsync, it successfully compiled when used by release, but it couldn't find the uploaded files.

Now the compilation speed has been significantly improved.

I take back this sentence

By the way, after switching from ZFS to rsync, its compilation speed has significantly improved.

@tobbi
Copy link
Member

tobbi commented Jan 4, 2026

Can you please update the workflow file to use vmactions/freebsd-vm@v1.3.6. The freebsd vm author claims to have fixed rsync issues, following my issue report.

@tobbi
Copy link
Member

tobbi commented Jan 4, 2026

I think I got it to work. Can you do me a favour and test the artifacts?
https://github.com/SuperTux/supertux/actions/runs/20699704394

@tobbi
Copy link
Member

tobbi commented Jan 5, 2026

The 14.3 binaries in #3523 were tested by someone from the freebsd community and, apart from a library version mismatch, worked fine.

Can you cherry-pick the last 2 commits from there onto this branch?

@1111Windows
Copy link
Contributor Author

I think I got it to work. Can you do me a favour and test the artifacts?

For certain reasons, I am temporarily unable to use the FreeBSD machine.

Can you cherry-pick the last 2 commits from there onto this branch?

ok

@1111Windows
Copy link
Contributor Author

It can now upload Release builds to Release.

See https://github.com/1111Windows/supertux/releases

@tobbi
Copy link
Member

tobbi commented Jan 5, 2026

Can I mark this as ready for review?

@tobbi tobbi mentioned this pull request Jan 5, 2026
@1111Windows
Copy link
Contributor Author

Can I mark this as ready for review?

yes,you can

FreeBSD VMs are connected via SSH, and it appears that variables are not passed.
@tobbi tobbi requested a review from swagtoy January 28, 2026 06:08
Copy link
Member

@tobbi tobbi left a comment

Choose a reason for hiding this comment

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

Final approval from me.

@tobbi tobbi merged commit 8b5d4cb into SuperTux:master Jan 30, 2026
24 of 26 checks passed
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.

4 participants