ethereum / go-ethereum

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

compile geth from go-ethereum failed: sys/poll.h: No such file or directory #14870

Closed ghost closed 7 years ago

ghost commented 7 years ago

System information

Geth version: geth version ... geth-linux-amd64-1.6.7-ab5646c5.tar.gz OS & Version: Linux Commit hash : no

Expected behaviour

to compile geth...

Actual behaviour

user1@PC1 ~/go-ethereum $ make geth build/env.sh go run build/ci.go install ./cmd/geth

/usr/local/go/bin/go install -ldflags -X main.gitCommit=ab5646c532292b51e319f290afccf6a44f874372 -v ./cmd/geth github.com/ethereum/go-ethereum/crypto/secp256k1 github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid

github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid

vendor/github.com/karalabe/hid/hid_enabled.go:22:23: fatal error: sys/poll.h: No such file or directory compilation terminated.

github.com/ethereum/go-ethereum/crypto/secp256k1

In file included from ././libsecp256k1/src/secp256k1.c:9:0, from crypto/secp256k1/secp256.go:29: ././libsecp256k1/src/util.h:14:20: fatal error: stdlib.h: No such file or directory compilation terminated. util.go:44: exit status 2 exit status 1 Makefile:15: recipe for target 'geth' failed make: *** [geth] Error 1

Steps to reproduce the behaviour

$ git clone https://github.com/ethereum/go-ethereum $ cd go-ethereum then install GoLang $ make geth

Backtrace ... ?

ghost commented 7 years ago

Issue SOLVED! I guessed it's go lang problem... I installed GoLang via another way https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu $ sudo apt-get install -y build-essential golang $ make geth

ci.go:179: You have Go version go1.6.2 ci.go:180: go-ethereum requires at least Go version 1.7 and cannot So the distro's GoLang version is not new enough... $ sudo apt-get remove build-essential golang $ make geth same as above saying Go version is 1.6.2...

$ sudo apt autoremove to remove g++ g++-5 golang-1.6 golang-1.6-doc golang-1.6-go golang-1.6-src golang-doc golang-go golang-src libstdc++-5-dev

Try again ... $ make geth build/env.sh go run build/ci.go install ./cmd/geth

/usr/local/go/bin/go install -ldflags -X main.gitCommit=ab5646c532292b51e319f290afccf6a44f874372 -v ./cmd/geth github.com/ethereum/go-ethereum/crypto/secp256k1 github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid github.com/ethereum/go-ethereum/crypto github.com/ethereum/go-ethereum/core/types github.com/ethereum/go-ethereum/crypto/ecies github.com/ethereum/go-ethereum/p2p/discover github.com/ethereum/go-ethereum github.com/ethereum/go-ethereum/accounts github.com/ethereum/go-ethereum/core/state github.com/ethereum/go-ethereum/accounts/keystore github.com/ethereum/go-ethereum/consensus github.com/ethereum/go-ethereum/consensus/misc github.com/ethereum/go-ethereum/core/vm github.com/ethereum/go-ethereum/consensus/ethash github.com/ethereum/go-ethereum/consensus/clique github.com/ethereum/go-ethereum/core github.com/ethereum/go-ethereum/eth/downloader github.com/ethereum/go-ethereum/eth/fetcher github.com/ethereum/go-ethereum/p2p/discv5 github.com/ethereum/go-ethereum/eth/filters github.com/ethereum/go-ethereum/miner github.com/ethereum/go-ethereum/p2p github.com/ethereum/go-ethereum/accounts/usbwallet github.com/ethereum/go-ethereum/internal/ethapi github.com/ethereum/go-ethereum/node github.com/ethereum/go-ethereum/light github.com/ethereum/go-ethereum/eth/gasprice github.com/ethereum/go-ethereum/eth github.com/ethereum/go-ethereum/whisper/whisperv5 github.com/ethereum/go-ethereum/accounts/abi github.com/ethereum/go-ethereum/accounts/abi/bind github.com/ethereum/go-ethereum/ethclient github.com/ethereum/go-ethereum/les github.com/ethereum/go-ethereum/ethstats github.com/ethereum/go-ethereum/contracts/release github.com/ethereum/go-ethereum/cmd/utils github.com/ethereum/go-ethereum/cmd/geth Done building. Run "build/bin/geth" to launch geth.

Success!!!!

ligi commented 7 years ago

Great it works now - perhaps close the issue then?