Giter Club home page Giter Club logo

Comments (5)

neoxic avatar neoxic commented on May 25, 2024 1

No worries, man!

Now let's see what your

$ nm -D /usr/lib/libmongoc-1.0.so | grep mongoc_database_drop

has to say.

On my Arch with libmongoc-1.9.3, it produces the following:

$ nm -D /usr/lib/libmongoc-1.0.so | grep mongoc_database_drop
000000000002f800 T mongoc_database_drop
000000000002f6d0 T mongoc_database_drop_with_opts

which shows that mongoc_database_drop_with_opts() is defined.

If your output is different, the version of the underlying binaries the package contains is probably far from 1.9.3 to say the least. Try uninstalling the package and building libmongoc from source. For example, this is what we do on our Debian Stretch images:

# libmongoc
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz
tar -xvzf mongo-c-driver-1.9.3.tar.gz
cd mongo-c-driver-1.9.3
./configure --enable-extra-align=no
make
make install

# lua-mongo
luarocks install lua-mongo 1.1.0

and it works without a hitch.

After you have done the above, repeat the ldd and nm checks you've made to make sure lua-mongo is linked against the correct .so-library (the one that you built and installed from source).

from lua-mongo.

neoxic avatar neoxic commented on May 25, 2024

What system are you on? luarocks is unable to check versions of external dependencies. I suspect your lua-mongo module is linked against an older version of mongoc because mongoc_database_drop_with_opts() is around since mongoc-1.7.0.

Please check ldd's output for your mongo.so instance:

ldd /usr/local/lib/lua/5.1/mongo.so

to make sure it's linked against the correct version (1.9.0 or higher).

Additionally, you could try building with CMake which will strict check versions of installed dependencies prior to building and enable you to run tests. This could be helpful to discover more about the issue.

from lua-mongo.

neoxic avatar neoxic commented on May 25, 2024

by the way does it support replica set?

lua-mongo is a binding to mongo-c-driver, so it virtually supports everything that is supported by the underlying driver (within the provided API, of course). Since replica set is supported by the driver, it is supported by lua-mongo as well. Check out this link for example: https://docs.mongodb.com/manual/reference/connection-string/#replica-set-option

from lua-mongo.

arsperger avatar arsperger commented on May 25, 2024

Hey Arseny,
Thanks for your quick response.

I am on Debian 8, here is the output of ldd /usr/local/lib/lua/5.1/mongo.so

linux-vdso.so.1 (0x00007ffe051bc000)
        libmongoc-1.0.so.0 => /usr/lib/libmongoc-1.0.so.0 (0x00007f070b163000)
        libbson-1.0.so.0 => /usr/lib/libbson-1.0.so.0 (0x00007f070af36000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f070ab8b000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f070a88a000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f070a682000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f070a465000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f070b59c000)

I have installed libmongoc from Debian testing repo

libmongoc-1.0-0 1.9.3+dfsg-2 amd64 MongoDB C client library - runtime files

Thanks,
Arsen.

from lua-mongo.

arsperger avatar arsperger commented on May 25, 2024

I've rebuilt libmongoc and it works like a charm now even with replica set :)
Thanks for your great support!

from lua-mongo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.