5

I'm attempting to compile Mongo on Alpine Linux.

Anybody know how to get past this error?

In file included from src/mongo/util/net/socket_poll.h:20:0,
                 from src/mongo/util/net/sock.cpp:42:
/usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror=cpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^
cc1plus: all warnings being treated as errors
scons: *** [build/linux2/normal/mongo/util/net/sock.o] Error 1
scons: building terminated because of errors.
4

1 回答 1

4

This comes from the build system adding a -Werror flag and therefore the compiler is treating warnings as errors and fails the build.

You'll probably be able to go past this step by using the ad hoc --disable-warnings-as-errors flag.

于 2015-05-03T00:51:02.477 回答