From https://github.com/mongodb/mongo-cxx-driver/commit/deb3e38dcccb8ec4074ace9ebfd093237a033d52 which as of today is release/stable
Using the following dockerfile to create a clean build environment for debian packages
FROM ubuntu:18.04 as build-base RUN apt-get update && apt-get install -y devscripts equivs # Build an appropriate CDriver as the current libmongoc from Canonical is too old FROM build-base as c-driver COPY mongo-c-driver /mongo-c-driverWORKDIR /mongo-c-driver RUN DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true mk-build-deps -i --tool "apt-get -o Debug::pkgProblemResolver=no -y" RUN DEB_BUILD_OPTIONS="nodoc" debuild -uc -us -b RUN mkdir /packages && mv ../*deb /packages && mv ../*.changes /packages # Build the CXX driver FROM build-base as cxx-driver COPY --from=c-driver /packages /c-driverRUN apt-get install -y /c-driver/*.deb COPY mongo-cxx-driver /mongo-cxx-driverWORKDIR /mongo-cxx-driver RUN DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true mk-build-deps -i --tool "apt-get -o Debug::pkgProblemResolver=no -y" RUN debuild -uc -us -b
The installer fails with several leftover .cmake files that are flagged via
dh_missing --fail-missing. The relevant CMake files are still installed to the correct locations once this stanza is deleted, so I suspect there is some cleanup code that needs to be written or is not doing its job
Alternatively - debuild may not be correct tool here - but is generally the way to do things. If this is the case some documentation on how debuild and friends are supposed to be invoked would valuable