cage1016 / alfred-paletter

Extract palette from an image
MIT License
14 stars 0 forks source link

Script Filter error #1

Open itsbrex opened 1 year ago

itsbrex commented 1 year ago

Hey, getting this error on macOS 13.0 (22A380)

[22:06:27.539] ERROR: Paletter[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON:
2022/11/15 22:06:27 /Users/runner/work/alfred-paletter/alfred-paletter/sqlite/init.go:17
[error] failed to initialize database, got error Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Any ideas?

cage1016 commented 1 year ago

https://github.com/cage1016/alfred-paletter/blob/6199cf2f925c3471b2ea753569e1f4a1408e3765/.github/workflows/release.yml#L31-L32

as error mentioned that go-sqlite3 requires cgo to work and need to setup CGO_ENABLED=1

As you provide that error on macOS 13.0 (22A380). What CPU type do your Mac have? Intel or Arm?

itsbrex commented 1 year ago

Apple M1 Max macOS 13.0 (22A380) 64 GB 10 cores arm64

what were you referencing here btw? I'm new to go, so not sure what you were showing me here. 🤐 https://github.com/cage1016/alfred-paletter/blob/6199cf2f925c3471b2ea753569e1f4a1408e3765/.github/workflows/release.yml#L31-L32

CGO_ENABLED=1 is enabled it looks like, but.

output from `$ go env` ``` GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/hack/Library/Caches/go-build" GOENV="/Users/hack/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/hack/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/hack/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/opt/homebrew/Cellar/go/1.19.3/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/opt/homebrew/Cellar/go/1.19.3/libexec/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.19.3" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/1z/fy3mkm1s5zq_3khylnp9s94h0000gn/T/go-build3482035564=/tmp/go-build -gno-record-gcc-switches -fno-common" ```
cage1016 commented 1 year ago

I will manual build another version with CGO_ENABLED=1 and give another try

cage1016 commented 1 year ago

@itsbrex Please visit Release v1.2.0 RC 1 Pre release and download and have a try

learn2reid commented 5 months ago

this worked for me thank you! also incredible workflow! great job!