-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor GitHub CD workflow #992
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! indeed much more DRY. I didnt test it, but if you say it works on your branch then that should be fine.
Yes it is, Raspberry Pi 1 and Raspberry Pi Zero models (which are still heavily used), so would be great to keep it. Alternatively the ARMv7 binaries could be replaced with ARMv6 ones (could be called "armhf" or "arm32"), which works well due to backwards compatibility. But ARMv6 binaries are usually larger (= higher memory usage) and possibly have other minor downsides on ARMv7 capable systems, so it isn't optional, just common practice elsewhere 😉. |
That would require a bit of re-thinking, but if it is used, it should work. I'll look into it. |
Small update: I've been fighting with toolchains for a couple of days now, and supporting armv6 seems very hard. Default toolchains on recent ubuntu (20.04) is unable to build armv6/thumb-1 binaries and third party toolchains are very clunky to use (ignoring the supply chain attack vector here). In order to safely build armv6 binaries on recent ubuntu, you'll need to roll your own toolchain (yay..) or trust a third party. |
|
The packages
I'm going to do yet another attempt using bootlin's precompiled toolchains. These are for specific archs (in this case armv6/eabihf/glibc), up to date, and reasonably trustworthy. |
Here is the official toolchain: https://github.com/raspberrypi/tools |
OK, I can build a binary using a armv6 toolchain (bootlin's armv6/glibc). When I
Interesting thing is that all intermediate objects are armv6/thumb1:
Since the compiler refuses to create armv7 binaries, this makes me think it's the linker causing this issue. Maybe that is because of
So I need to think of an elegant solution to download the build/link dependencies; they probably need to be really old. |
@jonkerj "./spotifyd: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.29' not found (required by ./spotifyd)" On a PI 3 with Rasbian (Debian Buster) The same release from spotifyd repository works fine. |
It would need to be linked against an older glibc version to be compatible with older OS versions. Debian/Raspbian Buster ships v2.28, and it is the most used distro version on armhf SBCs, so this makes sense as a minimum, I'd say. Ubuntu Bionic ships glibc v2.27. |
I'm not sure if supporting first-generation RPis in our CD specifically is worth delaying the other changes here. |
Hmm maybe it wasn't clear from my comment, but this didn't work on a rapsberrypi-3 so it's not only first-gen raspberrys that will will not work with this. |
Oh huh does this actually bring back armv6 support now? |
@slondr its a little too big for me to fully review right now. If you tested it and looks look then go ahead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some testing with this PR, and it seems that it doesn't currently work as expected.
- The CD doesn't currently build, it apparently just starts a debug shell (?) on the prepared system.
full
fails for all non-x86_64
architectures.
I'll try to investigate a bit and see if I can come up with something.
I did change put that in at some point, to investigate why/how things were going bad. Very hard (at least for me) to guess what was going wrong otherwise 😆
I had that working at some point, but it has been at least half a year since I touched that. I must confess I have gotten less than motivated to finish this work, as it turns out it's very hard to reliably cross-build without a lot of DRY. It could be that it only needs some touching up, but with all these native dependencies it becomes messy/complex real quick. |
Thanks for reporting back!
I assumed that too. 😁 Obviously nothing that should be merged, though.
Yeah, it seems that it is somehow a problem with the configuration of ubuntu-20.04 that github is using? With 18.04 and 22.04 it seems to build just fine.
Totally understandable. If someone else wants to take up this PR (or I get around to it) I think we could merge it for the next release, otherwise I'd postpone that. Although the |
I take it no one's interested then? I expect I'm not the only one out there who'd happily buy a few beers/coffees for anyone who gets this over the line - aarch64 is rapidly becoming a more popular architecture, especially now that it's effectively the default for RPis. Otherwise, I'll try to find the time to look in to it myself, but I'm pretty swamped and this is not exactly my area of expertise. |
A long time ago, I started working on #653. I found it hard to find the time to improve the CD, but in the previous week I managed to finish it. The original PR has gone stale/rotten/closed so I'm filing this new one.
This PR achieves a couple of things:
spotifyd-<os>-<arch>-<type>
)There are two drawbacks I am not sure about:
I've tested this in my repo, and have a full artifact set for
v0.3.2-cd.3
.