Go build fail fatal error rocksdb c h

0 votes

I am testing on project obc-peer.

I am confused where should I get about github.com/**** , golang.org/**** , google.golang.org/**** , google/****. Am I wrong about $GOPATH ?

Here is the log of go build and go env:

Can someone help me solve this?

vagrant@vagrant-ubuntu-trusty-64:/opt/gopath$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/opt/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
vagrant@vagrant-ubuntu-trusty-64:/opt/gopath/src/github.com/openblockchain/obc-peer$ go build
# github.com/openblockchain/obc-peer/vendor/github.com/tecbot/gorocksdb
vendor/github.com/tecbot/gorocksdb/backup.go:4:24: fatal error: rocksdb/c.h: No such file or directory
 // #include "rocksdb/c.h"
                        ^
compilation terminated.
Sep 17, 2018 in Blockchain by digger
• 26,740 points
1,820 views

1 answer to this question.

0 votes

I followed here and it is done. https://github.com/openblockchain/obc-peer/issues/885

Configure RocksDB related deps

sudo apt-get install -y libsnappy-dev
sudo apt-get install -y zlib1g-dev
sudo apt-get install -y libbz2-dev

Run go install - CGO flags for RocksDB

cd $GOPATH/src/github.com/openblockchain/obc-peer
CGO_CFLAGS="-I/opt/rocksdb/include" CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install
answered Sep 17, 2018 by slayer
• 29,370 points

Related Questions In Blockchain

0 votes
1 answer

Hyperledger Fabric: "No go in PATH" error.

The error is because the go path ...READ MORE

answered Jun 27, 2018 in Blockchain by Omkar
• 69,230 points
1,495 views
0 votes
10 answers

How to solve gradle build failed error?

I migrated the project to a different ...READ MORE

answered Dec 7, 2018 in Blockchain by Rajat
48,695 views
0 votes
1 answer

Fatal error while installing web3 node.

Try to add git config by executing ...READ MORE

answered Aug 10, 2018 in Blockchain by digger
• 26,740 points
1,528 views
0 votes
1 answer
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,327 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,882 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,399 views
0 votes
1 answer

How to solve “ltdl.h: No such file or directory” error?

It seems like you are missing header ...READ MORE

answered Jul 26, 2018 in Blockchain by slayer
• 29,370 points
3,116 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP