Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build Step 12/20: /bin/sh: 1: go: Exec format error #41

Closed
zciendor opened this issue Aug 24, 2018 · 2 comments
Closed

Docker build Step 12/20: /bin/sh: 1: go: Exec format error #41

zciendor opened this issue Aug 24, 2018 · 2 comments

Comments

@zciendor
Copy link

Docker version 18.06.1-ce on armhf:

$ make all-bitcoin
rm -rf build/pkg-defs
rm -f build/*.deb
rm -f .bin-image .deb-image
make .bin-image .deb-image
make[1]: Entering directory '/opt/src/trezor/blockbook'
docker build --no-cache=false -t blockbook-build build/docker/bin
Sending build context to Docker daemon   5.12kB
Step 1/20 : FROM debian:9
 ---> b4717fbcbbda
Step 2/20 : RUN apt-get update &&     apt-get upgrade -y &&     apt-get install -y build-essential git wget pkg-config lxc-dev libzmq3-dev                        libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev                        liblz4-dev graphviz &&     apt-get clean
 ---> Using cache
 ---> 085d7047591c
Step 3/20 : ENV GOLANG_VERSION=go1.10.linux-amd64
 ---> Using cache
 ---> 92746d74b368
Step 4/20 : ENV GOPATH=/go
 ---> Using cache
 ---> ad00698b786a
Step 5/20 : ENV PATH=$PATH:$GOPATH/bin
 ---> Using cache
 ---> a1ec994aaaf3
Step 6/20 : ENV CGO_CFLAGS="-I/opt/rocksdb/include"
 ---> Using cache
 ---> 4930dba434a2
Step 7/20 : ENV CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4"
 ---> Using cache
 ---> d97fd0576e83
Step 8/20 : RUN mkdir /build
 ---> Using cache
 ---> 9677a3f86dcd
Step 9/20 : RUN cd /opt && wget https://storage.googleapis.com/golang/$GOLANG_VERSION.tar.gz &&     tar xf $GOLANG_VERSION.tar.gz
 ---> Using cache
 ---> 8c3e122d14f6
Step 10/20 : RUN ln -s /opt/go/bin/go /usr/bin/go
 ---> Using cache
 ---> c6749f8cdb99
Step 11/20 : RUN mkdir -p $GOPATH
 ---> Using cache
 ---> d2380b3be514
Step 12/20 : RUN echo -n "GO version: " && go version
 ---> Running in 72e8f2d44bb1
GO version: /bin/sh: 1: go: Exec format error
The command '/bin/sh -c echo -n "GO version: " && go version' returned a non-zero code: 2
Makefile:42: recipe for target '.bin-image' failed
make[1]: *** [.bin-image] Error 2
make[1]: Leaving directory '/opt/src/trezor/blockbook'
Makefile:38: recipe for target 'build-images' failed
make: *** [build-images] Error 2
@martinboehm
Copy link
Contributor

Sorry, for now we only support amd64 in the docker build.

It would be fairly simple to fix the docker build, however our coin configurations contain references to amd64 binaries and the generated packages would therefore be incorrect too.

You can build blockbook manually, if you follow the instructions here https://github.com/trezor/blockbook/blob/docs/docs/build.md#manual-build
You must wget go for your platform, however.

@thesoftwarejedi
Copy link

@zciendor You can change the GO version to "armv6l" instead of "amd64" on this line:
https://github.com/trezor/blockbook/blob/master/build/docker/bin/Dockerfile#L13

That should work on a Raspberry Pi or similar (if that's what you're aiming for)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants