thetatoken / theta-eth-rpc-adaptor

An adaptor that translates the Theta RPC APIs to the Ethereum RPC APIs
https://docs.thetatoken.org/
24 stars 11 forks source link

theta-eth-rpc-adaptor build error on linux #10

Closed gitloverr closed 3 years ago

gitloverr commented 3 years ago

hi everyone,

I would like to run this on my linux machine.

and I ran on makefile directory : make linux

then I got this error:

make: integration/docker/build/build.sh: Command not found make: *** [Makefile:13: linux] Error 127

how do I fix this error and how do I run on linux?

also I tried make install to, but I got errors again like this:

`

$ make install

go install ./cmd/...
go: finding github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
go: finding github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21
go: finding github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570
go: finding github.com/kylelemons/godebug v1.1.0
go: finding github.com/libp2p/go-libp2p-routing-helpers v0.2.3
go: finding github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef
go: finding github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3
go: finding github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208
go: finding golang.org/x/net v0.0.0-20190628185345-da137c7871d7
go: finding github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6
go: finding github.com/mattn/go-colorable v0.1.0
go: finding github.com/google/gopacket v1.1.18
go: finding github.com/wedeploy/gosocketio v0.0.7-beta
go: parsing ../theta/common/go.mod: open /home/harmony/theta_eth_rpc_adaptor/theta/common/go.mod: no such file or directory
go: finding github.com/ipfs/go-ipns v0.0.2
go: finding github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad
go: finding github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356
go: finding github.com/cespare/xxhash/v2 v2.1.1
go: github.com/wedeploy/gosocketio@v0.0.7-beta: unknown revision v0.0.7-beta
go: finding github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035
go: finding golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
go: finding github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989
go: finding golang.org/x/sys v0.0.0-20200519105757-fe76b779f299
go: finding github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6
go: finding github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
go: finding go.uber.org/zap v1.16.0

go: finding github.com/benbjohnson/clock v1.0.2
go: finding github.com/cespare/cp v0.1.0
go: finding github.com/spf13/pflag v1.0.5
go: finding gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772
go: finding golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7
go: finding github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc
go: finding github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4
go: finding github.com/go-ole/go-ole v1.2.1
go: finding github.com/Azure/azure-pipeline-go v0.2.2
go: finding github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7
go: finding github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9
go: parsing ../theta/go.mod: open /home/harmony/theta_eth_rpc_adaptor/theta/go.mod: no such file or directory
go: finding github.com/libp2p/go-libp2p-testing v0.3.0
go: finding github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff
go: finding github.com/libp2p/go-libp2p-record v0.1.3
go: finding github.com/hashicorp/go-multierror v1.1.0
go: finding github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d
go: finding golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
go: finding github.com/google/go-cmp v0.3.1
go: parsing ../theta/rpc/lib/rpc-codec/jsonrpc2/go.mod: open /home/harmony/theta_eth_rpc_adaptor/theta/rpc/lib/rpc-codec/jsonrpc2/go.mod: no such file or directory
go: finding github.com/rjeczalik/notify v0.9.1
go: finding github.com/nxadm/tail v1.4.4
go: finding github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.3
go: finding github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa
go: finding github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277
go: finding github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416
go: finding github.com/naoina/go-stringutil v0.1.0
go: finding gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
go: finding github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c
go: finding golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
go: finding github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf
go: finding github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
go: finding github.com/go-stack/stack v1.8.0
go: finding github.com/Azure/azure-storage-blob-go v0.7.0
go: finding github.com/Azure/go-autorest/autorest/adal v0.8.0
go: finding github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c
go: finding github.com/libp2p/go-libp2p-kbucket v0.4.7
go: finding gopkg.in/sourcemap.v1 v1.0.5
go: finding github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847
go: finding github.com/fatih/color v1.3.0
go: finding gotest.tools v2.2.0+incompatible
go: finding github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521
go: finding github.com/cpuguy83/go-md2man/v2 v2.0.0
go: finding github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883
go: finding github.com/VictoriaMetrics/fastcache v1.5.3
go: finding gopkg.in/urfave/cli.v1 v1.20.0
go: finding github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c
go: finding github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00
go: finding github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3
go: finding github.com/libp2p/go-libp2p v0.12.0
go: finding gopkg.in/yaml.v2 v2.2.8
go: finding github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222
go: finding github.com/fsnotify/fsnotify v1.4.9
go: finding github.com/google/uuid v1.1.2
go: error loading module requirements
make: *** [Makefile:24: release] Error 1

`

how do I fix?

thank you

jieyilong commented 3 years ago

Thanks for the feedback. Did you execute these commands to clone the Theta blockchain repo to this directory? $GOPATH/src/github.com/thetatoken/theta

mkdir -p $GOPATH/src/github.com/thetatoken 
cd $GOPATH/src/github.com/thetatoken
git clone https://github.com/thetatoken/theta-protocol-ledger.git $GOPATH/src/github.com/thetatoken/theta
cd theta
git checkout theta3.0-rpc-compatibility
export GO111MODULE=on
make install

From these error messages the directory structure seems not correct:

go: parsing ../theta/go.mod: open /home/harmony/theta_eth_rpc_adaptor/theta/go.mod: no such file or directory
...
go: parsing ../theta/rpc/lib/rpc-codec/jsonrpc2/go.mod: open /home/harmony/theta_eth_rpc_adaptor/theta/rpc/lib/rpc-codec/jsonrpc2/go.mod: no such file or directory
gitloverr commented 3 years ago

hi @jieyilong, it's solved thank you!

jieyilong commented 3 years ago

Great! Thanks for confirming