installation error.

329 views
Skip to first unread message

bussiere adrien

unread,
Jul 22, 2014, 8:42:23 PM7/22/14
to cockro...@googlegroups.com
So far i've tried to install cockroach-db on ubuntu.

i've got this error :

e/rocksdb.go:25:24: fatal error: rocksdb/c.h: No such file or directory
 // #include "rocksdb/c.h"

a litle tutorial on how to install it could be nice.


Thanks & Regards
Bussiere

bussiere adrien

unread,
Jul 22, 2014, 8:56:10 PM7/22/14
to cockro...@googlegroups.com
Ok solved.

i had to install arc , i've learned a new tool.

Regards and thanks

Mike Sun

unread,
Jul 22, 2014, 11:53:46 PM7/22/14
to bussiere adrien, cockro...@googlegroups.com
Hmm... actually I was also wondering about that error:

e/rocksdb.go:25:24: fatal error: rocksdb/c.h: No such file or directory
 // #include "rocksdb/c.h

Should it be "go get -d github.com/cockroachdb/cockroach"?


--
You received this message because you are subscribed to the Google Groups "Cockroach DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cockroach-db...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Bonventre

unread,
Jul 23, 2014, 10:11:04 AM7/23/14
to Mike Sun, bussiere adrien, cockro...@googlegroups.com
Could you provide reproduction steps for the error? They could be used to improve the installation doc.

Mike Sun

unread,
Jul 23, 2014, 10:39:58 AM7/23/14
to Andy Bonventre, bussiere adrien, cockro...@googlegroups.com
On Ubuntu 14.04 (similar issues on Mac OS X Mavericks using golang Mac OX binary installer, and home-brew installed rocksdb dependencies)

--
$ sudo apt-get install git mercurial golang gcc g++ libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev

$ mkdir $HOME/golang

$ echo "export GOPATH=$HOME/golang"  >>$HOME/.bashrc && source $HOME/.bashrc

golang/src/github.com/cockroachdb/cockroach/storage/rocksdb.go:25:24: fatal error: rocksdb/c.h: No such file or directory
 // #include "rocksdb/c.h"
                        ^
compilation terminated.
--

Looks like the issue is that "go get" will attempt to fetch and build the package, but is missing the submodule for rocksdb at that point, thus the suggestion to use "go get -d" to only download the package.

Also, in the above environment, running "./bootstrap" will have some permissions issues as go attempts to install some packages -- I had to run it with sudo.

I have a branch with updated CONTRIBUTING.md instructions for this if this seems valid.

Tobias Schottdorf, Ph.D.

unread,
Jul 23, 2014, 10:47:34 AM7/23/14
to Mike Sun, Andy Bonventre, bussiere adrien, cockro...@googlegroups.com
run "make goget"

Mike Sun

unread,
Jul 23, 2014, 10:57:08 AM7/23/14
to Tobias Schottdorf, Ph.D., Andy Bonventre, bussiere adrien, cockro...@googlegroups.com

run "make goget"

At which step? I'm not sure how this resolves the error message (though the error can be ignored safely)

bussiere bussiere

unread,
Jul 23, 2014, 11:25:28 AM7/23/14
to Mike Sun, Tobias Schottdorf, Ph.D., Andy Bonventre, cockro...@googlegroups.com
~/Lib/cockroach$ go build
# github.com/cockroachdb/cockroach/storage
../../.gvm/pkgsets/go1.2.1/global/src/github.com/cockroachdb/cockroach/storage/rocksdb.go:25:24:
fatal error: rocksdb/c.h: No such file or directory
// #include "rocksdb/c.h"
^
compilation terminated.


i have to use bootstrap.sh and now i'am copiling cocksdb in _vendor ...


Not very clear to use ...
- Были бы кости, а мясо нарастет

bussiere bussiere

unread,
Jul 23, 2014, 11:30:33 AM7/23/14
to Mike Sun, Tobias Schottdorf, Ph.D., Andy Bonventre, cockro...@googlegroups.com
~/Lib/cockroach$ make goget
CGO_LDFLAGS="-L/home/bussiere/Lib/cockroach/_vendor/rocksdb"
CGO_CFLAGS="-I/home/bussiere/Lib/cockroach/_vendor/rocksdb/include" go
get ./...
go install: no install location for directory
/home/bussiere/Lib/cockroach outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/gossip outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/hlc outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/kv outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/multiraft outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/rpc outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/server outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/simulation outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/storage outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/structured outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/cockroach/util outside GOPATH
- Были бы кости, а мясо нарастет



Tobias Schottdorf, Ph.D.

unread,
Jul 23, 2014, 11:32:07 AM7/23/14
to bussiere bussiere, Mike Sun, Andy Bonventre, cockro...@googlegroups.com
I think you should have cockroach in your
$GOPATH/src/github.com/cockroachdb/cockroach
Best,
Tobias

bussiere bussiere

unread,
Jul 23, 2014, 11:37:48 AM7/23/14
to Tobias Schottdorf, Ph.D., Mike Sun, Andy Bonventre, cockro...@googlegroups.com
my gopath is :
export GOPATH=/home/bussiere/Lib/Go/



~/Lib/Go/src/github.com/cockroachdb/cockroach$ make goget
CGO_LDFLAGS="-L/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/_vendor/rocksdb"
CGO_CFLAGS="-I/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/_vendor/rocksdb/include"
go get ./...
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach outside
GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/gossip
outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/hlc outside
GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/kv outside
GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/multiraft
outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/rpc outside
GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/server
outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/simulation
outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/storage
outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/structured
outside GOPATH
go install: no install location for directory
/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach/util
outside GOPATH
make: *** [goget] Erreur 1
- Были бы кости, а мясо нарастет



Mike Sun

unread,
Jul 23, 2014, 11:50:11 AM7/23/14
to bussiere bussiere, Tobias Schottdorf, Ph.D., Andy Bonventre, cockro...@googlegroups.com
Could you list the exact steps/commands for the entire build including the golang install itself and if/when sudo is used for commands?

bussiere bussiere

unread,
Jul 23, 2014, 12:00:35 PM7/23/14
to Tobias Schottdorf, Ph.D., Mike Sun, Andy Bonventre, cockro...@googlegroups.com
ok not now but tonight i will make a fresh install with a new user and
i will push some doc on github


regards.
- Были бы кости, а мясо нарастет



bussiere bussiere

unread,
Jul 23, 2014, 12:24:35 PM7/23/14
to Tobias Schottdorf, Ph.D., Mike Sun, Andy Bonventre, cockro...@googlegroups.com
a go version error :

# github.com/cockroachdb/cockroach/storage
storage/allocator.go:24: import
/home/bussiere/Lib/Go/pkg/linux_amd64/github.com/cockroachdb/cockroach/util.a:
object is [linux amd64 go1.2.1 X:none] expected [linux amd64 go1.1.2
X:none]
make: *** [goget] Erreur 2


/home/bussiere/Lib/Go/src/github.com/cockroachdb/cockroach# make
- Были бы кости, а мясо нарастет



Wedzerai Munyengwa

unread,
Jul 23, 2014, 12:44:44 PM7/23/14
to cockro...@googlegroups.com
I got the same error when I was installing. I had to mannually do : git submodule init, and git submodule update, to pull the rocksdb source.

bussiere adrien

unread,
Jul 30, 2014, 6:08:38 PM7/30/14
to cockro...@googlegroups.com
So i begin again to install it :


$ go install github.com/cockroachdb/cockroach
# github.com/cockroachdb/cockroach/storage
../../../../.gvm/pkgsets/go1.3/global/src/github.com/cockroachdb/cockroach/storage/rocksdb.go:26:23: fatal error: rocksdb/c.h: No such file or directory

 #include "rocksdb/c.h"
                       ^
compilation terminated.
bussiere@kusanagi:~/Lib/androidsdk/sdk/tools$ go version
go version go1.3 linux/amd64
bussiere@kusanagi:~/Lib/androidsdk/sdk/tools$

Satish Eerpini

unread,
Aug 4, 2014, 4:27:36 AM8/4/14
to cockro...@googlegroups.com
Looks like the header file is not in the standard path go searches for it. So assuming that you have rocksdb somewhere and have built it, the following should fix the error :

CGO_LDFLAGS=-L<path to rocksdb>  CGO_CFLAGS=-I<path to rocksdb>/include go install github.com/cockroachdb/cockroach

This is basically what the Makefile also has for the build target.

-Satish
Reply all
Reply to author
Forward
0 new messages