使用SSL编译MongoDB的文件/伪操作错误结束

时间:2014-02-02 03:17:06

标签: mongodb ubuntu g++

我目前在Ubuntu 13.10 x64上使用MongoDB,并在3个站点上使用副本集功能,并且已经到了需要启用SSL的阶段。这需要自己编译,遗憾的是我之前没有这方面的经验,这让我感到头疼。

我按照此处列出的程序尝试编译r2.4.9:http://www.mongodb.org/about/tutorial/build-mongodb-on-linux/

我已根据我在网上搜索相关文章的内容安装了大量软件包:

git-core build-essential scons devscripts lintian dh-make libpcre3 libpcre3-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libpcap-dev libreadline-dev libssl-dev rng-tools

我还更改了SConstruct文件以删除CCFLAG -Werror,以便在this question中提到的[-Werror=unused-local-typedefs]之后立即停止失败。

编译过程看起来相当远但总是在同一个文件dbclient_rs.cpp失败:

g++ -o build/linux2/ssl/mongo/client/dbclient_rs.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -fno-builtin-memcmp -O3 -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -Ibuild/linux2/ssl/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/linux2/ssl/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/ssl/third_party/boost -Isrc/third_party/boost -Ibuild/linux2/ssl/third_party/pcre-8.30 -Isrc/third_party/pcre-8.30 -Ibuild/linux2/ssl -Isrc -Ibuild/linux2/ssl/mongo -Isrc/mongo -Ibuild/linux2/ssl/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/ssl/third_party/snappy -Isrc/third_party/snappy -Ibuild/linux2/ssl/third_party/v8/include -Isrc/third_party/v8/include src/mongo/client/dbclient_rs.cpp

(警告垃圾邮件已删除)

{standard input}: Assembler messages:
{standard input}:73382: Warning: end of file not at end of a line; newline inserted
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
scons: *** [build/linux2/ssl/mongo/client/dbclient_rs.o] Error 4
scons: building terminated because of errors.

注意:我也在同一个地方看到过伪操作错误,但当我删除CCFLAG -w而转而删除Werror时,它们被上述错误取代。

还注意到它启动并检查行Checking for C library rt... no时 - 这可能是个问题吗?

g ++版本为4.8.1,scons版本为2.3.0

我在这里做了令人难以置信的愚蠢事吗?

非常感谢。

1 个答案:

答案 0 :(得分:2)

好的搜索后我找到问题的解释here

似乎与编译过程中没有足够的RAM有关。我在运行512MB VPS。升级到4GB后工作正常(也按照建议删除了-pipe CCFLAG)。