Windows source build needs CGO and MinGW even without Spotify
Maintainers usually reply within 5 days
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 84/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- documentation
Research direction
Read the Windows paragraph in the README’s “Building from source” section and compare it with the existing MSYS2 steps 1–4 and the Windows configuration in CI and release.yml. Update the documentation to make clear that the toolchain is needed for every Windows source build, not just Spotify; done when the instructions match the build requirements and DLL note.
Written by the indexing model from the issue text.
Description
What happened
The Windows paragraph in "Building from source" says the core player needs no extra SDKs, and that only Spotify needs CGO and MinGW. On current main (9d9e55ab) a plain go build without a C compiler fails, because external/spotify is always imported and go-librespot's flac and mp3 packages are cgo-only.
The requirement came with #323, which removed stub_windows.go so Spotify builds on Windows. CI and release.yml already build Windows with CGO_ENABLED=1 under MSYS2, so the code is fine. Only the README sentence is out of date.
Steps to reproduce
-
On Windows with no C compiler on PATH, run
go build -o cliamp.exe .on main. -
The build stops with (same error follows for go-librespot/mp3):
package github.com/bjarneo/cliamp imports github.com/bjarneo/cliamp/external/spotify imports github.com/devgianlu/go-librespot/player imports github.com/devgianlu/go-librespot/flac: build constraints exclude all Go files in %USERPROFILE%\go\pkg\mod\github.com\devgianlu\[email protected]\flac
Expected behavior
The Windows paragraph matches what the build needs. The MSYS2 steps in the README worked for me. The exe then needs six DLLs next to it, as step 4 says: libFLAC, libmpg123-0, libvorbis-0, libvorbisenc-2, libogg-0 and libwinpthread-1.
Two possible fixes:
- Docs: say every Windows source build needs the MSYS2 toolchain, and present steps 1 to 4 as the Windows build steps rather than a Spotify extra.
- Code: bring back a Spotify stub keyed on
!cgoinstead ofwindows, soCGO_ENABLED=0 go buildworks again with Spotify left out.
Environment
- cliamp version: v2.3.0-626-g9d9e55ab (built from source)
- OS: Windows 11
- Toolchain: Go 1.27.1, MSYS2 MinGW64 gcc 16.2.0
- Provider(s) involved: Spotify (build only)
- Dominant language
- Go
- Stars
- 4.4k
- Forks
- 307
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bjarneo/cliamp
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 5 days
-
Show the Podcast episodes in newest first orderPossibly taken @lchojnack claimed this 6 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 5 days
-
No "Open YouTube Music provider" action (unlike every other provider)Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 5 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bjarneo/cliamp#520 · 2 reactions ·
Maintainers usually reply within 5 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 5 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/github-mcp-server#3581 ·
Maintainers usually reply within 2 days
-
agent-review-finding chore
Difficulty 1/5 Under an hour Newbie friendliness 85/100
jordansmall/spindrift#6033 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
hyperledger/fabric-x-common#230 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 Half a day Newbie friendliness 65/100
open-wanderer/wanderer#1443 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day