为了账号安全,请及时绑定邮箱和手机立即绑定

scons all 出错

scons: Reading SConscript files ...

scons version: 2.4.1

python version: 2 7 12 'final' 0

Checking whether the C++ compiler works... (cached) yes

Checking whether the C compiler works... (cached) yes

Checking if C++ compiler "g++" is GCC... (cached) yes

Checking if C compiler "gcc" is GCC... (cached) yes

Checking if C compiler supports -Wno-unused-local-typedefs... (cached) yes

Checking if C compiler supports -Wno-unused-function... (cached) yes

Checking if C compiler supports -Wno-unused-private-field... (cached) no

Checking if C compiler supports -Wno-deprecated-declarations... (cached) yes

Checking if C compiler supports -Wno-tautological-constant-out-of-range-compare... (cached) no

Checking if C compiler supports -Wno-unused-const-variable... (cached) no

Checking if C compiler supports -fno-builtin-memcmp... (cached) yes

Checking for __thread... (cached) yes

Checking for C header file unistd.h... (cached) yes

Checking whether clock_gettime is declared... (cached) yes

Checking for C library rt... (cached) yes

Checking for C++ header file execinfo.h... (cached) yes

Checking whether backtrace is declared... (cached) yes

Checking whether backtrace_symbols is declared... (cached) yes

Checking whether backtrace_symbols_fd is declared... (cached) yes

Checking for C library pcap... (cached) no

Checking for C library wpcap... (cached) no

Checking if __malloc_hook is declared volatile... (cached) yes

scons: done reading SConscript files.

scons: Building targets ...

g++ -o build/linux2/normal/mongo/shell/dbshell.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -Ibuild/linux2/normal/third_party/snappy -Isrc/third_party/snappy -Ibuild/linux2/normal/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/linux2/normal/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/normal/third_party/boost -Isrc/third_party/boost -Ibuild/linux2/normal/third_party/pcre-8.30 -Isrc/third_party/pcre-8.30 -Ibuild/linux2/normal -Isrc -Ibuild/linux2/normal/mongo -Isrc/mongo src/mongo/shell/dbshell.cpp

In file included from src/third_party/boost/boost/filesystem/v3/path_traits.hpp:23:0,

                 from src/third_party/boost/boost/filesystem/v3/path.hpp:25,

                 from src/third_party/boost/boost/filesystem/v3/operations.hpp:25,

                 from src/third_party/boost/boost/filesystem/operations.hpp:31,

                 from src/mongo/shell/dbshell.cpp:20:

src/third_party/boost/boost/system/error_code.hpp:214:36: error: 'boost::system::posix_category' defined but not used [-Werror=unused-variable]

     static const error_category &  posix_category = generic_category();

                                    ^

src/third_party/boost/boost/system/error_code.hpp:215:36: error: 'boost::system::errno_ecat' defined but not used [-Werror=unused-variable]

     static const error_category &  errno_ecat     = generic_category();

                                    ^

src/third_party/boost/boost/system/error_code.hpp:216:36: error: 'boost::system::native_ecat' defined but not used [-Werror=unused-variable]

     static const error_category &  native_ecat    = system_category();

                                    ^

cc1plus: all warnings being treated as errors

scons: *** [build/linux2/normal/mongo/shell/dbshell.o] Error 1

scons: building terminated because of errors.


正在回答

1 回答

这里不是缺依赖库,只是在gcc选项中多了将warning转换成error的选项而已。具体操作可以参考这里

https://blog.csdn.net/x356982611/article/details/71079937

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
mongoDB入门篇
  • 参与学习       95903    人
  • 解答问题       185    个

mongoDB入门视频教程,慕课网带你进入mongoDB神秘世界

进入课程

scons all 出错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信