apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store

Home Page:https://apple.github.io/foundationdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go build failure: fdb_c_apiversion.g.h not included in osx installed files

shua opened this issue · comments

commented

After installing fdb using the osx .pkg installer, it creates a couple include files under /usr/local/include/foundationdb by default. One of these files, the main header fdb_c.h has a #include "fdb_c_apiversion.g.h line in it, but no fdb_c_apiversion.g.h is installed by the installer.

I'm not sure if CMake is not being run to create the file in CI, or it's not getting packaged into the osx installer, but this is causing specifically builds of a go program to fail. I imagine anything else that tries to compile fdb_c.h will also fail on my computer with similar errors.

relevant environment and fdb version info

$ fdbcli --version
FoundationDB CLI 7.3 (v7.3.25)
source version 34aacf520214e48edc64a17decd0a53725e22a96
protocol fdb00b073000000
$ ls /usr/local/include/foundationdb/
fdb.options       fdb_c.h           fdb_c_internal.h  fdb_c_options.g.h fdb_c_types.h

minimal example

$ mkdir test; cd test
test $ go mod init min-case
test $ go get github.com/apple/foundationdb/bindings/go/src/fdb@34aacf520214e48edc64a17decd0a53725e22a96
test $ echo 'package main
import "github.com/apple/foundationdb/bindings/go/src/fdb"
func main() { _ = fdb.Database{}; }
' >main.go
test $ go build ./...
# github.com/apple/foundationdb/bindings/go/src/fdb
In file included from vendor/github.com/apple/foundationdb/bindings/go/src/fdb/database.go:26:
/usr/local/include/foundationdb/fdb_c.h:29:10: fatal error: 'fdb_c_apiversion.g.h' file not found
#include "fdb_c_apiversion.g.h"
         ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I've looked through open and closed tickets in this repo for any mention of fdb_c_apiversion but couldn't find anything, hence this ticket.

Fixed by #11037