Git Product home page Git Product logo

Comments (2)

kolaente avatar kolaente commented on September 7, 2024

There seem to be various (rather old) issues around this, also ones related to go:

The error suggests it's an issue with missing a missing library but since it worked before I'm not sure if thats the cause.

from xgo.

kolaente avatar kolaente commented on September 7, 2024

So far, I've tried a few things, including different go versions and checking out a working git commit of my project. None of it worked.

I then realized I messed up the xgo invocation command for darwin

The command I ran which did not work was this:

xgo -dest ./dist/binaries -tags netgo  -ldflags '-linkmode external -extldflags "-static" -X "code.vikunja.io/api/pkg/version.Version=v0.14.0+72-78b261e440" -X "main.Tags="' -targets "darwin/*"  -out vikunja-master .

Once I removed the -linkmode external -extldflags "-static" part from it, resulting in a command like this:

xgo -dest ./dist/binaries -tags netgo  -ldflags '-X "code.vikunja.io/api/pkg/version.Version=v0.14.0+72-78b261e440" -X "main.Tags="' -targets "darwin/*"  -out vikunja-master .

It worked!

I'm not 100% sure as to why that worked and the previous one didn't, but this help article seems to indicate it is not possible to create binaries for darwin with statically linked dependencies. There seems to be hacks available to make this work - maybe one day this could be incorporated into xgo.

from xgo.

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.