FoundationDB

Build failing on Mac


(Ananth Gundabattula) #1

Hello All,

I am following the instructions for building foundation db and I am getting an error while building it. Could the community please advise on:

  1. If anything else needs to be done apart from the instructions given in the “Compiling from source - MacOS” section ?

  2. What versions of XCode, Xcode command line tools , Mono are generally considered a stable combination ?

I am getting the following error when compiling on macOS Sierra:

fdbrpc/TLSConnection.actor.cpp:366:16: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
        va_start( ap, is_error );
                      ^
fdbrpc/TLSConnection.actor.cpp:346:74: note: parameter of type 'bool' is declared here
static void TLSConnectionLogFunc( const char* event, void* uid_ptr, bool is_error, ... ) {
                                                                         ^
1 error generated.
make: *** [.objs/fdbrpc/TLSConnection.actor.g.cpp.o] Error 1

Regards,
Ananth


(Alex Miller) #2

See #433 and #409.

I think we should finally be getting something merged today to fix it. Your easy workaround is just to remove -Werror, which is a thing that’s been raised a few times as something that we should do support a wider variety of build environments.

Our “officially supported” build environment is the environment defined by the build/Dockerfile. If you run with matching versions of compilers/mono on MacOS, then it’ll probably work out. Our MacOS builder is running a sufficiently old clang such that this warning didn’t trip for us, unfortunately.


(Ananth Gundabattula) #3

Thanks Alex. Build based on docker images worked fine for me.

Regards,
Ananth