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

Release binaries do not work with sqlite3 #38

Closed
raxod502 opened this issue Jan 18, 2021 · 4 comments
Closed

Release binaries do not work with sqlite3 #38

raxod502 opened this issue Jan 18, 2021 · 4 comments

Comments

@raxod502
Copy link

Describe the bug
I get the following error from sqls when using the sqlite3 backend:

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

To Reproduce
Download https://github.com/lighttiger2505/sqls/releases/download/v0.2.6/sqls_0.2.6_Linux_x86_64.tar.gz
Use following configuration file:

connections:
  - driver: sqlite3
    dataSourceName: db.sqlite3

Expected behavior
I would expect the language server to work with sqlite3 as documented in the README rather than printing a message saying it doesn't.

Versions (please complete the following information):

  • OS Version: Ubuntu 20.10 in Docker
  • sqls Version:0.2.6, Revision:888860b
@raxod502
Copy link
Author

It seems that a binary installed via go get works fine.

@lighttiger2505
Copy link
Collaborator

Thinks for contribution.

My guess is that the c library used in go-sqlite3 does not build properly when built by goreleaser. I will try the following URL for the solution.
https://goreleaser.com/cookbooks/cgo-and-crosscompiling/

@lighttiger2505
Copy link
Collaborator

@raxod502 Fix completed. v0.2.7 and later versions will be built successfully.

@raxod502
Copy link
Author

Fantastic, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants