1

I have a question regarding building geth executable from source code .

I am able to create the geth executable for windows and linux machines , both 64 bit systems.

How can i create the geth executable for the windows and linux 32 bit systems on my 64 bit machines ?

  • What error are you getting during the build? – Ajay Jun 6 '17 at 15:54
  • My feeling is that this question should live on the GitHub. – Mars Robertson Jun 6 '17 at 16:06
1

This is really just a general architecture-related/cross-compilation question, rather than an Ethereum-specific one.

Your 64-bit machines will attempt to build 64-bit binaries by default, so you need to tell them not to.

Without going into lots of detail here, have a look at the following Stack Overflow threads. (Note that these are Linux-only, so you'll need to poke around for Windows equivalents.)

For 32-bit Go compilation:

For 32-bit C compilation:

Having said all this, if you're building 32-bit binaries, which you plan to run on 32-bit machines, then it might be easier just to get access to those machines and build there...

Also note that 32-bit vanilla binaries are available from the official Downloads page, so if you're not making any code changes, it would be easier just to download the pre-built binaries. (I'll assume you are making code changes.)

| improve this answer | |
0

For build of Geth on the Ubuntu 64 bit system you can proceed as below ( https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu )

Clone the repository to a directory of your choosing:

  • git clone https://github.com/ethereum/go-ethereum

  • Install latest distribution of Go (v1.7) if you don't have it already:

    (procedure for go-lang installation https://github.com/ethereum/go- ethereum/wiki/Installing-Go#ubuntu-1404)

  • Building geth requires Go and C compilers to be installed:

    sudo apt-get install -y build-essential golang

  • Finally, build the geth program using the following command.

    cd go-ethereum

    make geth ( or run make all to build every thing )

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.