GithubHelp home page GithubHelp logo

Comments (13)

hawesie avatar hawesie commented on June 21, 2024

Is there anything we can do in mongodb_store or is this due to the static lib? (which has caused us grief elsewhere)

from mongodb_store.

lucasb-eyer avatar lucasb-eyer commented on June 21, 2024

Dynamic lib would be the easy way out. I'd have to play with a minimal example to see for the static case, but I don't really have time in the next two weeks, sorry! I'll post back when/if I do get something.

from mongodb_store.

marc-hanheide avatar marc-hanheide commented on June 21, 2024

We tried many different things today... no other than the fix @lucasb-eyer and I came up with worked. As @lucasb-eyer says, this ticket is more for documentation purposes. With indigo the problem will be gone, because finally mongoclient is dynamic in trusty. So, I close this for now

from mongodb_store.

lucasb-eyer avatar lucasb-eyer commented on June 21, 2024

Actually, after a good sleep, no. This happens because the shipped FindMongoDB.cmake doesn't do what it's supposed to do, specifically the first point:

  • Use find_package to detect other libraries that the library depends on
    • The arguments QUIETLY and REQUIRED should be forwarded (e.g. if current package was REQUIRED, the depencency should also be)

What currently is MongoDB_LIBRARIES should actually be MongoDB_LIBRARY, and a MongoDB_LIBRARIES which includes all the dependencies (boost-system and boost-filesystem and maybe more) and be used in CMakeList.txts using mongo.

Don't have the time to fix it now, but please re-open the issue.

from mongodb_store.

marc-hanheide avatar marc-hanheide commented on June 21, 2024

Not sure I get it (maybe because I'm still sleep deprived). Are you referring to https://github.com/strands-project/mongodb_store/blob/hydro-devel/mongodb_store/cmake/FindMongoDB.cmake shipped with mongodb_store? The I don't get why you suggest MongoDB_LIBRARY. That isn't defined... Or what don't I get here?

from mongodb_store.

lucasb-eyer avatar lucasb-eyer commented on June 21, 2024

Yes, I'm talking about that one. And what I'm saying is that foo_LIBRARY should usually be used for the foo library itself and nothing else, while foo_LIBRARIES should be a list containing the library itself plus its dependencies. In the current version of FindMongoDB.cmake, MongoDB_LIBRARIES is wrongly used for the library only, and nothing contains the library+dependencies. See the official README for more verbose details.

from mongodb_store.

marc-hanheide avatar marc-hanheide commented on June 21, 2024

Well, from the text (quoted from here)

XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.

I conclude that indeed it is correct to have libmongoclient.a listed in MongoDB_LIBRARIES. What you are saying is that also the others should be listed here (e.g. boost-filesystem), right?

I think I have to agree on that. The problem is that this is only needed IF libmongoclient is static. So, we need to improve this further, I see. Anyone an expert in cmake to make this work as it should?

from mongodb_store.

lucasb-eyer avatar lucasb-eyer commented on June 21, 2024

The first part is right.

The problem is that this is only needed IF libmongoclient is static.

In theory yes, but in practice it doesn't matter since linking to the same dynamic library multiple times is not a problem.

I'm sorry I don't have the time to fix it now ; I'm very "deadlined" these weeks, already spent more worktime on this than I should :-/

from mongodb_store.

marc-hanheide avatar marc-hanheide commented on June 21, 2024

can I assume this is fixed by #105?

from mongodb_store.

hawesie avatar hawesie commented on June 21, 2024

Let's just wait and see. I guess there's a chance I've done something to mess this up.

from mongodb_store.

lucasb-eyer avatar lucasb-eyer commented on June 21, 2024

I'll try it next week, I'm in an integration week right now. Edit: is it "in" or "on"?

from mongodb_store.

marc-hanheide avatar marc-hanheide commented on June 21, 2024

is fixed, I assume

from mongodb_store.

lucasb-eyer avatar lucasb-eyer commented on June 21, 2024

I completely lost this from my radar and don't know where to test anymore, sorry.

from mongodb_store.

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.