Build Failing
adxBRudolph opened this issue · comments
I get the following trying to install/build:
go get -u -a github.com/valyala/ybc/libs/go/memcache
github.com/valyala/ybc/bindings/go/ybc
In file included from /usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform.h:240,
from /usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/ybc.c:1:
/usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform/linux.c: In function ‘p_file_create’:
/usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform/linux.c:362: error: ‘O_CLOEXEC’ undeclared (first use in this function)
/usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform/linux.c:362: error: (Each undeclared identifier is reported only once
/usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform/linux.c:362: error: for each function it appears in.)
/usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform/linux.c: In function ‘p_file_open’:
/usr/local/go/bin/src/github.com/valyala/ybc/bindings/go/ybc/platform/linux.c:382: error: ‘O_CLOEXEC’ undeclared (first use in this function)
Fixed at 7421d5d
I tried the build again and it still failed after this commit.
What I did to resolve it was add the following lines after the "includes" in github.com/valyala/ybc/bindings/go/ybc/platform/linux.c
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
And the build then works.