【问题标题】:Scons in MongodbMongodb中的Scons
【发布时间】:2013-06-21 10:15:17
【问题描述】:

当我运行 scons --ssl all 时,它会抛出一个错误:

g++ -o build/linux2/release/ssl/mongo/util/net/ssl_manager.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -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 -DNETSNMP_NO_INLINE -Ibuild/linux2/release/ssl/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/linux2/release/ssl/third_party/s2 -Isrc/third_party /s2 -Ibuild/linux2/release/ssl/third_party/boost -Isrc/third_party/boost -Ibuild/linux2/release/ssl/third_party/pcre-8.30 -Isrc/third_party/pcre-8.30 -Ibuild/linux2/release/ssl -Isrc -Ibuild/linux2/release/ssl/mongo -Isrc/mongo -Ibuild/linux2/release/ssl/third_party/s2 -Isrc/third_party/s2 -Ibuild/linux2/release/ssl/third_party/snappy -Isrc/third_party /snappy -Ibuild/linux2/release/ssl/third_party/v8/include -Isrc/third_party/v8/include src/mongo/util/net/ssl_manager.cpp

src/mongo/util/net/ssl_manager.cpp:在成员函数'void mongo::SSLManager::_setupFIPS()': src/mongo/util/net/ssl_manager.cpp:187: 错误: 'FIPS_mode_set' 不是 在此范围内声明 scons: * [build/linux2/release/ssl/mongo/util/net/ssl_manager.o] 错误 1 ​​scons: 建筑物因错误而终止。

如何解决此问题。使用 Ubuntu 12.04

【问题讨论】:

    标签: mongodb ssl scons


    【解决方案1】:

    要解决此错误,请确保您安装了定义 FIPS_mode_set 的 OpenSSL 版本。例如,某些 0.9.8 版本不支持。升级到 1.0.1 应该可以解决。

    如果您已经使用 1.0.1,请确保 scons 正在使用正确的 OpenSSL 标头和库。您可以通过将 include 和 lib 路径添加为命令行参数来显式设置,如下所示:

    scons --ssl --cpppath /usr/local/openssl/1.0.1e/include --libpath /usr/local/openssl/1.0.1e/lib all
    

    提供的路径是您的 OpenSSL 包含和库的实际路径。

    【讨论】:

    • 如何检查 scons 是否使用了正确的 OpenSSL 标头?并请指导我如何明确设置
    • 我已经用一个例子更新了我上面的答案。我还添加了 --libpath ,这也可能是必需的。
    • @JamesWahlin - 您能否将此信息(关于设置路径)添加到 MongoDB 文档以构建 mongo (mongodb.org/about/tutorial/build-mongodb-on-linux)?我实际上在 MongoDB JIRA b/c 中提交了一个错误,“在 linux 上构建”教程有一个指向“在 github 上编辑”的链接,但该链接已损坏。 jira.mongodb.org/browse/DOCS-2173
    • 如果这是答案,你能把它标记为已回答吗?
    【解决方案2】:

    对于那些在 Mac 上使用 OSX 有同样问题的人。以下是您需要包含的内容:

    scons --ssl --cpppath=/usr/local/opt/openssl/include --libpath=/usr/local/opt/openssl/lib all
    

    假设你已经用 brew 下载了 openssl

    brew install openssl
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多