Installing Go Bindings

I’m trying to get started with foundationdb and looking to use Go and I’ve tried to run the install command ./fdb-go-install.sh install --fdbver 7.4.1

But when ever I run it I get the following error

❯ ./fdb-go-install.sh install --fdbver 7.4.1
Directory /go/src/github.com/apple/foundationdb already exists ; checking out appropriate tag
git -C /go/src/github.com/apple/foundationdb fetch origin
git -C /go/src/github.com/apple/foundationdb checkout 7.4.1
HEAD is now at 7381c4309 enable AVX and update version for 7.4.1 release
Building generated files.
make -C /go/src/github.com/apple/foundationdb bindings/c/foundationdb/fdb_c_options.g.h
make: *** No rule to make target `bindings/c/foundationdb/fdb_c_options.g.h'.  Stop.
Could not generate required c header

Any clues what I’m doing wrong?

If you only want to use the go bindings as a user it’s better to install the according client package from the releases: Releases · apple/foundationdb · GitHub and then make use of github.com/apple/foundationdb <version> in your go mod file.

I eventually got it the Go bindings from Go modules working. Due to a misconfiguration on my end half of the APIs were not showing up properly which lead me down to trying to compile the bindings myself.

1 Like