mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #20] Help requested: building on raspbian bullseye #15
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @txoof on GitHub (Feb 23, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/20
I'm rather new to GO and trying to build go-librespot on Raspbian Bullseye. I'm a little stuck with the building and hope that someone can point me in the right direction.
I've attempted to build using the default golang package (go 1.19), but I get the message:
Unfortunately, the debian bookworm-backports 1.21 version of Go isn't available for RaspberryPi OS.
Attempting to build from go 1.22.0-linux-armv6l obtained from go.dev aborts with the message below. After some googling, I gather this has something to do with cross compiling, but I'm a bit lost as to where to start with resolving this.
Any suggestions you all can offer are greatly appreciated.
For good measure:
EDIT:
It looks like the env variable
CGO_ENABLEDis playing a part in this, but disabling it causes this:@txoof commented on GitHub (Feb 23, 2024):
I've resolved this issue, but I'm not entirely sure why it works. Can anyone explain why this works?
@devgianlu commented on GitHub (Feb 23, 2024):
Thank you for your interestin go-librespot!
The
CGO_ENABLEDflag set to1is required for building the code interfaces with the ALSA C library and therefore cannot be disabled.With
GOOSandGOARCHyou are telling the compiler which operating system and architecture to target.For additional insigth you can have a look at how the pre-made binaries are built:
github.com/devgianlu/go-librespot@0774e632a8/.github/workflows/release.yml@txoof commented on GitHub (Feb 24, 2024):
@devgianlu Thanks for that explanation. I've got it working properly now.