LeoHChen / harmony-arm

Harmony On ARM64
MIT License
3 stars 0 forks source link

I have trouble when building harmony on ubuntu arm86 server #1

Open AmazingAng opened 3 years ago

AmazingAng commented 3 years ago

I clone 3 github repos as requested, and run make arm_static. Then I receive following errors.

root@ecs-kc1-large-2-linux-20210330185339:/src/github.com/harmony-one/harmony# make arm_static make: *** No rule to make target 'arm_static'. Stop.

AmazingAng commented 3 years ago

With: make linux_static, I met following errors:

include/mcl/gmp_util.hpp:36:10: fatal error: gmpxx.h: No such file or directory

include

      ^~~~~~~~~

compilation terminated. Makefile:270: recipe for target 'obj/fp.o' failed make[1]: [obj/fp.o] Error 1 make[1]: Waiting for unfinished jobs.... In file included from include/mcl/op.hpp:9:0, from include/mcl/fp.hpp:29, from include/mcl/fp_tower.hpp:9, from include/mcl/bn.hpp:9, from include/mcl/bn512.hpp:10, from include/mcl/impl/bn_c_impl.hpp:15, from src/bn_c512.cpp:5:

AmazingAng commented 3 years ago

After some debugging, I was instructed to get github.com/harmony-one/harmony/hmy/tracers. And I have following errors:

:~# go get github.com/harmony-one/harmony/hmy/tracers go: downloading github.com/harmony-one/harmony v1.10.2 go: downloading github.com/ethereum/go-ethereum v1.9.23 go: downloading github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26 go: downloading github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c go: downloading github.com/prometheus/tsdb v0.7.1 go: downloading github.com/shirou/gopsutil v2.20.5+incompatible go: downloading github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca go: downloading github.com/mattn/go-runewidth v0.0.4

github.com/harmony-one/bls/ffi/go/bls

go/pkg/mod/github.com/harmony-one/bls@v0.0.6/ffi/go/bls/bls.go:8:10: fatal error: bls/bls.h: No such file or directory

include <bls/bls.h>

      ^~~~~~~~~~~
AmazingAng commented 3 years ago

When doing linux_static, it says missing go.sum entry, and asked me to add tons of stuffs:

api/service/legacysync/syncing.go:14:2: missing go.sum entry for module providing package github.com/Workiva/go-datastructures/queue (imported by github.com/harmony-one/harmony/api/service/legacysync); to add: go get github.com/harmony-one/harmony/api/service/legacysync internal/blsgen/kms.go:10:2: missing go.sum entry for module providing package github.com/aws/aws-sdk-go/aws (imported by github.com/harmony-one/harmony/internal/blsgen); to add: go get github.com/harmony-one/harmony/internal/blsgen internal/blsgen/kms.go:11:2: missing go.sum entry for module providing package github.com/aws/aws-sdk-go/aws/credentials (imported by github.com/harmony-one/harmony/internal/blsgen); to add: go get github.com/harmony-one/harmony/internal/blsgen internal/blsgen/kms.go:12:2: missing go.sum entry for module providing package github.com/aws/aws-sdk-go/aws/session (imported by github.com/harmony-one/harmony/internal/blsgen); to add: go get github.com/harmony-one/harmony/internal/blsgen internal/blsgen/kms.go:13:2: missing go.sum entry for module providing package github.com/aws/aws-sdk-go/service/kms (imported by github.com/harmony-one/harmony/internal/blsgen); to add: go get github.com/harmony-one/harmony/internal/blsgen common/ntp/ntp.go:6:2: missing go.sum entry for module providing package github.com/beevik/ntp (imported by github.com/harmony-one/harmony/common/ntp); to add: go get github.com/harmony-one/harmony/common/ntp internal/bech32/bech32.go:4:2: missing go.sum entry for module providing package github.com/btcsuite/btcutil/bech32 (imported by github.com/harmony-one/harmony/internal/bech32); to add: go get github.com/harmony-one/harmony/internal/bech32 rosetta/rosetta.go:12:2: missing go.sum entry for module providing package github.com/coinbase/rosetta-sdk-go/asserter (imported by github.com/harmony-one/harmony/rosetta); to add: go get github.com/harmony-one/harmony/rosetta rosetta/rosetta.go:13:2: missing go.sum entry for module providing package github.com/coinbase/rosetta-sdk-go/server (imported by github.com/harmony-one/harmony/rosetta); to add: go get github.com/harmony-one/harmony/rosetta rosetta/rosetta.go:14:2: missing go.sum entry for module providing package github.com/coinbase/rosetta-sdk-go/types (imported by github.com/harmony-one/harmony/rosetta); to add: go get github.com/harmony-one/harmony/rosetta core/cx_pool.go:4:2: missing go.sum entry for module providing package github.com/deckarep/golang-set (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core rpc/filters/api.go:9:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum (imported by github.com/harmony-one/harmony/rpc/filters); to add: go get github.com/harmony-one/harmony/rpc/filters cmd/harmony/main.go:22:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/common (imported by github.com/harmony-one/harmony/cmd/harmony); to add: go get github.com/harmony-one/harmony/cmd/harmony hmy/bloombits.go:24:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/common/bitutil (imported by github.com/harmony-one/harmony/hmy); to add: go get github.com/harmony-one/harmony/hmy internal/common/address.go:12:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/common/hexutil (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core core/gen_genesis.go:10:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/common/math (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core core/blockchain.go:33:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/common/mclock (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core core/blockchain.go:34:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/common/prque (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core hmy/blockchain.go:9:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/core/bloombits (imported by github.com/harmony-one/harmony/hmy); to add: go get github.com/harmony-one/harmony/hmy internal/shardchain/dbfactory.go:7:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/core/rawdb (imported by github.com/harmony-one/harmony/internal/shardchain); to add: go get github.com/harmony-one/harmony/internal/shardchain block/headerfieldsetter.go:7:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/core/types (imported by github.com/harmony-one/harmony/core/types); to add: go get github.com/harmony-one/harmony/core/types internal/genesis/genesis.go:9:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/crypto (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core core/vm/contracts.go:25:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/crypto/blake2b (imported by github.com/harmony-one/harmony/core/vm); to add: go get github.com/harmony-one/harmony/core/vm core/vm/contracts.go:30:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/crypto/bn256 (imported by github.com/harmony-one/harmony/core/vm); to add: go get github.com/harmony-one/harmony/core/vm core/state/database.go:23:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/ethdb (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core consensus/downloader.go:4:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/event (imported by github.com/harmony-one/harmony/consensus); to add: go get github.com/harmony-one/harmony/consensus cmd/harmony/main.go:23:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/log (imported by github.com/harmony-one/harmony/cmd/harmony); to add: go get github.com/harmony-one/harmony/cmd/harmony core/state/state_object.go:26:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/metrics (imported by github.com/harmony-one/harmony/core); to add: go get github.com/harmony-one/harmony/core core/vm/stack_table.go:20:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/params (imported by github.com/harmony-one/harmony/core/vm); to add: go get github.com/harmony-one/harmony/core/vm shard/shard_state.go:13:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/rlp (imported by github.com/harmony-one/harmony/api/service/legacysync); to add: go get github.com/harmony-one/harmony/api/service/legacysync api/service/manager.go:6:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/rpc (imported by github.com/harmony-one/harmony/api/service); to add: go get github.com/harmony-one/harmony/api/service core/state/database.go:24:2: missing go.sum entry for module providing package github.com/ethereum/go-ethereum/trie (imported by github.com/harmony-one/harmony/core/types); to add: go get github.com/harmony-one/harmony/core/types api/service/legacysync/downloader/proto/downloader.pb.go:11:2: missing go.sum entry for module providing package github.com/golang/protobuf/proto (imported by github.com/harmony-one/harmony/consensus); to add: go get github.com/harmony-one/harmony/consensus api/service/explorer/service.go:15:2: missing go.sum entry for module providing package github.com/gorilla/mux (imported by github.com/harmony-one/harmony/api/service/explorer); to add: go get github.com/harmony-one/harmony/api/service/explorer consensus/consensus.go:10:2: missing go.sum entry for module providing package github.com/harmony-one/abool (imported by github.com/harmony-one/harmony/consensus); to add: go get github.com/harmony-one/harmony/consensus cmd/harmony/main.go:24:2: missing go.sum entry for module providing package github.com/harmony-one/bls/ffi/go/bls (imported by github.com/harmony-one/harmony/cmd/harmony); to add: go get github.com/harmony-one/harmony/cmd/harmony

AmazingAng commented 3 years ago

Now every thing seems fine, I used go mod tidy. So, am I done?

Harmony (C) 2020. harmony, version v6909-v3.1.3-135-gc345c4c4 (root@ 2021-03-31T14:16:19+0800) building ./cmd/bootnode

github.com/harmony-one/harmony/cmd/bootnode

/tmp/go-link-555631143/000004.o: In function `_cgo_26061493d47f_C2func_getaddrinfo': cgo_unix.cgo2.c:(.text+0x74): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking Harmony (C) 2019. bootnode, version v6909-v3.1.3-135-gc345c4c4 (root@ 2021-03-31T14:16:19+0800) ~/go/src/github.com/harmony-one/harmony/bin ~/go/src/github.com/harmony-one/harmony ~/go/src/github.com/harmony-one/harmony