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

Problems building with sqlite3 #53

Closed
njhoffman opened this issue Jun 19, 2021 · 5 comments
Closed

Problems building with sqlite3 #53

njhoffman opened this issue Jun 19, 2021 · 5 comments

Comments

@njhoffman
Copy link

Hello, thank you for your work with these scripts. I encountered a couple issues when trying to build the most recent version (and same with 0.4.0).

  1. This might be more of an ubuntu/golang thing, but I initially had to do some hunting to find a missing library, it's part of icu-dev but it wants a specific version which is older and tough to find:
    ./zk: error while loading shared libraries: libicuuc.so.63: cannot open shared object file: No such file or directory Versions close to 63 seemed to be replaceable by just creating symlinks, but obviously not ideal.

  2. Once I got over that, started getting sqlite3 errors about missing the fts5 module:
    zk: error: open failed: failed to migrate the database: database migration failed: no such module: fts5
    I tried rebuilding sqlite3 (bin and go-sqlite3) with the fts5 module enabled, was able to get a successful build but still didn't fix the error, which occurs anytime trying to init or access the db file in a folder. I got this same error when trying to use the pre-built binaries.

Any idea how to get it compiled with the fts5 and icu enabled sqlite? Any chance you could release a docker image? I'll contribute to the repo once I get it running, thanks!

Ubuntu 20.10
go version go1.16.5 linux/amd64
/home/linuxbrew/.linuxbrew/Cellar/sqlite/3.35.5.reinstall (12 files, 5MB)
go-sqlite3   v1.14.7
@mickael-menu
Copy link
Member

mickael-menu commented Jun 19, 2021

Welcome Nicholas,

Unfortunately I've been mostly using macOS for the past decade so I'm not super savvy with Linux issues.

That being said, the GitHub action that is building and running the tests on the repo is based on the ubuntu-latest image. Maybe you can take a look at this environment to see if there's anything that could be missing on your machine?

Also it's important to run the build with ./go build, because the go script adds the necessary Go tags to build with ICU and FTS5 enabled.

Any chance you could release a docker image?

Yeah I think that would be really useful. Unfortunately I'm not very familiar with releasing custom Docker images, so I would welcome some direction. I've dabbled in it to generate all the zk build variants so we might already be half-way there. You can take a look at my Dockerfiles here: https://github.com/mickael-menu/zk-xcompile

@mickael-menu
Copy link
Member

I guess that would mean publishing a new repository and image like https://hub.docker.com/r/mickaelmenu/zk-xcompile? Just need to figure out the right Dockerfile.

@SevereOverfl0w
Copy link

I got this to work on my machine by building/installing with go install --tags "icu json1 fts5 secure_delete" this resolves both the libicuuc.so problem AND the fts5 problem.

@mickael-menu
Copy link
Member

Closing this issue for lack of activity.

Note that now there's a Makefile which add the necessary Go flags. Just run make install to build and install zk on your system.

@SevereOverfl0w
Copy link

The makefile did fix this for me when I had to build this on a new machine!

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

3 participants