solo5 icon indicating copy to clipboard operation
solo5 copied to clipboard

support FreeBSD14 in hvt

Open hannesm opened this issue 1 year ago • 3 comments

The API around VM_RUN changed. With this change, all tests pass. The first commit is to avoid the clang warning:

# cc -MT hvt/hvt_main.o -MMD -MP -MF hvt/hvt_main.Td -fstack-protector-strong -Wall -Werror -std=c11 -O2 -g -I/.opam/4.13.1/.opam-switch/build/solo5.0.8.0/include -c hvt/hvt_main.c -o hvt/hvt_main.o
# hvt/hvt_main.c:156:9: error: variable 'argc1' set but not used [-Werror,-Wunused-but-set-variable]
#     int argc1 = argc;
#         ^
# 1 error generated.

I'm still dubious whether shipping releases of solo5 with -Werror is a good idea. IMHO it is nice for development, but since C compilers add new warnings in every release, it breaks the software.

FWIW, considering releases -- I'm still using the 0.7 series of solo5, and would appreciate a release in that series if possible. I have a branch (hannesm fork, FreeBSD14-0.7) that includes exactly these two patches, and it would be great to have them merged after review. If you could create a 0.7 branch (off of the v0.7.5 tag), I can open a separate PR.

hannesm avatar Jan 08 '24 00:01 hannesm

The above patches make the tests pass on my FreeBSD 14. Maybe @sg2342 is up for a review of the latter commit (I'm not a seasoned C programmer, and may have forgot stuff that should be done) -- and he has FreeBSD knowledge?

hannesm avatar Jan 08 '24 00:01 hannesm

Thanks @hannesm . I'm also in favor of removing -Werror (and dealing with every warning during the dev process).

I'd be in favour to add this to the release script, i.e. before/when building the tarball temporarily remove the -Werror.

hannesm avatar Jan 08 '24 15:01 hannesm

We probably should add a new CI for FreeBSD 14. At least, this PR looks correct for FreeBSD 12.

dinosaure avatar Jan 15 '24 15:01 dinosaure

Ok, the FreeBSD 14 was added into the CI, thanks for your patch, we are ready to cut a release. However, it seems that we have an issue with grub2-bhyve on FreeBSD14, the CI does an infinite loop. I will make an issue to track that but I decided to not test Solo5 virtio on FreeBSD 14.

dinosaure avatar Feb 28 '24 09:02 dinosaure