ChezScheme icon indicating copy to clipboard operation
ChezScheme copied to clipboard

Feature Request: Add a FreeBSD build to github workflows

Open dagit opened this issue 2 years ago • 4 comments

I was trying to build a different project that depends on chez on a freebsd machine. My package manager has chez but for some reason threading is not enabled and I need threading. So then I tried to build the latest release (9.5.6) from sources. I ran into some issues. In particular, the bootfiles for freebsd are not included in the release. I'll try to generate those on a linux machine and see if I can finish the build that way.

All of this made me wonder, would it be possible to add a freebsd build/test machine? I think this would go a long ways towards ensuring chez builds/runs on freebsd in future releases.

Just a quick search and I found this github workflow, which runs a freebsd vm on top of the macos nodes: https://github.com/vmactions/freebsd-vm

(I don't know if that workflow is very good, there may be others that are more suitable to your needs.)

Thanks.

dagit avatar Dec 06 '21 19:12 dagit

Adding a GitHub workflow probably isn't going to do you much good if what you need are the bootfiles. Adding more bootfiles to the repo is not a great solution, either, since that's already causing quite a bit of bloat in the repo size. We haven't ever come up with a really satisfactory way of dealing with that (see #203).

If you have an existing (older) working copy of Chez then I think it might be possible to build the current sources by cross-compiling from your own architecture to itself. I'm not sure exactly how (if) that works, though; someone else will have to provide some guidance there. Certainly you should be able to build the same version of the source for the threaded version of the same architecture.

(FWIW, there are a few issues that describe how to cross-compile [#7, #13, #507], but none mention using the same architecture for host and target.)

jltaylor-us avatar Dec 07 '21 00:12 jltaylor-us

Adding a GitHub workflow probably isn't going to do you much good if what you need are the bootfiles.

I know it won't help my immediate situation. My point was just that if freebsd support were tested in an automated way when macos/win/linux support is tested, then it's significantly less likely to be broken in any release.

dagit avatar Dec 07 '21 02:12 dagit

Racket's fork of Chez Scheme (https://github.com/racket/ChezScheme) can be bootstrapped using Racket, potentially starting from only a C compiler. In addition, it has a pb machine type (for "Portable Bytecode") for bootfiles that can run, albeit slowly, on any supported system, which provides many of the benefits of pre-built bootfiles without having to distribute them for every OS–architecture combination.

I'm interested in backporting some of this bootstrapping support (or just finding the right old commits) to work with the upstream variant, though it's not especially high on my to-do list.

LiberalArtist avatar Dec 08 '21 21:12 LiberalArtist

Now that pb is merged, someone might be interested in revisiting this.

mflatt avatar Nov 21 '23 22:11 mflatt