Comments (9)
This seems to have broken builds for different architectures on the same platform...
e.g. https://travis-ci.org/containous/traefik/builds/127956964
from gox.
Done, please let me know if that helps.
from gox.
Isn't that issue addressed here?
from gox.
Sort of. This is the Makefile I'm working with, and you can see that the -cgo
flag has been specified for each platform. The problem is that compiling a Linux build on OS X will result in the final binary depending on OS X libs, and thus it fails to execute. If I don't specify -cgo
, the built Linux binary works fine but the darwin build fails as it makes use of a C lib.
Given that there's no harm (at least, AFAIK) in allowing the use of C libraries when you're building for the platform that you're running on, -cgo
shouldn't be needed and nor should CGO_ENABLED
. This seems to be the way Go's own build tool works, and you can see that reflected in this comment:
// cgo must be explicitly enabled for cross compilation builds
from gox.
This makes sense to me. Done.
from gox.
Thanks @mitchellh!
from gox.
I have to agree with @errm. I'm not sure why, but this breaks the linux 386 and ARM builds when running on my linux-based CircleCI build container. No other platforms seem to be affected. I forked the code, rolled back just this change, and used the forked version of gox and it seems to work just fine. 😖
from gox.
Ouch I tested this on my own builds with cgo and it worked but let me add the arch check too!
from gox.
@mitchellh Works for me again now. Thanks for the fix!
from gox.
Related Issues (20)
- Cross compilation issues on linux-s390x
- Could you please add arm64 for extra option for arm64? HOT 2
- Can't install gox in Ubuntu: 'gox' is currently not installed HOT 1
- Go1.15 deprecates 32-bit macOS builds HOT 4
- Compiling darwin/amd64: syscall_syscallX redeclared in this block HOT 1
- Support for riscv64 HOT 5
- Go 1.16 darwin/arm HOT 1
- Support for AIX/ppc64 HOT 2
- Support for WASM
- Many tuples missing
- gox silently ignores unregistered targets HOT 1
- gox erroring out for linux and windows amd64 HOT 2
- don't silently ignore unknown targets
- Support for gccgo
- support for -trimpath HOT 1
- # gox -h -bash: gox: command not found
- Support for go1.19 and linux/loong64
- Tag a new release HOT 1
- Want to support pure transparent mode
- Project Status?
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 gox.