Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1070

Confusing installation instructions

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.1.0
    • Affects Version/s: None
    • Component/s: Documentation
    • Labels:
      None

      Copied from notes on a Stackoverflow question so we don't lose track of it.

      A couple notable issues:

      The tutorial points to a specific file to fetch via curl rather than pointing to the github repository and suggesting doing a clone. This is a recipe for being a bit out of date. If I tell my infrastructure to fetch release 3.0.1, it will happily do that forever, rather than updating. That said, it appears that compiling from git is fine.
      A prerequisite is installing libmongoc. It sure looks like installing from standard ubuntu packages is enough, since that's what the referenced page says. But the mongocxx installer wants >=1.3.4. So installing from git is required.
      It depends on libbson >= 1.3.4, which is later than the ubuntu 16.04 installed version. So installing that, too, from git is required.
      Note that none of the git packages specify which branch or tag to request in order to get a production build. Looking at all the tags on master and picking the numerically largest with no "rc" in the name seems to work. A tag called "release" or "current" would be oh-so-kind.
      The build (typing make) tries to do a make install of the subpackage EP_mnmlstc_core, and this fails. So the entire build apparently has to run as root.
      The example at the end of the tutorial presents build instructions that assume that everything you've done is somehow known to pkg-config, but the instructions never suggested how to make pkg-config aware of you. I just manually added cflags and ldflags. For me, that became this, although (warning) I'm still chasing down some symbols.

      I see these specific issues to address:

      1. We need to provide a stable git reference for use in installation instructions. UPDATE: done
      2. We need to provide guidance on installing the correct versions of libmongoc, such as a git reference for installation. UPDATE: docs mention specific versions; opened CDRIVER-1904 to request permalink for stable tarball
      3. We need to document that the build ("make") stage tries to install install EP_mnmlstic_core by default; if this requires sudo (if the install directory is not owned by root) we need to mention that. (Separately, we should find a way to break those stages apart.) UPDATE: done
      4. We need to give better instructions on using pkg-config. UPDATE: doc patch ready

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: