benbjohnson / postlite

Postgres wire compatible SQLite proxy.
Apache License 2.0
1.21k stars 30 forks source link

Build instructions #7

Open dazzag24 opened 2 years ago

dazzag24 commented 2 years ago

Hi,

I'm likely doing something wrong, but unable to build.

    ~/code/postlite  on   main  go install -tags vtable ./cmd/postlite                                     
    ~/code/postlite  on   main  go build                                                                    
# github.com/benbjohnson/postlite
./pg_class.go:11:79: undefined: sqlite3.VTab
./pg_class.go:54:80: undefined: sqlite3.VTab
./pg_class.go:62:40: undefined: sqlite3.VTabCursor
./pg_class.go:66:48: undefined: sqlite3.InfoConstraint
./pg_class.go:66:77: undefined: sqlite3.InfoOrderBy
./pg_class.go:66:100: undefined: sqlite3.IndexResult
./pg_database.go:11:82: undefined: sqlite3.VTab
./pg_database.go:35:83: undefined: sqlite3.VTab
./pg_database.go:43:43: undefined: sqlite3.VTabCursor
./pg_database.go:47:51: undefined: sqlite3.InfoConstraint
./pg_database.go:47:51: too many errors

Any hints appreciated.

Thannks!

benbjohnson commented 2 years ago

The go install command will install it in $GOBIN (or something like that). If you want to use go build then you'll need to use the -tags vtable there as well:

$ go build -tags vtable ./cmd/postlite

That should output a postlite binary in your current directory.

dazzag24 commented 2 years ago

Thanks