Comments (2)
There seem to be various (rather old) issues around this, also ones related to go:
- golang/go#6718
- http://www.cplusplus.com/forum/beginner/90152/
- https://groups.google.com/forum/#!topic/golang-dev/JKM7UaKRT6g
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.
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)
- Does not work for go1.20 HOT 3
- Correct steps to building the container manually. HOT 6
- C-shared library generated with xgo build not working for mac ARM (M1)machine HOT 2
- binary generate for mac amd64 is working on M1 chip machine and the one generated for mac arm64 is failing HOT 2
- I need to install libpcap-dev in the Images.how to operate. HOT 6
- Docker images for arm64? HOT 7
- Error with DockerVersion 24.0.5
- xgo does not find package, compilation fails HOT 2
- The compiled binary relies on GLIBC_2.28 to work correctly. HOT 3
- /build.sh: line 114: cd: /go/src/: No such file or directory HOT 2
- Add support for the headtype windowsgui HOT 4
- xgo build undefined reference to `pthread_create@GLIBC_2.34
- `-dest` permissions HOT 1
- running docker as current user conflicts with `/deps` and `/deps-build`
- Large memory footprint of ARM-7 Linux target
- How to specify a repository when moudle is turned on (windows)
- Support for Illumos HOT 1
- no matching manifest for linux/arm64/v8 in the manifest list entries
- Way to generate files that are not owned by root?
- Compiling for linux/386 fails with missing header file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xgo.