Compile failed: "ninja: build stopped: subcommand failed" or "ninja: error: manifest 'build.ninja' still dirty after 100 tries"

Hi,
I got the latest source code from https://github.com/satherton/foundationdb , which uses the branch feature-redwood by default.
I followed the instruction in README.md to try to compile it, but it failed for two reasons:

  1. ninja: error: manifest ‘build.ninja’ still dirty after 100 tries
  2. ninja: build stopped: subcommand failed,

the output on the terminal is:

[1/747] Check old build system wasn’t used in source dir
[2/747] Check old build system wasn’t used in source dir
[3/747] Check old build system wasn’t used in source dir
[4/747] Check old build system wasn’t used in source dir
[5/747] Check old build system wasn’t used in source dir
[6/747] Check old build system wasn’t used in source dir
[7/747] Check old build system wasn’t used in source dir
[8/747] Check old build system wasn’t used in source dir
[9/747] Check old build system wasn’t used in source dir
[12/747] Check old build system wasn’t used in source dir
[13/747] Check old build system wasn’t used in source dir
[16/747] Building C object fdbrpc/CMakeFiles/thirdparty.dir/zlib/gzclose.c.o
[17/747] Building C object fdbrpc/CMakeFiles/thirdparty.dir/libcoroutine/Common.c.o
[18/747] Creating directories for ‘boostProject’
[19/747] Building C object fdbrpc/CMakeFiles/thirdparty.dir/zlib/zutil.c.o
[20/747] Building C object fdbrpc/CMakeFiles/thirdparty.dir/libcoroutine/Coro.c.o
[21/747] Building C object fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o
FAILED: fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c: In function ‘_Atomic’:
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:369:30: error: expected declaration specifiers before ‘started’
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:371:15: error: storage class specified for parameter ‘want_poll_cb’
static void (*want_poll_cb) (void);
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:372:15: error: storage class specified for parameter ‘done_poll_cb’
static void (done_poll_cb) (void);
^
static _Atomic(unsigned int) max_poll_time; /
reslock /
^
static _Atomic(unsigned int) max_poll_reqs; /
reslock /
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:377:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘nreqs’
static _Atomic(unsigned int) nreqs; /
reqlock /
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:378:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘nready’
static _Atomic(unsigned int) nready; /
reqlock /
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:379:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘npending’
static _Atomic(unsigned int) npending; /
reqlock /
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:380:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘max_idle’
static _Atomic(unsigned int) max_idle = 4; /
maximum number of threads that can idle indefinitely /
^
static _Atomic(unsigned int) idle_timeout = 10; /
number of seconds after which an idle threads exit /
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:383:17: error: storage class specified for parameter ‘wrklock’
static xmutex_t wrklock;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:384:17: error: storage class specified for parameter ‘reslock’
static xmutex_t reslock;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:385:17: error: storage class specified for parameter ‘reqlock’
static xmutex_t reqlock;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:386:17: error: storage class specified for parameter ‘reqwait’
static xcond_t reqwait;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:409:3: error: storage class specified for parameter ‘etp_worker’
} etp_worker;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:411:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘wrk_first’
static etp_worker wrk_first; /
NOT etp */
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:419:19: error: expected declaration specifiers or ‘…’ before ‘etp_worker’
etp_worker_clear (etp_worker *wrk)
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:424:18: error: expected declaration specifiers or ‘…’ before ‘etp_worker’
etp_worker_free (etp_worker *wrk)
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:436:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:444:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:454:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:464:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:480:3: error: storage class specified for parameter ‘etp_reqq’
} etp_reqq;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:482:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘req_queue’
static etp_reqq req_queue;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:483:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘res_queue’
static etp_reqq res_queue;
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:486:12: error: expected declaration specifiers or ‘…’ before ‘etp_reqq’
reqq_init (etp_reqq *q)
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:497:12: error: expected declaration specifiers or ‘…’ before ‘etp_reqq’
reqq_push (etp_reqq *q, ETP_REQ *req)
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:514:13: error: expected declaration specifiers or ‘…’ before ‘etp_reqq’
reqq_shift (etp_reqq *q)
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:541:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
In file included from /opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:54:0:
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:565:16: error: storage class specified for parameter ‘etp_proc’
X_THREAD_PROC (etp_proc);
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/xthread.h:110:42: note: in definition of macro ‘X_THREAD_PROC’
#define X_THREAD_PROC(name) static void *name (void *thr_arg)
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:569:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:593:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:606:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:624:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:693:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:701:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:738:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:744:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:750:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:756:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:762:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:769:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:781:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:799:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:814:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:823:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
^
/opt/app/fdb/satherton_FDB6.3/2_build/foundationdb/fdbrpc/libeio/eio.c:851:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
{
[32/747] Building C object fdbrpc/CMakeFiles/thirdparty.dir/zlib/deflate.c.o
[33/747] Compile coveragetool
[34/747] Compile TraceLogHelper
[35/747] Compile Vexillographer
[36/747] Compile actor compiler
[37/747] Building CXX object contrib/monitoring/CMakeFiles/actor_flamegraph.dir/actor_flamegraph.cpp.o
[38/747] Building CXX object fdbmonitor/CMakeFiles/fdbmonitor.dir/fdbmonitor.cpp.o
ninja: build stopped: subcommand failed.

here are the steps I used :

  1. git clone https://github.com/satherton/foundationdb.git
  2. cmake -GNinja -DBOOST_ROOT=/kvm.bk/software/boost_1_72_0 …/foundationdb/ (succeed)
  3. ninja

others:
CentOS Linux release 7.6.1810 (Core)
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39)

can you provide me the compiled-well rpm packages of FDB 6.3?

Thanks,

FDB 6.3 is not yet released. The code is here. My personal Redwood branch is sometimes out of date for other changes. The release-6.3 branch in the main repo will be kept up to date with Redwood improvements going forward.

thanks! I am trying to build it now but there are still the same compilation errors like below:

[20/739] Building C object fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o
FAILED: fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o
/usr/bin/cc -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DDTRACE_PROBES -DHAS_ALIGNED_ALLOC -DNO_INTELLISENSE -DUSE_UCONTEXT -I/opt/app/fdb/satherton_FDB6.3/release_6.3/foundationdb -I. -O2 -DNDEBUG -DCMAKE_BUILD -ggdb -fno-omit-frame-pointer -Wno-pragmas -Wno-attributes -Wno-error=format -Wunused-variable -Wno-deprecated -fvisibility=hidden -Wreturn-type -fPIC -w -std=gnu11 -MD -MT fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o -MF fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o.d -o fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o -c /opt/app/fdb/satherton_FDB6.3/release_6.3/foundationdb/fdbrpc/libeio/eio.c
/opt/app/fdb/satherton_FDB6.3/release_6.3/foundationdb/fdbrpc/libeio/eio.c: In function ‘_Atomic’:
/opt/app/fdb/satherton_FDB6.3/release_6.3/foundationdb/fdbrpc/libeio/eio.c:369:30: error: expected declaration specifiers before ‘started’
static _Atomic(unsigned int) started, idle, wanted = 4;
^

Is it relative to that I am using the wrong version of gcc/g++ version?
or could you please send me the rpm packages that including all of the features in FDB 6.3?

Thanks,

It looks like you have followed the compile instructions in the Readme, but it looks like those instructions are missing some important details like what version of GCC or clang to use.

Can you please file a GitHub issue for this?

We are not in the practice of releasing ad-hoc RPM builds, and additionally we are still fixing some last minute bugs in release 6.3.

If you’d like, you can also file an issue requesting that nightly RPM builds be produced, and we will consider it. However, such builds should only be used for testing on clusters which can have their data lost or corrupted, even silently corrupted, without consequences.

There is a docker image provided at foundationdb/foundationdb-build which is the approved build environment. Please mount your code within that image, and build there.

1 Like

It’s not necessary to produce RPM builds nightly, I just want get one RPM build with latest features in the coming release 6.3 to try.
anyway, I will try to build it by using docker image.

Thanks,

ok , but I just found the foundationdb/build instead of foundationdb/foundationdb-build after cloning the source code from github.
could you please let me know whether I am missing something?

thanks,

https://hub.docker.com/r/foundationdb/foundationdb-build is the docker image of the approved build environment.

I could have sworn we had relatively explicit instructions on how to use it in the README, but I’m not sure if they were removed somehow or I’m mistaken…

Hi,
I tried to build FDB 6.3 on docker env, but still failed due to the error below:
Here are the steps I took to build it on docker image:
docker images

REPOSITORY TAG IMAGE ID CREATED SIZE
foundationdb/foundationdb-build latest f50e258689a4 2 days ago 2.62GB
foundationdb/foundationdb latest ca4871e50e63 10 days ago 339MB

sudo docker run foundationdb/foundationdb-build

git clone https://github.com/apple/foundationdb.git

git checkout release-6.3

cmake -GNinja -DBOOST_ROOT=/software/boost_1_72_0 …/foundationdb/ (succeed)

ninja

Compilation Errors:
FAILED: fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o
/usr/bin/cc -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DDTRACE_PROBES -DHAS_ALIGNED_ALLOC -DNO_INTELLISENSE -DUSE_UCONTEXT -I/kvm.bk/software/docker_fdb_release6.3/foundationdb -I. -O2 -DNDEBUG -DCMAKE_BUILD -ggdb -fno-omit-frame-pointer -Wno-pragmas -Wno-attributes -Wno-error=format -Wunused-variable -Wno-deprecated -fvisibility=hidden -Wreturn-type -fPIC -w -std=gnu11 -MD -MT fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o -MF fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o.d -o fdbrpc/CMakeFiles/thirdparty.dir/libeio/eio.c.o -c /kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c: In function ‘_Atomic’:
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c:369:30: error: expected declaration specifiers before ‘started’
static _Atomic(unsigned int) started, idle, wanted = 4;
^
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c:371:15: error: storage class specified for parameter ‘want_poll_cb’
static void (*want_poll_cb) (void);
^
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c:372:15: error: storage class specified for parameter ‘done_poll_cb’
static void (done_poll_cb) (void);
^
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c:374:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘max_poll_time’
static _Atomic(unsigned int) max_poll_time; /
reslock /
^
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c:375:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘max_poll_reqs’
static _Atomic(unsigned int) max_poll_reqs; /
reslock /
^
/kvm.bk/software/docker_fdb_release6.3/foundationdb/fdbrpc/libeio/eio.c:377:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘nreqs’
static _Atomic(unsigned int) nreqs; /
reqlock */

do you think there are something wrong with my steps?

thanks ,

hi,
did you encounter such errors below when building release-6.3 in the docker image foundationdb/foundationdb-build:

[22/164] Building fdb_go
FAILED: bindings/go/pkg/linux_amd64/github.com/apple/foundationdb/bindings/go/src/fdb.a
cd /home/fdb/release-6.3/6.3_output/bindings/go && /usr/local/bin/cmake -E env GOPATH=/home/fdb/release-6.3/6.3_output/bindings/go C_INCLUDE_PATH=/home/fdb/release-6.3/6.3_output/bindings/c/foundationdb:/home/fdb/release-6.3/foundationdb/bindings/c CGO_LDFLAGS=-L/home/fdb/release-6.3/6.3_output/lib /usr/bin/go get -d github.com/apple/foundationdb/bindings/go/src/fdb && /usr/local/bin/cmake -E env GOPATH=/home/fdb/release-6.3/6.3_output/bindings/go C_INCLUDE_PATH=/home/fdb/release-6.3/6.3_output/bindings/c/foundationdb:/home/fdb/release-6.3/foundationdb/bindings/c CGO_LDFLAGS=-L/home/fdb/release-6.3/6.3_output/lib /usr/bin/go install github.com/apple/foundationdb/bindings/go/src/fdb
package golang.org/x/xerrors: unrecognized import path “golang.org/x/xerrors” (https fetch: Get https://golang.org/x/xerrors?go-get=1: net/http: TLS handshake timeout)
[23/164] Linking CXX executable bin/fdbserver
ninja: build stopped: subcommand failed.