graygnuorg / go-gdbm

Go interface to GNU DBM library
GNU General Public License v3.0
1 stars 0 forks source link

building centos7 errors #1

Open f1-outsourcing opened 1 year ago

f1-outsourcing commented 1 year ago

I go this build error on centos7

gopath/src/github.com/graygnuorg/go-gdbm/gdbm.go:398:32: could not determine kind of name for C.GDBM_DUMP_FMT_ASCII
gopath/src/github.com/graygnuorg/go-gdbm/gdbm.go:397:32: could not determine kind of name for C.GDBM_DUMP_FMT_BINARY

With

gdbm-1.10-8.el7.x86_64
gdbm-devel-1.10-8.el7.x86_64

I had to added these lines, but I am not sure if these are correct.

    129 #if !(GDBM_VERSION_MAJOR > 1 || GDBM_VERSION_MINOR >= 11)
    130 # define GDBM_DUMP_FMT_ASCII GO_GDBM_NOT_DEFINED
    131 #endif
    132 #if !(GDBM_VERSION_MAJOR > 1 || GDBM_VERSION_MINOR >= 11)
    133 # define GDBM_DUMP_FMT_BINARY GO_GDBM_NOT_DEFINED
    134 #endif
graygnuorg commented 1 year ago

Yes, that should work. On the other hand, gdbm 1.10 being 11 years old, it's perhaps time to upgrade to something newer.