c++ - unable to compile mongo-cxx-driver -
from cxx driver quickstart guide i've been unable finish compilation of new driver on either ubuntu or centos vm.
i've followed steps letter several time, i'm not sure have gone wrong.
in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/bulk_write.hpp:20:0, /home/sam/downloads/mongo-cxx-driver/src/mongocxx/bulk_write.cpp:19: /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:31:63: error: ‘mongoc_client_pool_set_ssl_opts’ not declared in scope #define mongocxx_libmongoc_symbol(name) constexpr auto name = mongoc_##name; ^ /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc_symbols.hpp:42:1: note: in expansion of macro ‘mongocxx_libmongoc_symbol’ mongocxx_libmongoc_symbol(client_pool_set_ssl_opts)
i've redone several times. several times have reinstalled entire operating system. error in question relates 1.2 development version of mongo-c-driver. i've made sure install it, somethign has gone wrong.
edit:
i don't think resolved time , lack time troubleshoot this. i've moved rethinkdb instead time being. in few months i'll give go again.
edit2:
build process (after making sure mongodb server , running)
git clone -b 1.2.0-dev https://github.com/mongodb/mongo-c-driver ./autogen.sh sudo make && sudo make install git clone -b master https://github.com/mongodb/mongo-cxx-driver cd mongo-cxx-driver/build cmake -dcmake_build_type=release -dcmake_install_prefix=/usr/local .. sudo make && sudo make install gcc , g++ version 4.9.2
edit 3:
-- found pkgconfig: /usr/bin/pkg-config (found version "0.27.1") -- checking module 'libbson-1.0' -- found libbson-1.0, version 1.2.0-dev -- performing test compiler_has_hidden_visibility -- performing test compiler_has_hidden_visibility - success -- performing test compiler_has_hidden_inline_visibility -- performing test compiler_has_hidden_inline_visibility - success -- performing test compiler_has_deprecated_attr -- performing test compiler_has_deprecated_attr - success -- checking module 'libmongoc-1.0' -- found libmongoc-1.0, version 1.2.0-dev -- configuring done -- generating done -- build files have been written to: /home/sam/downloads/mongo-cxx-driver/build
i've added flags of cmake build to:
cmake -dcmake_build_type=release -dcmake_install_prefix=/usr/local -dcmake_cxx_compiler=/usr/bin/clang++ -dcmake_c_compiler=/usr/bin/clang .. clang version 3.4.2 (tags/release_34/dot2-final) target: x86_64-redhat-linux-gnu thread model: posix
i've gotten more/better errors.
in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:32: /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc_symbols.hpp:42:1: error: use of undeclared identifier 'mongoc_client_pool_set_ssl_opts'; did mean 'client_pool_set_ssl_opts'? mongocxx_libmongoc_symbol(client_pool_set_ssl_opts) ^ /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:31:63: note: expanded macro 'mongocxx_libmongoc_symbol' #define mongocxx_libmongoc_symbol(name) constexpr auto name = mongoc_##name; ^ <scratch space>:19:1: note: expanded here mongoc_client_pool_set_ssl_opts ^ /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc_symbols.hpp:42:27: note: 'client_pool_set_ssl_opts' declared here mongocxx_libmongoc_symbol(client_pool_set_ssl_opts) ^ /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:31:56: note: expanded macro 'mongocxx_libmongoc_symbol' #define mongocxx_libmongoc_symbol(name) constexpr auto name = mongoc_##name; ^ in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/bulk_write.cpp:19: in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/bulk_write.hpp:20: in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:32: /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc_symbols.hpp:42:1: error: variable 'client_pool_set_ssl_opts' declared 'auto' type cannot appear in own initializer mongocxx_libmongoc_symbol(client_pool_set_ssl_opts) ^ /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:31:63: note: expanded macro 'mongocxx_libmongoc_symbol' #define mongocxx_libmongoc_symbol(name) constexpr auto name = mongoc_##name; ^ <scratch space>:19:1: note: expanded here mongoc_client_pool_set_ssl_opts ^
edit 4:
updated clang 3.6 thought may fix issues. rebuilt libbson, libmongoc , tried again.
scanning dependencies of target mongocxx [ 23%] building cxx object src/mongocxx/cmakefiles/mongocxx.dir/bulk_write.cpp.o in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/bulk_write.cpp:19: in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/bulk_write.hpp:20: in file included /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:32: /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc_symbols.hpp:42:1: error: use of undeclared identifier 'mongoc_client_pool_set_ssl_opts'; did mean 'mongoc_client_pool_try_pop'? mongocxx_libmongoc_symbol(client_pool_set_ssl_opts) ^ /home/sam/downloads/mongo-cxx-driver/src/mongocxx/private/libmongoc.hpp:31:63: note: expanded macro 'mongocxx_libmongoc_symbol' #define mongocxx_libmongoc_symbol(name) constexpr auto name = mongoc_##name; ^ <scratch space>:20:1: note: expanded here mongoc_client_pool_set_ssl_opts ^ /usr/local/include/libmongoc-1.0/mongoc-client-pool.h:45:23: note: 'mongoc_client_pool_try_pop' declared here mongoc_client_t *mongoc_client_pool_try_pop (mongoc_client_pool_t *pool); ^ 1 error generated. make[2]: *** [src/mongocxx/cmakefiles/mongocxx.dir/bulk_write.cpp.o] error 1 make[1]: *** [src/mongocxx/cmakefiles/mongocxx.dir/all] error 2 make: *** [all] error 2
i have found issue.
#ifdef mongoc_enable_ssl void mongoc_client_pool_set_ssl_opts (mongoc_client_pool_t *pool, const mongoc_ssl_opt_t *opts); #endif
mongoc_enable_ssl set 0 due me not having openssl-devel packages installed. i'll raise issue mongocxx-driver developers make sure put on wiki page.
Comments
Post a Comment