Giter Site home page Giter Site logo

Build fails on Apple Silicon about zk HOT 7 CLOSED

zk-org avatar zk-org commented on May 12, 2024
Build fails on Apple Silicon

from zk.

Comments (7)

mickael-menu avatar mickael-menu commented on May 12, 2024 1

@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.

from zk.

mickael-menu avatar mickael-menu commented on May 12, 2024

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 πŸ‘

from zk.

mhanberg avatar mhanberg commented on May 12, 2024

from zk.

mickael-menu avatar mickael-menu commented on May 12, 2024

Ha, not a good sign! I found this too from there mattn/go-sqlite3#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

from zk.

mickael-menu avatar mickael-menu commented on May 12, 2024

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

from zk.

danymat avatar danymat commented on May 12, 2024

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

from zk.

danymat avatar danymat commented on May 12, 2024

Right, thanks a lot !

from zk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.