Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows source build needs CGO and MinGW even without Spotify

Closed Beginner friendly
#602 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

@SomSamantray is already working on this.

Since Oct 12, 2026.

  • #620 by @SomSamantray — open

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

  1. On Windows with no C compiler on PATH, run go build -o cliamp.exe . on main.

  2. 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 !cgo instead of windows, so CGO_ENABLED=0 go build works 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bjarneo/cliamp

All issues in bjarneo/cliamp

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.