[gdal-dev] compiling mongodb driver???

kusala nine kusala9 at googlemail.com
Mon Jul 6 05:12:11 PDT 2015


I'm still struggling with compiling in the mongo driver to version 2.1 of
the source. I compile the mongocxx driver (scons --prefix=<dir>
--sharelibraries=yes install) and then use the build folder to point the
gdal build at the mongoclient.so but, even after a successful ./configure I
get the messages below. Looks to me like I'm missing symbols which should
be defined somewhere else - is libmongoclient.so the only thing external to
gdal that I need to link? Are the boost libraries included in the
mongo-cxx-driver? I have the rest of boost on the system and the driver
compiled fine but the final linking is where it falls over. all help
gratefully received...

Jon.

/bin/bash /home/ubuntu/gdal/gdal/gdal/libtool --mode=link       g++
 gdalinfo.lo commonutils.lo  /home/ubuntu/gdal/gdal/gdal/libgdal.la -o
gdalinfo
libtool: link: g++ .libs/gdalinfo.o .libs/commonutils.o -o .libs/gdalinfo
 /home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so -L/usr/lib
-L/home/ubuntu/gdal/mongo/mongo-cxx-driver/b2/lib -lgeos_c
/usr/lib/x86_64-linux-gnu/libsqlite3.so -lodbc -lodbcinst
/usr/lib/x86_64-linux-gnu/libexpat.so /usr/lib/libxerces-c.so -lnsl
-ljasper -lnetcdf /usr/lib/libhdf5.so -lm /usr/lib/libmfhdfalt.so
/usr/lib/libdfalt.so /usr/lib/x86_64-linux-gnu/libgif.so -ljpeg -lpng -lpq
-lz -lpthread -lrt -ldl -lpcre /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so
-lxml2 -lmongoclient -lboost_system -lboost_thread -lboost_regex
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setFIPSMode(bool)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLPEMKeyFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLCRLFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::shutdown()'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObjBuilderValueStream::endField(mongo::StringData const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::initialize(mongo::client::Options const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::verifyFailed(char const*, char const*, unsigned int)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BulkOperationBuilder::execute(mongo::WriteConcern const*,
mongo::WriteResult*)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::DBClientCursor::nextSafe()'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONElement::Array() const'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::msgasserted(int, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BulkOperationBuilder::~BulkOperationBuilder()'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObjBuilder::appendElements(mongo::BSONObj)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObjBuilder::appendDate(mongo::StringData const&, mongo::Date_t)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BulkOperationBuilder::BulkOperationBuilder(mongo::DBClientBase*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, bool)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObjBuilder::appendElementsUnique(mongo::BSONObj)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObjBuilderValueStream::BSONObjBuilderValueStream(mongo::BSONObjBuilder*)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLCAFile(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::WriteResult::hasErrors() const'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLPEMKeyPassword(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLMode(mongo::client::Options::SSLModes)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::DBClientConnection::DBClientConnection(bool,
mongo::DBClientReplicaSet*, double)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLAllowInvalidCertificates(bool)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::DBClientWithCommands::auth(mongo::BSONObj const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`boost::filesystem2::detail::status_api(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
boost::system::error_code&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::DBClientWithCommands::findAndRemove(mongo::StringData const&,
mongo::BSONObj const&, mongo::BSONObj const&, mongo::BSONObj const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::DBClientWithCommands::getCollectionNames(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, mongo::BSONObj
const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObjBuilderValueStream::operator<<(mongo::BSONElement const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::IndexSpec::IndexSpec()'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::setSSLAllowInvalidHostnames(bool)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::WriteResult::WriteResult()'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::client::Options::Options()'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::HostAndPort::HostAndPort(mongo::StringData const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::Status::toString() const'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::IndexSpec::addKeys(mongo::BSONObj const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::OID::toString() const'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONElement::Obj() const'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BSONObj::jsonString(mongo::JsonStringFormat, int, bool) const'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::BulkOperationBuilder::insert(mongo::BSONObj const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::OID::init(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)'
/home/ubuntu/gdal/gdal/gdal/.libs/libgdal.so: undefined reference to
`mongo::invariantFailed(char const*, char const*, unsigned int)'
collect2: ld returned 1 exit status
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory `/home/ubuntu/gdal/gdal/gdal/apps'
make: *** [apps-target] Error 2


On Wed, Jun 24, 2015 at 4:28 PM, kusala nine <kusala9 at googlemail.com> wrote:

> great thanks - I'll have a go. many thanks for the pointer.
>
> J
>
> On Wed, Jun 24, 2015 at 4:23 PM, Even Rouault <even.rouault at spatialys.com>
> wrote:
>
>> Jon,
>>
>> It is in the development version (2.1.0dev), not 2.0.0. The website
>> displays
>> the doc of the dev version.
>>
>> On Unix, you must use the following configure options:
>>   --with-mongocxx=ARG        Include MongoCXX support (ARG=Path, yes or
>> no)
>>   --with-boost-lib-path=ARG   Path to boost libraries for mongocxx client
>>
>> On Windows, look at the directions in nmake.opt (search for MONGO)
>>
>> Even
>>
>>
>> > Hi - has anyone got any pointers on compiling the mongodb drivers into
>> the
>> > latest 2.0.0 version of gdal. I've been watching for a while and the new
>> > 2.0.0 page has a table saying that mongo is included but not compiled
>> in by
>> > default. I've downloaded the libraries and compiled them from the link
>> on
>> > the gdal "vector formats" page but no idea how to integrate the mongo
>> > library into the rest of the ogr tools. I know there was a bit of
>> traffic
>> > about this a year ago but couldn't find anything more up to date. All
>> help
>> > gratefully received!....
>> >
>> > thanks
>> >
>> > Jon.(P).
>>
>> --
>> Spatialys - Geospatial professional services
>> http://www.spatialys.com
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150706/a270054e/attachment.html>


More information about the gdal-dev mailing list