Building go-filecoin...
git log -n 1 --format=%H
bash -c go build -ldflags=github.com/filecoin-project/go-filecoin="-X github.com/filecoin-project/go-filecoin/build/flags.GitRoot=/home/jiang/Desktop/project/go-filecoin -X github.com/filecoin-project/go-filecoin/build/flags.GitCommit=b5d5e7ae1e7282b5e40ebd2f783d0e21002ba358" -v -o go-filecoin .
github.com/filecoin-project/filecoin-ffi/generated
# github.com/filecoin-project/filecoin-ffi/generated
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
Command 'bash -c go build -ldflags=github.com/filecoin-project/go-filecoin="-X github.com/filecoin-project/go-filecoin/build/flags.GitRoot=/home/jiang/Desktop/project/go-filecoin -X github.com/filecoin-project/go-filecoin/build/flags.GitCommit=b5d5e7ae1e7282b5e40ebd2f783d0e21002ba358" -v -o go-filecoin .' failed: exit status 2
exit status 1
我是这样解决的:
在/usr/lib/x86_64-linux-gnu/中寻找对应自己电脑版本的libOpenCL
比如我的ubuntu是18.04,库是libOpenCL.so.1.0.0
使用以下命令即可解决
sudo ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0 /usr/lib/libOpenCL.so