ethereum / go-ethereum

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
47.42k stars 20.07k forks source link

Cannot run geth-linux-arm64 on Android (Samsung S7) #2854

Closed Numero7 closed 8 years ago

Numero7 commented 8 years ago

System information

Geth version: geth version OS & Version: Windows/Linux/OSX Commit hash : (if develop)

Expected behaviour

After succesful compilation of geth using xgo and following instructions given there: https://github.com/ethereum/go-ethereum/wiki/Ethereum-on-Android https://github.com/ethereum/go-ethereum/wiki/Cross-compiling-Ethereum

I would be expecting geth to run on my Android phone Samsung Edge S7 with Android 6.0.1 and arm64 CPU

Actual behaviour

When running the executable compiled with xgo I got the error "/system/bin/sh: ./geth-linux-arm64: No such file or directory"

Steps to reproduce the behaviour

boot2docker init boot2docker up eval "$(boot2docker shellinit)"

cd go-ethereum make geth-linux-arm64 -> output below

adb push build/bin/geth-linux-arm64 /data/local/tmp/geth-linux-arm64

adb shell cd /data/local/tmp/ chmod 751 geth-linux-arm64 ./geth-linux-arm64 /system/bin/sh: ./geth-linux-arm64: No such file or directory

Backtrace

* Result of ndk-depends ****

ndk-depends build/bin/geth-linux-arm64 WARNING: Could not find library: libpthread.so.0 WARNING: Could not find library: libc.so.6 WARNING: Could not find library: ld-linux-aarch64.so.1 geth-linux-arm64 libpthread.so.0 libc.so.6 ld-linux-aarch64.so.1

**** Result of compilation *****

build/env.sh go get github.com/karalabe/xgo build/env.sh build/bin/xgo --go=latest --dest=build/bin --targets=linux/arm64 -v -ldflags '-X main.gitCommit=5f55d95aea433ef97c48ae927835d833772350de' ./cmd/geth Checking docker installation... Client: Version: 1.11.2 API version: 1.23 Go version: go1.6.2 Git commit: b9f10c9 Built: Thu Jun 2 03:53:12 UTC 2016 OS/Arch: darwin/amd64

Server: Version: 1.11.2 API version: 1.23 Go version: go1.5.4 Git commit: b9f10c9 Built: Wed Jun 1 21:20:08 2016 OS/Arch: linux/amd64

Checking for required docker image karalabe/xgo-latest... found. Cross compiling github.com/ethereum/go-ethereum/cmd/geth... Building locally github.com/ethereum/go-ethereum/cmd/geth... Compiling for linux/arm64... github.com/ethereum/go-ethereum/common github.com/ethereum/go-ethereum/crypto/randentropy github.com/ethereum/go-ethereum/crypto/sha3 github.com/ethereum/go-ethereum/rlp github.com/ethereum/go-ethereum/crypto/secp256k1 golang.org/x/crypto/ripemd160 github.com/ethereum/go-ethereum/logger/glog github.com/ethereum/go-ethereum/logger github.com/ethereum/go-ethereum/params github.com/hashicorp/golang-lru/simplelru github.com/rcrowley/go-metrics github.com/hashicorp/golang-lru github.com/syndtr/goleveldb/leveldb/util github.com/syndtr/goleveldb/leveldb/comparer github.com/golang/snappy github.com/syndtr/goleveldb/leveldb/cache github.com/syndtr/goleveldb/leveldb/storage github.com/syndtr/goleveldb/leveldb/filter github.com/syndtr/goleveldb/leveldb/opt gopkg.in/karalabe/cookiejar.v2/collections/prque github.com/pborman/uuid github.com/syndtr/goleveldb/leveldb/errors github.com/syndtr/goleveldb/leveldb/iterator github.com/syndtr/goleveldb/leveldb/journal golang.org/x/crypto/pbkdf2 golang.org/x/crypto/scrypt github.com/syndtr/goleveldb/leveldb/memdb github.com/ethereum/go-ethereum/metrics github.com/syndtr/goleveldb/leveldb/table github.com/ethereum/go-ethereum/event gopkg.in/fatih/set.v0 github.com/rs/cors golang.org/x/net/context golang.org/x/net/websocket github.com/syndtr/goleveldb/leveldb gopkg.in/urfave/cli.v1 github.com/ethereum/go-ethereum/rpc github.com/ethereum/go-ethereum/internal/debug github.com/huin/goupnp/httpu github.com/huin/goupnp/scpd github.com/huin/goupnp/soap github.com/huin/goupnp/ssdp github.com/ethereum/go-ethereum/ethdb golang.org/x/net/html/atom golang.org/x/net/html golang.org/x/text/encoding/internal/identifier golang.org/x/text/transform golang.org/x/text/internal/utf8internal golang.org/x/text/internal/tag golang.org/x/text/language golang.org/x/text/encoding golang.org/x/text/encoding/internal golang.org/x/text/encoding/charmap golang.org/x/text/encoding/japanese golang.org/x/text/encoding/korean golang.org/x/text/encoding/simplifiedchinese golang.org/x/text/encoding/traditionalchinese golang.org/x/text/runes golang.org/x/text/encoding/unicode github.com/jackpal/gateway golang.org/x/tools/go/ast/astutil github.com/jackpal/go-nat-pmp github.com/ethereum/go-ethereum/event/filter github.com/mattn/go-colorable github.com/mattn/go-isatty github.com/fatih/color golang.org/x/tools/imports golang.org/x/text/encoding/htmlindex github.com/robertkrimen/otto/file golang.org/x/net/html/charset github.com/robertkrimen/otto/token github.com/robertkrimen/otto/ast github.com/huin/goupnp github.com/robertkrimen/otto/dbg github.com/huin/goupnp/dcps/internetgateway1 github.com/huin/goupnp/dcps/internetgateway2 github.com/robertkrimen/otto/parser github.com/robertkrimen/otto/registry github.com/ethereum/go-ethereum/internal/web3ext github.com/peterh/liner github.com/ethereum/go-ethereum/p2p/nat github.com/mattn/go-runewidth github.com/robertkrimen/otto github.com/nsf/termbox-go github.com/ethereum/go-ethereum/crypto/ecies github.com/gizak/termui github.com/ethereum/go-ethereum/crypto github.com/ethereum/go-ethereum/core/vm github.com/ethereum/go-ethereum/trie github.com/ethereum/go-ethereum/accounts github.com/ethereum/go-ethereum/common/compiler github.com/ethereum/go-ethereum/common/httpclient github.com/ethereum/go-ethereum/common/registrar github.com/ethereum/go-ethereum/p2p/discover github.com/ethereum/go-ethereum/core/types github.com/ethereum/go-ethereum/core/state github.com/ethereum/go-ethereum/pow github.com/ethereum/go-ethereum/eth/downloader github.com/ethereum/ethash github.com/ethereum/go-ethereum/core github.com/ethereum/go-ethereum/p2p github.com/ethereum/go-ethereum/accounts/abi github.com/ethereum/go-ethereum/accounts/abi/bind github.com/ethereum/go-ethereum/common/registrar/ethreg github.com/ethereum/go-ethereum/eth/fetcher github.com/ethereum/go-ethereum/eth/filters github.com/ethereum/go-ethereum/node github.com/ethereum/go-ethereum/whisper github.com/ethereum/go-ethereum/internal/jsre github.com/ethereum/go-ethereum/miner github.com/ethereum/go-ethereum/console github.com/ethereum/go-ethereum/eth github.com/ethereum/go-ethereum/release github.com/ethereum/go-ethereum/cmd/utils github.com/ethereum/go-ethereum/cmd/geth

github.com/ethereum/go-ethereum/cmd/geth

HEADER = -H5 -T0x11000 -D0x0 -R0x10000 searching for runtime.a in $WORK/runtime.a searching for runtime.a in /ext-go/1/pkg/linux_arm64/runtime.a searching for runtime.a in /ext-go/2/pkg/linux_arm64/runtime.a searching for runtime.a in /usr/local/go/pkg/linux_arm64/runtime.a 0.00 deadcode 0.17 pclntab=3021502 bytes, funcdata total 1254816 bytes 0.23 dodata 0.58 reloc 0.65 asmb 0.91 datblk 0.93 sym 0.93 elfsym 0.99 symsize = 571656 1.01 symsize = 572856 1.01 dwarf 1.14 symsize = 572856 1.83 dwarf pass 2. 2.28 header host link: "aarch64-linux-gnu-gcc-5" "-gdwarf-2" "-o" "/tmp/go-build895744756/github.com/ethereum/go-ethereum/cmd/geth/_obj/exe/a.out" "-rdynamic" "/tmp/go-link-565175301/go.o" "/tmp/go-link-565175301/000000.o" "/tmp/go-link-565175301/000001.o" "/tmp/go-link-565175301/000002.o" "/tmp/go-link-565175301/000003.o" "/tmp/go-link-565175301/000004.o" "/tmp/go-link-565175301/000005.o" "-g" "-O2" "-g" "-O2" "-lm" "-g" "-O2" "-lpthread" "-g" "-O2" "-g" "-O2" "-g" "-O2" 2.59 cpu time 413110 symbols 900984 liveness data Cleaning up build environment... Linux ARM64 cross compilation done: -rwxr-xr-x 1 gimbert staff 29045944 22 jul 15:15 build/bin/geth-linux-arm64

Numero7 commented 8 years ago

Meanwhile I tried with

./build/env.sh xgo --go=latest --dest=build/bin -v --targets=android-23/arm64 ./cmd/geth

and it seems to work fine. Thanks