Code Monkey home page Code Monkey logo

Comments (9)

errm avatar errm commented on August 20, 2024 1

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.

mitchellh avatar mitchellh commented on August 20, 2024 1

Done, please let me know if that helps.

from gox.

danesparza avatar danesparza commented on August 20, 2024

Isn't that issue addressed here?

from gox.

leonsodhi avatar leonsodhi commented on August 20, 2024

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.

mitchellh avatar mitchellh commented on August 20, 2024

This makes sense to me. Done.

from gox.

leonsodhi avatar leonsodhi commented on August 20, 2024

Thanks @mitchellh!

from gox.

danesparza avatar danesparza commented on August 20, 2024

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.

mitchellh avatar mitchellh commented on August 20, 2024

Ouch I tested this on my own builds with cgo and it worked but let me add the arch check too!

from gox.

danesparza avatar danesparza commented on August 20, 2024

@mitchellh Works for me again now. Thanks for the fix!

from gox.

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.