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

In case of SQLite3 database on Mac, it doesn't work #48

Closed
nikukyugamer opened this issue Dec 17, 2019 · 3 comments
Closed

In case of SQLite3 database on Mac, it doesn't work #48

nikukyugamer opened this issue Dec 17, 2019 · 3 comments
Assignees

Comments

@nikukyugamer
Copy link

On macOS, when the database is SQLite3, an error occurs as below.

$ ./plant_erd sqlite3 --database development.sqlite3
2019/12/17 09:45:05 Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

So I built on Ubuntu with CGO_ENABLED=1 but an error message was shown.

$ GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build
# os/user
../../../../.goenv/versions/1.13.0/src/os/user/getgrouplist_darwin.go: In function ‘mygetgrouplist’:
../../../../.goenv/versions/1.13.0/src/os/user/getgrouplist_darwin.go:16:11: warning: implicit declaration of function ‘getgrouplist’; did you mean ‘mygetgrouplist’? [-Wimplicit-function-declaration]
  int rv = getgrouplist(user, (int) group, buf, ngroups);
           ^~~~~~~~~~~~
           mygetgrouplist
# net
../../../../.goenv/versions/1.13.0/src/net/cgo_bsd.go:15:72: could not determine kind of name for C.AI_MASK

I suppose that though a cross-compile is required to build go-sqlite3 for darwin, Ubuntu cannot do cross-compile for darwin (or doing so is very difficult).

References

I referenced below articles.

Note

  • When I built on macOS, it works correcctly

Environment

macOS

Darwin XXX 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64

Ubuntu

Linux XXX 5.0.0-36-generic #39~18.04.1-Ubuntu SMP Tue Nov 12 11:09:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
@sue445
Copy link
Owner

sue445 commented Dec 17, 2019

@corselia Thank you for reporting.

I fixed at #49 and released v0.1.1.beta1.

Please check this.
https://github.com/sue445/plant_erd/releases/tag/v0.1.1.beta1

@nikukyugamer
Copy link
Author

@sue445
Thank you for early reply!
I confirmed it was fixed. I appreciate it.

And congratulations the debut in Software Design 🎉

@sue445 sue445 closed this as completed Dec 17, 2019
@sue445
Copy link
Owner

sue445 commented Dec 17, 2019

Released v0.1.1 (same to v0.1.1.beta1)

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