Closed mhanberg closed 3 years ago
This header is required by the icu
build tag, I think I forgot to mention a dependency in the installation instructions. Could you try after running this with Homebrew?
$ brew install icu4c
I will get an M1 in about two weeks for further testing π
I ran that and it appears it is already installed π
On Mar 25, 2021, at 5:34 AM, MickaΓ«l Menu @.***> wrote:
This header is required by the icu build tag, I think I forgot to mention a dependency in the installation instructions. Could you try after running this with Homebrew?
$ brew install icu4c I will get an M1 in about two weeks for further testing π
β You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mickael-menu/zk/issues/19#issuecomment-806501949, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEUEAFNARPUS46NPYZRTLTFL7RLANCNFSM4ZY6P4RQ.
Ha, not a good sign! I found this too from there https://github.com/mattn/go-sqlite3/issues/543
$ brew install icu4c
$ brew link icu4c
$ CGO_CFLAGS="-I/usr/local/opt/icu4c/include" CGO_LDFLAGS="-L/usr/local/opt/icu4c/lib" ./go build
If this doesn't work, I will probably need the M1 to try to find a workaround.
Alternatively, you may be able to build zk
with this, but some filtering options might not work properly:
$ CGO_ENABLED=1 go build -tags "fts5"
If you use a feature requiring icu, you will get this error from zk
:
zk: error: no such function: REGEXP
I just received my M1 π
So the proper command to build was:
$ brew install icu4c
$ GOARCH=arm64 CGO_CFLAGS="-I/opt/homebrew/opt/icu4c/include" CGO_LDFLAGS="-L/opt/homebrew/opt/icu4c/lib" ./go build
@mhanberg I added a new build for the latest release, if you want to check it out: zk-v0.3.0-macos-arm64.zip
Hello, as of today, it seems that doing make
on latest release can not compile:
GOARCH=arm64 CGO_CFLAGS="-I/opt/homebrew/opt/icu4c/include" CGO_LDFLAGS="-L/opt/homebrew/opt/icu4c/lib" go build -tags "fts5 icu" -ldflags "-X=main.Version=`git describe --tags --match v[0-9]* 2> /dev/null` -X=main.Build=`git rev-parse --short HEAD`"
# github.com/mickael-menu/zk
ld: warning: directory not found for option '-L/usr/local/opt/icu4c/lib'
Using the command you provided just above seems to work:
GOARCH=arm64 CGO_CFLAGS="-I/opt/homebrew/opt/icu4c/include" CGO_LDFLAGS="-L/opt/homebrew/opt/icu4c/lib" go build
@danymat The warning above is not a fatal error, I always got it on the M1 as well but it seems to run fine.
With the second command a number of features won't work, in particular anything using regexes.
Right, thanks a lot !
I was attempting to build the project to try it out and ran into this error
sqlite3-binding.c:195315:10: fatal error: 'unicode/utypes.h' file not found
.This is on an M1 Mac running macOS 11.2.3 and
go version go1.16.2 darwin/arm64
Full Log