Package Details: mongo-cxx-driver 3.10.1-1

Git Clone URL: https://aur.archlinux.org/mongo-cxx-driver.git (read-only, click to copy)
Package Base: mongo-cxx-driver
Description: C++ driver for MongoDB
Upstream URL: http://mongocxx.org/
Keywords: mongodb
Licenses: Apache-2.0
Conflicts: libbsoncxx, libmongocxx
Provides: libbsoncxx, libmongocxx
Submitter: jbreams
Maintainer: luso58
Last Packager: luso58
Votes: 10
Popularity: 0.008243
First Submitted: 2016-01-28 21:25 (UTC)
Last Updated: 2024-03-21 19:54 (UTC)

Latest Comments

1 2 Next › Last »

luso58 commented on 2024-03-21 19:55 (UTC)

@Raimar

Thx, didn't realize. I updated it and fixed the build commands

Raimar commented on 2024-02-06 15:03 (UTC) (edited on 2024-02-06 15:05 (UTC) by Raimar)

It would be great to generalize the script by using

cmake --build .

and

cmake --install . --prefix "$pkgdir/usr"

This makes it possible to define a different prefered build tool like Ninja by using the environment variable CMAKE_GENERATOR=Ninja, which builds usually faster.

johnnyapol commented on 2022-05-22 21:36 (UTC) (edited on 2022-05-22 21:37 (UTC) by johnnyapol)

Current revision can't build on latest build toolchain and is out of date. The following PKGBUILD works for me:

# Maintainer: Aleksandr Matuzok <sherilynhope@gmail.com>
# Contributors: Patryk Jaworski <regalis@regalis.tech>, John Chen <john.chen@10gen.com>

pkgname=mongo-cxx-driver
pkgver=3.6.7
pkgrel=1
pkgdesc="C++ driver for MongoDB"
arch=('i686' 'x86_64')
url="http://mongocxx.org/"
license=("Apache")
depends=(libmongoc libbson)
makedepends=(cmake gcc libmongoc libbson boost)
provides=(libbsoncxx libmongocxx)
conflicts=(libbsoncxx libmongocxx)
source=(https://github.com/mongodb/mongo-cxx-driver/releases/download/r${pkgver}/mongo-cxx-driver-r${pkgver}.tar.gz)
sha256sums=('2c58005d4fe46f1973352fba821f7bb37e818cefc922377ce979a9fd1bff38ac')

build() {
    cd "${pkgname}-r$pkgver/build/"
    cmake \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr/ \
        -DCMAKE_CXX_STANDARD=17 \
        -DBSONCXX_POLY_USE_BOOST=1 \
        ../
    make
}

package() {
    cd "${pkgname}-r$pkgver/build/"
    make DESTDIR="$pkgdir/" install
}

sherilyn commented on 2019-10-09 18:44 (UTC)

You have to build EP_mnmlstc_core as root, as long as EP_mnmlstc_core devs will fix it. You can edit PKGBUILD file and add sudo. I removed sudo because its violates AUR rules. I will fix that as soon as itpossible.

LMBernardo commented on 2019-10-05 18:33 (UTC) (edited on 2019-10-15 03:16 (UTC) by LMBernardo)

@steinbuch

It looks like MNMLSTC/core requires root permissions to install to the default location. Not sure what the "correct" fix is, but the mongocxx documentation states:

If you are using the default MNMLSTC polyfill and are installing to a directory requiring root permissions, you should install the polyfill with sudo before running make so you don’t have to run all of make with sudo

Modifying the build() section of the PKGBUILD to the following builds and installs properly, however it seems to ignore DESTDIR and installs the EP_mnmlstc files directly to /usr/include/bsoncxx/v_noabi/bsoncxx/third_party instead of into the built package. This means that pacman will not be able to track / manage these files. Removing the sudo make EP_mnmlstc_core line and just running the entire make command as root also installs the files directly instead of in the package, so I'm not sure if this is a result of something being broken or just how the AUR package has always installed.

build() {
    cd "$pkgname-$pkgver/build"
    echo $pkgdir
    DESTDIR=$pkgdir cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_INSTALL_PREFIX=/usr
    DESTDIR=$pkgdir sudo make EP_mnmlstc_core -j$(grep -c proc /proc/cpuinfo)
    DESTDIR=$pkgdir make -j$(grep -c proc /proc/cpuinfo)
}

steinbuch commented on 2019-09-27 11:50 (UTC)

There must be some kind of permissions issue (I'm not building as root):

[ 2%] Performing install step for 'EP_mnmlstc_core' CMake Error at ./mongo-cxx-driver-r3.4.0/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install-Release.cmake:49 (message): Command failed: 2

'make' 'install'

See also

./mongo-cxx-driver-r3.4.0/build/src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install-*.log

make[2]: [src/bsoncxx/third_party/CMakeFiles/EP_mnmlstc_core.dir/build.make:75: src/bsoncxx/third_party/EP_mnmlstc_core-prefix/src/EP_mnmlstc_core-stamp/EP_mnmlstc_core-install] Error 1 make[1]: [CMakeFiles/Makefile2:484: src/bsoncxx/third_party/CMakeFiles/EP_mnmlstc_core.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

xantares commented on 2019-04-04 17:09 (UTC)

hello,

  • DONT build as root
  • also makepkg uses MAKEFLAGS, so no need to override -j make option:

build {

cd "$pkgname-$pkgver"

mkdir -p build && cd build

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..

make

package {

cd "$pkgname-$pkgver/build"

make install DESTDIR="$pkgdir"

gauravjuvekar commented on 2018-12-17 16:23 (UTC)

Packages should not install to /usr/local

From 19f6fbf2b57f6513d186064bc9e593adeb517e03 Mon Sep 17 00:00:00 2001
From: Gaurav Juvekar <gauravjuvekar@gmail.com>
Date: Sun, 16 Dec 2018 20:22:25 -0500
Subject: [PATCH] Don't install to /usr/local

---
 PKGBUILD | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index b3db26a..f4f83e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Aleksandr Matuzok <sherilynhope@gmail.com>
 pkgname=mongo-cxx-driver
 pkgver=r3.3.1
-pkgrel=2
+pkgrel=3
 pkgdesc="The official MongoDB C++ driver library"
 arch=('i686' 'x86_64')
 url="http://docs.mongodb.org/ecosystem/drivers/cpp/"
@@ -10,21 +10,14 @@ groups=()
 depends=("libmongoc")
 makedepends=("cmake")
 source=("https://github.com/mongodb/mongo-cxx-driver/archive/$pkgver.tar.gz")
-
-prepare() {
-   cd "$pkgname-$pkgver"
-    mkdir -p $pkgdir/usr
-}
-
 build() {
-   cd "$pkgname-$pkgver/build"
-    echo $pkgdir
-    DESTDIR=$pkgdir cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 
-    DESTDIR=$pkgdir make -j$(grep -c proc /proc/cpuinfo)
+    cd "$pkgname-$pkgver/build"
+    cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_CXX_STANDARD=17
+    make -j$(grep -c proc /proc/cpuinfo)
 }

 package() {
-   cd "$pkgname-$pkgver/build"
-    DESTDIR=$pkgdir make install
+    cd "$pkgname-$pkgver/build"
+    make DESTDIR="$pkgdir" install
 }
 md5sums=('2577EE351719CA4397C5F91FACE35CF6')
-- 
2.20.0

sherilyn commented on 2018-12-03 11:16 (UTC)

3.4.0 is not STABLE at the moment.