Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script Filter error #1

Open
itsbrex opened this issue Nov 16, 2022 · 5 comments
Open

Script Filter error #1

itsbrex opened this issue Nov 16, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@itsbrex
Copy link

itsbrex commented Nov 16, 2022

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 �[35m/Users/runner/work/alfred-paletter/alfred-paletter/sqlite/init.go:17
�[0m�[31m[error] �[0mfailed 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
Copy link
Owner

GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o exe_amd64
GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o exe_arm64

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?

@cage1016 cage1016 added the help wanted Extra attention is needed label Nov 17, 2022
@itsbrex
Copy link
Author

itsbrex commented Nov 18, 2022

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. 🤐

GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o exe_amd64
GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o exe_arm64

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
Copy link
Owner

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

@cage1016
Copy link
Owner

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

@learn2reid
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants