gbdev / rgbds

Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color
https://rgbds.gbdev.io
MIT License
1.33k stars 175 forks source link

Add generic Linux x86_64 binaries to old releases #1263

Closed Moth-Tolias closed 9 months ago

Moth-Tolias commented 9 months ago

contrary to what https://rgbds.gbdev.io/install states, https://github.com/gbdev/rgbds/releases does not offer any linux binaries, 86_64 or otherwise; only macos x86-64, win32, win64, and the source code are listed.

ISSOtm commented 9 months ago

Indeed, those binaries are planned for the upcoming 0.7.0 release, and we want to make them retroactively available for previous releases as per https://github.com/gbdev/rgbds/pull/1148#pullrequestreview-1515087704, but nobody on the team has managed to find enough time for it yet.

Anyone willing to spend some time is welcome to build such binaries; please post in this thread if you need any assistance ^^

Moth-Tolias commented 9 months ago

compiled from the 0.6.1 release: rgbds.zip

ISSOtm commented 9 months ago

Thank you for your enthusiasm! However, these binaries are not statically linked:

% ldd rgbasm
./rgbasm: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by ./rgbasm)
    linux-vdso.so.1 (0x00007ffc459ca000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3532844000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3532600000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f3532a90000)

The binaries should be built with specific flags to avoid dynamically linking against as many libraries as possible (libm for RGBASM, libpng and zlib for RGBGFX), and against an old enough version of glibc for maximum compatibility. (Or, ideally, against musl libc--but that requires a fair bit of extra setup, so is not necessary).

I think the simplest workflow is to cherry-pick 168950855d4d06eb4354e781b20da65a6833763b against each of the target releases, and run the appropriate CI workflow (git tag vX.Y.Z then git push <remote> vX.Y.Z) on the forked repo. (Note that Actions must be enabled in the repo's settings, since they are disabled by default for forks.)

This is a little involved, but necessary to be compatible with as many Linux distributions as possible. Sorry!

avivace commented 9 months ago

contrary to what https://rgbds.gbdev.io/install states, https://github.com/gbdev/rgbds/releases does not offer any linux binaries, 86_64 or otherwise; only macos x86-64, win32, win64, and the source code are listed.

I am sorry, this is my fault. I pushed the updated line saying we offer the builds but I still didn't find time to upload them. I made a dockerfile running what @ISSOtm suggested: https://github.com/gbdev/rgbds/blob/master/Dockerfile

So it should be enough to cherry pick the commit / tag you want, then either run directly the commands you see in the CI or have the Dockerfile do it for you.

I will get back to this today and start attaching to the releases at least the last 2 builds

avivace commented 9 months ago

The two latest majors (0.5.2 and 0.6.1) now have linux amd64 builds attached

ISSOtm commented 9 months ago

And thank you for that! o/