Skip to content

Instantly share code, notes, and snippets.

@akhenakh
Last active November 4, 2015 22:35
Show Gist options
  • Save akhenakh/10819108 to your computer and use it in GitHub Desktop.
Save akhenakh/10819108 to your computer and use it in GitHub Desktop.
influxdb on freebsd
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
@nichdiekuh
Copy link

@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.

@cheffo
Copy link

cheffo commented Nov 12, 2014

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment