tryffel / jellycli

Jellyfin terminal client
GNU General Public License v3.0
208 stars 8 forks source link

[0.9.0] Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work #19

Open Traace opened 3 years ago

Traace commented 3 years ago

Affected Version: 0.9.0 Affected Platform: Windows (at least)

Problem: Unable to run jellycli version 0.9.0. It crashes on launch. Version 0.8.1 works fine.

Error Message: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Steps to fix: Maybe its enough to set CGO_ENABLED=1 as env var before building for windows

Workaround: Use Version 0.8.1

tryffel commented 3 years ago

As a quick workaround, I somehow managed to run 0.9.0 in windows. Instructions:

  1. make sure you are connected to Jellyfin with e.g. version 0.8.0 and make sure config-file.jellycli is filled accordingly.
  2. Run 0.9.0, if it fails, edit config file and set player.enable_local_cache=False

Now jellycli 0.9.0 should work =)

I'm hoping to resolve the actual issue soon, though.

As for the actual issue, this was a problem with 0.8.1 and I disabled CGO_enabled back then (just didn't occur to users, because sqlite was added in 0.9.0): https://cloud.drone.io/tryffel/jellycli/229/2/3

I think I will have to tweak the docker runtime for goreleaser, for cross-compilation to work.

EDIT: docker environment https://github.com/x1unix/docker-go-mingw works for windows builds, but not for Linux..