-
Notifications
You must be signed in to change notification settings - Fork 456
CDRIVER-3717 show dev packages in install instructions #1270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Use `-dev` packages in default instructions. Users reading instructions may be more likely to want to build applications with the C driver. Link to Debian package pages to reference version. fix format on debian instructions
Use `-devel` packages in default instructions. Users reading instructions may be more likely to want to build applications with the C driver.
src/libmongoc/doc/installing.rst
Outdated
$ dnf install mongo-c-driver | ||
$ dnf install mongo-c-driver-devel | ||
The ``mongo-c-driver-devel`` package includes headers required to build applications using libmongoc. To check which version is available, see `https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver-devel/ <https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver-devel/>`_. To only install the libraries without headers, install the ``mongo-c-driver`` package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rST recognizes inline URIs and transforms them into hyperlinks automatically, so you can omit the explicit link markup.
The ``mongo-c-driver-devel`` package includes headers required to build applications using libmongoc. To check which version is available, see `https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver-devel/ <https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver-devel/>`_. To only install the libraries without headers, install the ``mongo-c-driver`` package. | |
The ``mongo-c-driver-devel`` package includes headers required to build applications using libmongoc. To check which version is available, see https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver-devel/. To only install the libraries without headers, install the ``mongo-c-driver`` package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the tip! Suggestion was applied on this link and others.
src/libmongoc/doc/installing.rst
Outdated
$ apt-get install libmongoc-1.0-0 | ||
$ apt-get install libmongoc-dev | ||
The ``libmongoc-dev`` package includes headers required to build applications using libmongoc. To check which version is available, see https://packages.debian.org/stable/libmongoc-dev. To only install the libraries without headers, install the ``libmongoc-1.0-0`` package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend making one of two changes here. Either use the package tracking system (PTS) status page for the mongo-c-driver package (https://tracker.debian.org/pkg/mongo-c-driver) and direct the user to look in the "versions" box on the left to see the version corresponding to the version of Debian that they are running.
Or, even better, direct them to execute apt-cache policy libmongoc-dev
instead. Pointing them to a web page will work if they are using Debian but might be confusing for Ubuntu (or other derivative) users who are not aware that each distro maintains its own status page. The apt-cache policy
command will produce the correct distro-specific output (including accounting for things like PPAs and other alternative apt sources) in any place where you can reasonably expect apt-get install
to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. I updated to suggest using apt-cache policy libmongoc-dev
. Here is the sample output of apt-cache policy libmongoc-dev
run on Ubuntu 22.04:
# apt-cache policy libmongoc-dev
libmongoc-dev:
Installed: (none)
Candidate: 1.21.0-1build1
Version table:
1.21.0-1build1 500
500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
|
||
On recent Red Hat systems, such as CentOS and RHEL 7, a mongo-c-driver package is available in the `EPEL <https://fedoraproject.org/wiki/EPEL>`_ repository. To check which version is available, see `https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver/ <https://packages.fedoraproject.org/pkgs/mongo-c-driver/mongo-c-driver/>`_. The package can be installed with: | ||
On recent Red Hat systems, such as CentOS and RHEL 7, a mongo-c-driver-devel package is available in the `EPEL <https://fedoraproject.org/wiki/EPEL>`_ repository. The package can be installed with: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am OK with directing Fedora/RHEL users to the websites, since there is not as much a proliferation of derivatives as with Debian and Ubuntu.
$ apt-get install libbson-dev | ||
The ``libbson-dev`` package includes headers required to build applications using libbson. To check which version is available, see https://packages.debian.org/stable/libbson-dev. To only install the libraries without headers, install the ``libbson-1.0-0`` package. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as with the comment above about libmongoc-dev
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
libmongoc-dev
andlibbson-dev
packages.mongo-c-driver-devel
andlibbson-devel
packages.Background & Motivation
The Install libmongoc with a Package Manager instructions show install of the
libmongoc-1.0-0
package.The
libmongoc-1.0-0
package does not include headers:As a result, users attempting to build an application after installing
libmongoc-1.0-0
may receive an error attempting to locate the cmake or pkg-config file. CDRIVER-3717 links to a Stack Overflow post referencing this issue: https://stackoverflow.com/questions/62289167/compiling-c-program-with-libmongoc-1-0/The
libmongoc-dev
package includes headers:I expect the more common use case for a user reading the installation documentation is to develop an application.