-
-
Save akhenakh/10819108 to your computer and use it in GitHub Desktop.
pkg install bison flex leveldb protobuf gmake ruby ruby-gems bzr mercurial valgrind | |
export CC=clang | |
export GOROOT=/home/akh/dev/gosrc | |
export CGO_CFLAGS="-I/usr/local/include" | |
export CGO_LDFLAGS="-L/usr/local/lib" | |
git clone https://github.com/influxdb/influxdb.git | |
./configure --with-flex=/usr/local/bin/flex --with-bison=/usr/local/bin/bison | |
# edit Makefile to change the SHELL path to /usr/local/bin/bash | |
gmake | |
# a test will fail but the daemon binary is working | |
# get the admin templates directory from http://s3.amazonaws.com/influxdb/influxdb-latest.386.tar.gz and move it in the same directory as the daemon binary |
Does this work on FreeBSD 10 amd64 ? I tried but did not go too far:
package github.com/jmhodges/levigo
imports runtime: unrecognized import path "runtime"
package github.com/jmhodges/levigo
imports runtime/cgo: unrecognized import path "runtime/cgo"
package github.com/jmhodges/levigo
imports syscall: unrecognized import path "syscall"
package github.com/jmhodges/levigo
imports unsafe: unrecognized import path "unsafe"
gmake: *** [src/github.com/jmhodges/levigo] Error 1
Tried it on 9.2-RELEASE-p7 without luck. Any ideas why it spits out errors when compiling gomdb and protocol ? My GO* env settings are:
# env |grep GO
CGO_LDFLAGS=-L/usr/local/lib
CGO_CFLAGS=-I/usr/local/include
GOOS=freebsd
And here is the output I get:
# gmake
gmake -C parser
gmake[1]: Entering directory `/root/influxdb/parser'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/root/influxdb/parser'
for i in code.google.com/p/go.crypto/bcrypt code.google.com/p/goprotobuf/proto code.google.com/p/log4go github.com/bmizerany/pat github.com/fitstar/falcore github.com/fitstar/falcore/filter github.com/gorilla/mux github.com/influxdb/influxdb/_vendor/raft github.com/influxdb/go-cache github.com/BurntSushi/toml code.google.com/p/gogoprotobuf/proto github.com/influxdb/gomdb code.google.com/p/go.tools/cmd/vet github.com/jmhodges/levigo github.com/influxdb/rocksdb github.com/influxdb/hyperleveldb-go; do /usr/local/bin/go get -d $i; done
rm -f protocol/*.pb.go
PATH=$GOPATH/bin:$PATH /usr/local/bin/protoc --go_out=. protocol/*.proto
/usr/local/bin/go build -o influxdb github.com/influxdb/influxdb/daemon
# github.com/influxdb/influxdb/protocol
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:18: undefined: Point
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:24: undefined: Point
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:28: undefined: Point
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:32: undefined: Point
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:38: undefined: FieldValue
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:63: undefined: Point
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:73: undefined: Point
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:92: undefined: Request
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:96: undefined: Request
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:102: undefined: Request
/src/github.com/influxdb/influxdb/protocol/protocol_extensions.go:102: too many errors
# github.com/influxdb/gomdb
/src/github.com/influxdb/gomdb/mdb.c:4300:39: error: use of undeclared identifier 'O_DSYNC'
/src/github.com/influxdb/gomdb/mdb.c:282:20: note: expanded from macro 'MDB_DSYNC'
/src/github.com/influxdb/gomdb/mdb.c:8584:46: warning: data argument not used by format string [-Wformat-extra-args]
gmake: *** [build] Error 2
@suletm
I was having the same issue compiling gomd under freebsd 10. I found a solution that works for me and opened an issue szferi/gomdb#28.
My output now looks like this:
ok github.com/influxdb/influxdb/datastore 0.034s
ok github.com/influxdb/influxdb/engine 0.015s
FAIL github.com/influxdb/influxdb/parser [build failed]
ok github.com/influxdb/influxdb/protocol 0.003s
ok github.com/influxdb/influxdb/wal 15.130s
Everything seems to be fine, except for the influxdb parser. Go throws ugly stacktraces at me:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x414272]
goroutine 16 [running]:
runtime.panic(0x5d8fa0, 0x716013)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
main.(*typeConv).Type(0xc20804e2c0, 0x80071b3d8, 0xc208189800, 0x6fc4, 0x1)
/usr/local/go/src/cmd/cgo/gcc.go:1288 +0x1632
main.(*typeConv).Type(0xc20804e2c0, 0x8007170e8, 0xc2081897a0, 0x6fc4, 0x7)
/usr/local/go/src/cmd/cgo/gcc.go:1189 +0x3dd6
main.(*typeConv).Struct(0xc20804e2c0, 0xc2080047e0, 0x6fc4, 0x6, 0x0, 0x0, 0x8)
/usr/local/go/src/cmd/cgo/gcc.go:1551 +0x70b
main.(*typeConv).Type(0xc20804e2c0, 0x80071b410, 0xc2080047e0, 0x6fc4, 0x66ae01)
/usr/local/go/src/cmd/cgo/gcc.go:1234 +0x3038
main.(*typeConv).Type(0xc20804e2c0, 0x8007170e8, 0xc208188ba0, 0x6fc4, 0x66ae01)
/usr/local/go/src/cmd/cgo/gcc.go:1189 +0x3dd6
main.(*typeConv).Type(0xc20804e2c0, 0x8007170e8, 0xc208188b40, 0x6fc4, 0x0)
/usr/local/go/src/cmd/cgo/gcc.go:1189 +0x3dd6
main.(*typeConv).Struct(0xc20804e2c0, 0xc2080045a0, 0x6fc4, 0x6, 0x0, 0x0, 0x8)
/usr/local/go/src/cmd/cgo/gcc.go:1551 +0x70b
main.(*typeConv).Type(0xc20804e2c0, 0x80071b410, 0xc2080045a0, 0x6fc4, 0xc2080807a0)
/usr/local/go/src/cmd/cgo/gcc.go:1234 +0x3038
main.(*typeConv).Type(0xc20804e2c0, 0x80071b3d8, 0xc2081888d0, 0x6fc4, 0x1)
/usr/local/go/src/cmd/cgo/gcc.go:1269 +0x1301
main.(*Package).loadDWARF(0xc20802b450, 0xc20804ac80, 0xc20805bc00, 0x26, 0x40)
/usr/local/go/src/cmd/cgo/gcc.go:541 +0xfb4
main.(*Package).Translate(0xc20802b450, 0xc20804ac80)
/usr/local/go/src/cmd/cgo/gcc.go:182 +0x150
main.main()
/usr/local/go/src/cmd/cgo/main.go:259 +0xef1
No idea how to fix this.
Hi, I'm working on FreeBSD port for InfluxDB - current status - compile/install/works, but depends on ports not included in official FreeBSD repo. The port do not compile in poudriere and depends on clang!
https://github.com/cheffo/influxdb-port
Dependency ports are available here - https://github.com/cheffo/FreeBSD-Ports/
Do they have many shellscripts written for bash?