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

[Bug] "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub" #47

Closed
catthehacker opened this issue Jul 24, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@catthehacker
Copy link

catthehacker commented Jul 24, 2019

PS C:\Users\CatTh\Development\andesite> .\andesite-v2019.07.23-3f9c6b9-windows-amd64.exe
[2019-07-24 19:43:21] Initializing Andesite...
[2019-07-24 19:43:21] Reading configuration info from C:\Users\CatTh/.config/andesite/config.json
[2019-07-24 19:43:21] Sharing private files from X:\thrash
[2019-07-24 19:43:21] Sharing public files from X:\
Error
"Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub": []
goroutine 1 [running]:
runtime/debug.Stack(0xc042004018, 0xc04207f3b8, 0x1)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xae
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x29
main.checkErr(0xa4c0c0, 0xc04204b970, 0x0, 0x0, 0x0)
        /go/src/github.com/nektro/andesite/main.go:316 +0x202
main.main()
        /go/src/github.com/nektro/andesite/main.go:140 +0x10cd
[2019-07-24 19:43:21] [error] "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub": []
goroutine 1 [running]:
runtime/debug.Stack(0xc04207f178, 0x1, 0x1)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xae
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x29
github.com/nektro/go-util/util.CheckErr(0xa4c0c0, 0xc04204b970, 0x0, 0x0, 0x0)
        /go/src/github.com/nektro/go-util/util/util.go:178 +0x192
github.com/nektro/go-util/sqlite.(*DB).Query(0xc0422144f0, 0x0, 0xc0421f0a00, 0x43, 0x1)
        /go/src/github.com/nektro/go-util/sqlite/sqlite.go:100 +0x141
github.com/nektro/go-util/sqlite.(*DB).DoesTableExist(0xc0422144f0, 0x85a410, 0x5, 0x400)
        /go/src/github.com/nektro/go-util/sqlite/sqlite.go:87 +0xde
github.com/nektro/go-util/sqlite.(*DB).CreateTable(0xc0422144f0, 0x85a410, 0x5, 0xc04207fa18, 0x2, 0x2, 0xc04207fcc8, 0x3, 0x3)
        /go/src/github.com/nektro/go-util/sqlite/sqlite.go:60 +0x64
main.main()
        /go/src/github.com/nektro/andesite/main.go:142 +0x12c9
PS C:\Users\CatTh\Development\andesite>

OS: Windows 10 1903 Professional for Workstations x64
Terminal: PowerShell 5.1

@catthehacker
Copy link
Author

Also no issues on Debian 10 so far

@nektro
Copy link
Owner

nektro commented Jul 25, 2019

Compiling with CGO_ENABLED=0 was disabled here df128e3, I'll see if there is a way to force it to build with cgo.

@nektro nektro added the bug Something isn't working label Jul 25, 2019
@nektro
Copy link
Owner

nektro commented Jul 25, 2019

https://golang.org/cmd/cgo/
The cgo tool is enabled by default for native builds on systems where it is expected to work. It is disabled by default when cross-compiling. You can control this by setting the CGO_ENABLED environment variable when running the go tool: set it to 1 to enable

Will fix this today.

@nektro nektro closed this as completed in 636656f Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants