построить монго с драйвером - PullRequest
1 голос
/ 09 марта 2019

Я пытаюсь собрать драйвер C с поддержкой Kerberos, из mongo-c-driver-1.10.3.tar.gz.Я на Ubuntu 16.04, 64-битный Intel, с gcc 5.4.0.Я запускаю CMake, как ::

$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
    ...
    -- Build files have been written to: /home/glt/tools/new_mongo/mongo-c-driver-1.10.3/cmake-build

выглядит как cmake успешно, но когда я извиняюсь 'make', я не смог.

$ make
    Scanning dependencies of target bson_static
    ...
    [ 39%] Building C object src/libmongoc/CMakeFiles/mongoc_shared.dir/src/mongoc/mongoc-openssl.c.o
    /home/glt/tools/new_mongo/mongo-c-driver-1.10.3/src/libmongoc/src/mongoc/mongoc-openssl.c: In function ¡®_mongoc_openssl_check_cert¡¯:
    /home/glt/tools/new_mongo/mongo-c-driver-1.10.3/src/libmongoc/src/mongoc/mongoc-openssl.c:314:16: warning: ¡®ASN1_STRING_data¡¯ is deprecated [-Wdeprecated-declarations]
                    check = (const char *) ASN1_STRING_get0_data (name->d.ia5);
                    ^
    In file included from /home/glt/miniconda3/include/openssl/e_os2.h:13:0,
                     from /home/glt/miniconda3/include/openssl/bio.h:13,
                     from /home/glt/tools/new_mongo/mongo-c-driver-1.10.3/src/libmongoc/src/mongoc/mongoc-openssl.c:23:
    /home/glt/miniconda3/include/openssl/asn1.h:554:35: note: declared here
     DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
                                       ^
    /home/glt/miniconda3/include/openssl/opensslconf.h:115:37: note: in definition of macro ¡®DECLARE_DEPRECATED¡¯
     #   define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
                                         ^
    /home/glt/miniconda3/include/openssl/asn1.h:554:1: note: in expansion of macro ¡®DEPRECATEDIN_1_1_0¡¯
     DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
     ^
    [ 39%] Building C object src/libmongoc/CMakeFiles/mongoc_shared.dir/src/mongoc/mongoc-cluster-sasl.c.o
    [ 39%] Building C object src/libmongoc/CMakeFiles/mongoc_shared.dir/src/mongoc/mongoc-sasl.c.o
    [ 39%] Building C object src/libmongoc/CMakeFiles/mongoc_shared.dir/src/mongoc/mongoc-cluster-cyrus.c.o
    [ 40%] Building C object src/libmongoc/CMakeFiles/mongoc_shared.dir/src/mongoc/mongoc-cyrus.c.o
    [ 40%] Linking C shared library libmongoc-1.0.so
    [ 40%] Built target mongoc_shared
    Scanning dependencies of target example-client
    [ 40%] Building C object src/libmongoc/CMakeFiles/example-client.dir/examples/example-client.c.o
    [ 40%] Linking C executable example-client
    libmongoc-1.0.so.0.0.0: undefined reference to `OPENSSL_sk_num'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_gets'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_puts'
    libmongoc-1.0.so.0.0.0: undefined reference to `__cxa_begin_catch'
    libmongoc-1.0.so.0.0.0: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned long)'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_set_data'
    libmongoc-1.0.so.0.0.0: undefined reference to `operator delete[](void*)'
    libmongoc-1.0.so.0.0.0: undefined reference to `operator new(unsigned long)'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_set_init'
    libmongoc-1.0.so.0.0.0: undefined reference to `OPENSSL_init_ssl'
    libmongoc-1.0.so.0.0.0: undefined reference to `TLS_method'
    libmongoc-1.0.so.0.0.0: undefined reference to `std::__throw_length_error(char const*)'
    libmongoc-1.0.so.0.0.0: undefined reference to `operator delete(void*)'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_free'
    libmongoc-1.0.so.0.0.0: undefined reference to `operator new[](unsigned long)'
    libmongoc-1.0.so.0.0.0: undefined reference to `__cxa_pure_virtual'
    libmongoc-1.0.so.0.0.0: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::begin()'
    libmongoc-1.0.so.0.0.0: undefined reference to `__gxx_personality_v0'
    libmongoc-1.0.so.0.0.0: undefined reference to `OPENSSL_sk_value'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_destroy'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_write'
    libmongoc-1.0.so.0.0.0: undefined reference to `std::__throw_bad_alloc()'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_read'
    libmongoc-1.0.so.0.0.0: undefined reference to `OPENSSL_init_crypto'
    libmongoc-1.0.so.0.0.0: undefined reference to `SSL_CTX_set_options'
    libmongoc-1.0.so.0.0.0: undefined reference to `__cxa_end_catch'
    libmongoc-1.0.so.0.0.0: undefined reference to `EVP_MD_CTX_free'
    libmongoc-1.0.so.0.0.0: undefined reference to `vtable for __cxxabiv1::__class_type_info'
    libmongoc-1.0.so.0.0.0: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::empty() const'
    libmongoc-1.0.so.0.0.0: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::max_size() const'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_get_data'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_new'
    libmongoc-1.0.so.0.0.0: undefined reference to `EVP_MD_CTX_new'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_create'
    libmongoc-1.0.so.0.0.0: undefined reference to `__cxa_rethrow'
    libmongoc-1.0.so.0.0.0: undefined reference to `BIO_meth_set_ctrl'
    libmongoc-1.0.so.0.0.0: undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
    collect2: error: ld returned 1 exit status
    src/libmongoc/CMakeFiles/example-client.dir/build.make:103: recipe for target 'src/libmongoc/example-client' failed
    make[2]: *** [src/libmongoc/example-client] Error 1
    CMakeFiles/Makefile2:707: recipe for target 'src/libmongoc/CMakeFiles/example-client.dir/all' failed
    make[1]: *** [src/libmongoc/CMakeFiles/example-client.dir/all] Error 2
    Makefile:149: recipe for target 'all' failed
    make: *** [all] Error 2

Я собираюсь установить libmongoc, но яполучить ошибку libmongoc-1.0.so.0.0.0: undefined reference to во время процесса.Можете ли вы сказать мне, что мне нужно установить?Спасибо!

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...