【提问】version_1.0.3.1编译错误

hpb-tutorial

#1

下载版本后,
duncanwang@ubuntu64bit-server:~/hpb$ git clone -b version_1.0.3.1 https://github.com/hpb-project/go-hpb

编译
make all

编译错误信息如下,求解答:
duncanwang@ubuntu64bit-server:~/hpb/go-hpb$ make all
build/env.sh go run build/ci.go install ./cmd/ghpb

/usr/local/go/bin/go install -ldflags -X main.gitCommit=a909e019d3d11223649317357155f7dc0075cae9 -v ./cmd/ghpb
github.com/hpb-project/go-hpb/vendor/github.com/maruel/panicparse/stack
github.com/hpb-project/go-hpb/vendor/github.com/mattn/go-runewidth
github.com/hpb-project/go-hpb/vendor/github.com/mitchellh/go-wordwrap
github.com/hpb-project/go-hpb/vendor/github.com/nsf/termbox-go
github.com/hpb-project/go-hpb/vendor/github.com/gizak/termui
github.com/hpb-project/go-hpb/common/crypto/sha3
github.com/hpb-project/go-hpb/common/hexutil

github.com/hpb-project/go-hpb/internal/web3ext
github.com/hpb-project/go-hpb/vendor/github.com/peterh/liner
util.go:44: exit status 2
exit status 1
Makefile:29: recipe for target ‘all’ failed
make: *** [all] Error 1


#2

查看里面的dockerfile,按照那里面的命令编译应该没问题


#3

把错误信息全部粘贴上来吧,我最近也遇到了这个问题,看是不是有下面的错误。

unrecognized relocation (0x2a) in section `.text'

这个错误原因是链接libboe.a 时出错,原因是本地的编译工具版本比发布的libboe.a 的编译工具版本低.
有两个解决办法

1. 本地重新编译libboe.a
    git clone https://github.com/hpb-project/libboe 
    cd libboe
    make 
    cp ./lib/libboe.a   /path/to/go-hpb/boe/libboe.a
    用自己编译的libboe.a 覆盖官方代码里的libboe.a, 然后再编译go-hpb
2. 尝试更新 binutils
   sudo apt-get upgrade
   sudo apt-get install binutils
   然后再去编译go-hpb.

#4

好吧,这个问题太久了好像已经解决过了