truechain / truechain-consensus-core

TrueChain Consensus Protocol: Minerva
Apache License 2.0
161 stars 70 forks source link

Fix build failure #45

Closed hixichen closed 6 years ago

hixichen commented 6 years ago

This change fixed serveral issues:

miamiruby commented 6 years ago

this is still having problems...

paulkruger@scream:~/Sites/truechain/truechain-consensus-core/pbft(devel)$ hmake build-darwin
HyperMake v1.3.1 https://github.com/evo-cloud/hmake

=> toolchain 18:02:08.551
:] toolchain
=> deps 18:02:08.553
:] deps
=> build-darwin 18:02:08.555
[build-darwin]      + export GOOS=darwin
[build-darwin]      + GOOS=darwin
[build-darwin]      + export GOARCH=amd64
[build-darwin]      + GOARCH=amd64
[build-darwin]      + protoc -I src/pbft-core/fastchain/ src/pbft-core/fastchain/fastchain.proto --go_out=plugins=grpc:src/pbft-core/fastchain/
[build-darwin]      ++ pwd
[build-darwin]      ++ pwd
[build-darwin]      + export GOPATH=/go:/src:/src:/src/..
[build-darwin]      + GOPATH=/go:/src:/src:/src/..
[build-darwin]      + OUTDIR=bin/darwin
[build-darwin]      + mkdir -p bin/darwin
[build-darwin]      + '[' darwin -eq linux ']'
[build-darwin]      ./support/scripts/build.sh: line 20: [: darwin: integer expression expected
[build-darwin]      ++ git_commit_hash
[build-darwin]      +++ git rev-parse --short HEAD
[build-darwin]      fatal: not a git repository (or any parent up to mount point /)
[build-darwin]      Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[build-darwin]      ++ echo
[build-darwin]      + LDFLAGS='-s -w -X common.GitCommitHash='
[build-darwin]      + go build -o bin/darwin/pbft-client -ldflags '-s -w -X common.GitCommitHash=' ./src/pbft-core/client/
[build-darwin]      src/vendor/github.com/ethereum/go-ethereum/crypto/signature_cgo.go:27:2: build constraints exclude all Go files in /src/src/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1
[build-darwin]      + go build -o bin/darwin/truechain-engine -ldflags '-s -w -X common.GitCommitHash=' ./src/pbft-core/pbft-sim-engine/
[build-darwin]      src/vendor/github.com/ethereum/go-ethereum/crypto/signature_cgo.go:27:2: build constraints exclude all Go files in /src/src/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1
:( build-darwin 18:02:17.171 [+8.616748s] exit status 1
╔════════════╤═══════╤═════════╤════════════╤════════════╤═════════════╗
║Target      │Result │ Duration│Start       │Finish      │Error        ║
╠════════════╪═══════╪═════════╪════════════╪════════════╪═════════════╣
║toolchain   │Skipped│         │18:02:08.551│18:02:08.551│             ║
║deps        │Skipped│         │18:02:08.553│18:02:08.553│             ║
║build-darwin│Failure│8.616748s│18:02:08.555│18:02:17.171│exit status 1║
╚════════════╧═══════╧═════════╧════════════╧════════════╧═════════════╝
ERROR: exit status 1
paulkruger@scream:~/Sites/truechain/truechain-consensus-core/pbft(devel)$
hixichen commented 6 years ago

@miamiruby this change is not merged.

Once it is mergered, there will be no 'hmake build-darwin'.

for darwin, just run ./build.sh

miamiruby commented 6 years ago

Cool I will test it

miamiruby commented 6 years ago

it compiled.... now I have 2 files in the bin

paulkruger@scream:~/Sites/truechain/truechain-consensus-core/pbft/bin/darwin(devel*)$ ./pbft-client [.]Loading IP configs...

REQUESTS count - 10 just fetched private key for Client

Finish sending the requests. [.]Firing up client executioner... Test finished. Time cost: 133.145µs