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-android-23-arm64 in console mode #2856

Closed Numero7 closed 7 years ago

Numero7 commented 8 years ago

System information

Geth version: Version: 1.4.10-stable Protocol Versions: [63 62] Network Id: 1 Go Version: go1.6.2 OS: android GOPATH= GOROOT=/usr/local/go

OS & Version: Android Marshmallow

Commit hash : (if develop)

Expected behaviour

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

Actual behaviour

./geth-android-23-arm64 console

returns immediately with error 1

Steps to reproduce the behaviour

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

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

adb push build/bin/geth-android-23-arm64 /data/local/tmp/geth-android-23-arm64

adb shell shell@hero2lte: cd /data/local/tmp/ shell@hero2lte: chmod 751 geth-android-23-arm64 shell@hero2lte: ./geth-android-23-arm64 console 1|shell@hero2lte:

Backtrace

Numero7 commented 8 years ago

build log: ./build/env.sh xgo --go=latest --dest=build/bin -v --targets=android-23/arm64 ./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... Assembling toolchain for android-23/arm64... Bootstrapping android-23/arm64... Compiling for android-23/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 github.com/syndtr/goleveldb/leveldb/memdb github.com/syndtr/goleveldb/leveldb/table github.com/ethereum/go-ethereum/metrics golang.org/x/crypto/scrypt github.com/ethereum/go-ethereum/event gopkg.in/fatih/set.v0 github.com/rs/cors github.com/syndtr/goleveldb/leveldb golang.org/x/net/context golang.org/x/net/websocket 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/ethereum/go-ethereum/ethdb github.com/huin/goupnp/ssdp golang.org/x/net/html/atom golang.org/x/text/encoding/internal/identifier golang.org/x/text/transform golang.org/x/net/html golang.org/x/text/internal/utf8internal golang.org/x/text/internal/tag golang.org/x/text/encoding golang.org/x/text/runes github.com/ethereum/go-ethereum/crypto/ecies golang.org/x/text/encoding/internal golang.org/x/text/language golang.org/x/text/encoding/charmap 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 golang.org/x/text/encoding/japanese golang.org/x/text/encoding/korean golang.org/x/text/encoding/simplifiedchinese github.com/ethereum/go-ethereum/core/types github.com/ethereum/go-ethereum/pow github.com/ethereum/go-ethereum/core/state github.com/ethereum/ethash golang.org/x/text/encoding/traditionalchinese golang.org/x/text/encoding/unicode github.com/jackpal/gateway github.com/jackpal/go-nat-pmp github.com/ethereum/go-ethereum/core github.com/ethereum/go-ethereum/eth/downloader golang.org/x/text/encoding/htmlindex golang.org/x/net/html/charset github.com/huin/goupnp github.com/ethereum/go-ethereum/accounts/abi github.com/huin/goupnp/dcps/internetgateway1 github.com/huin/goupnp/dcps/internetgateway2 golang.org/x/tools/go/ast/astutil github.com/ethereum/go-ethereum/event/filter github.com/mattn/go-colorable 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/miner github.com/ethereum/go-ethereum/p2p/nat golang.org/x/tools/imports github.com/ethereum/go-ethereum/p2p/discover github.com/mattn/go-isatty github.com/robertkrimen/otto/file github.com/fatih/color github.com/robertkrimen/otto/token github.com/robertkrimen/otto/dbg github.com/robertkrimen/otto/ast github.com/robertkrimen/otto/registry github.com/ethereum/go-ethereum/internal/web3ext github.com/peterh/liner github.com/robertkrimen/otto/parser github.com/ethereum/go-ethereum/p2p github.com/ethereum/go-ethereum/accounts/abi/bind github.com/mattn/go-runewidth github.com/nsf/termbox-go github.com/robertkrimen/otto github.com/gizak/termui github.com/ethereum/go-ethereum/node github.com/ethereum/go-ethereum/whisper github.com/ethereum/go-ethereum/eth github.com/ethereum/go-ethereum/release github.com/ethereum/go-ethereum/cmd/utils github.com/ethereum/go-ethereum/internal/jsre github.com/ethereum/go-ethereum/console 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/android_arm64_shared/runtime.a searching for runtime.a in /ext-go/2/pkg/android_arm64_shared/runtime.a searching for runtime.a in /usr/local/go/pkg/android_arm64_shared/runtime.a 0.00 deadcode 0.17 pclntab=3021003 bytes, funcdata total 1254268 bytes 0.22 dodata 0.55 reloc 0.62 asmb 0.90 datblk 0.92 sym 0.92 elfsym 0.95 symsize = 571776 0.98 symsize = 572928 0.98 dwarf 1.11 symsize = 572928 1.84 dwarf pass 2. 2.30 header host link: "aarch64-linux-android-gcc" "-gdwarf-2" "-pie" "-o" "/tmp/go-build137647247/github.com/ethereum/go-ethereum/cmd/geth/_obj/exe/a.out" "-rdynamic" "/tmp/go-link-862283067/go.o" "/tmp/go-link-862283067/000000.o" "/tmp/go-link-862283067/000001.o" "/tmp/go-link-862283067/000002.o" "/tmp/go-link-862283067/000003.o" "/tmp/go-link-862283067/000004.o" "-fPIE" "-llog" "-fPIE" "-lm" "-fPIE" "-llog" "-fPIE" "-fPIE" "-pie" 2.61 cpu time 413010 symbols 900480 liveness data Cleaning up build environment...

karalabe commented 8 years ago

Ah yes, this is something I've encountered too. For some reason the terminal doesn't work on the adb shell. Not sure what the reason might be, but there's not much priority on this front since we don't expect that anyone would run Geth CLI on an android device. There is an Android .aar wrapper that oyu can use as a lib in an android project. Wouldn't that be a better choice?