FAQ
I'm working on a server in Go, and I'm building it on a 64 bit system, so I
have the option to release either 64 bit or 32 bit builds, but I was
wondering this. I have GOARCH set to amd64 in my build script. If someone
wants to compile it from source from a 32 bit machine (unlikely, but still
possible), since they wouldn't be able to compile or use 64-bit binaries,
would it automatically fall back to a 32 bit build without throwing errors?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Minux at Jan 10, 2015 at 11:00 pm

    On Sat, Jan 10, 2015 at 1:58 AM, Josh Merrell wrote:

    I'm working on a server in Go, and I'm building it on a 64 bit system, so
    I have the option to release either 64 bit or 32 bit builds, but I was
    wondering this. I have GOARCH set to amd64 in my build script. If someone
    wants to compile it from source from a 32 bit machine (unlikely, but still
    possible), since they wouldn't be able to compile or use 64-bit binaries,
    would it automatically fall back to a 32 bit build without throwing errors?
    I guess they will get this message:
    go build runtime: linux/amd64 must be bootstrapped using make.bash

    if the user has explicitly set GOARCH, go will obey the order, and won't
    change it behind
    the user's back.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.
  • Dave Cheney at Jan 11, 2015 at 12:46 am
    I don't think you need to do anything extra here, proving your code either
    uses fixed width integers everywhere (ie, int32, rather than int, etc), or
    you have tested your code on both platforms to ensure large shifts (ie
    int32 << 40) don't occur.
    On Saturday, 10 January 2015 17:58:59 UTC+11, Josh Merrell wrote:

    I'm working on a server in Go, and I'm building it on a 64 bit system, so
    I have the option to release either 64 bit or 32 bit builds, but I was
    wondering this. I have GOARCH set to amd64 in my build script. If someone
    wants to compile it from source from a 32 bit machine (unlikely, but still
    possible), since they wouldn't be able to compile or use 64-bit binaries,
    would it automatically fall back to a 32 bit build without throwing errors?
    If they have Go installed on that machine, they just do go get
    $YOURPACKAGE, and it will be compiled using the native platform of whatever
    Go version they have installed.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 10, '15 at 3:36p
activeJan 11, '15 at 12:46a
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2023 Grokbase