Package Details: mongodb 4.0.12-2

Git Clone URL: https://aur.archlinux.org/mongodb.git (read-only)
Package Base: mongodb
Description: A high-performance, open source, schema-free document-oriented database
Upstream URL: https://www.mongodb.com/
Keywords: database document-oriented
Licenses: custom:SSPL
Submitter: felixonmars
Maintainer: jamespharvey20 (chrbayer)
Last Packager: jamespharvey20
Votes: 18
Popularity: 1.187930
First Submitted: 2019-01-18 22:08
Last Updated: 2019-08-15 03:00

Pinned Comments

jamespharvey20 commented on 2019-08-10 02:46

READ ME - aur/python2-scons is now required

The new dependency takes a while to compile, sorry.

extra/scons was based on python2 until its new release 4 days ago, 3.1.0-2. Now, it's based on python3. Upstream's build process is incompatible with python3, explaining why the previously succeeding build now fails. The first failure you run into is the SyntaxError: invalid syntax in SConstruct, in comments below.

There's 2 ways forward: 1. Patch in python3 support. 2. Require aur/python2-scons.

I'm going with option #2. Upstream has had merge requests open for several years adding support for python3, and they don't seem to care about it, because no comments have been on it for a year and a half now. See https://github.com/mongodb/mongo/pull/1216 and https://github.com/mongodb/mongo/pull/1195

If it were just a few small changes, I'd consider patching it in. Looking through these pull requests, it's at least hundreds of lines, maybe thousands, they aren't approved by upstream, and they don't apply cleanly to current versions.

jamespharvey20 commented on 2019-02-22 03:50

READ ME - Manual intervention potentially required upgrading to or past 4.0.6-2

If you never modified /etc/mongodb.conf, there is nothing you need to do, as pacman will install the new configuration file for you.

If pacman alerts you that a new configuration file is saved at /etc/mongodb.conf.pacnew, you must switch to it, or at least modify your existing one to enable forking.

Among other cleanups, 4.0.6-2 switches to:

  1. Upstream's systemd service file, which uses a systemd service type of forking, versus the old Arch-specific type of simple.

  2. Upstream's configuration file, which uses the YAML format introduced back in 2.6, versus the old Arch-specific configuration file using the 2.4 format.

If you had modified /etc/mongodb.conf, pacman will install the new one to /etc/mongodb.conf.pacnew. So, you will either need to: switch to the new one, and duplicate changes you made to the old one that you still need, considering the new file is now in the YAML format; or modify your existing one to enable forking. (Using the old 2.4 file format, adding fork: true should be what is needed.)

jamespharvey20 commented on 2019-02-15 09:58

READ ME - This is quite the package to build

You should have 180GB available just to build this. If you have less, you will run into various errors while building, and only some will reference disk space.

It takes a lot of time to build this. A user reported it took 6.5 hours on an Intel i7. 32 Xeon cores with a high-end NVMe takes an hour.

How much memory you need to build this is untested, but I'd guess having a low amount of memory could cause compilation errors.

If you have compilation problems, please use makepkg, or extra-x86_64-build from devtools, as AUR helpers are not officially supported.

Alternatively, there is the mongodb-bin package, which converts the pre-compiled Ubuntu package into one for Arch. Note Ubuntu's package may use different compilation options.

Latest Comments

1 2 3 4 Next › Last »

jamespharvey20 commented on 2019-08-15 02:10

Thanks jokke, pushed fix to work with aur/python2-scons renaming of its binaries, done so it no longer conflicts with extra/scons.

Upstream released 4.2.0 a couple of days ago. It causes two compilation failures, which is why I haven't released it. Upstream says they arguably should test building with compilation options to use dependencies as already installed system libraries, rather than obtaining and compiling each of its dependencies on its own. But, as of now, they don't do this before releases.

Upstream released a working patch in my https://jira.mongodb.org/browse/SERVER-42787 which cleanly applies to 4.2.0, fixing an immediate compilation error.

I'm waiting to hear back on my https://jira.mongodb.org/browse/SERVER-42813. Somewhat late in compilation, there's an error along the lines of part of the mongoDB compilation is expecting to have built wiredtiger from source itself rather than using the system library. I am hopeful they will resolve this quickly like with the first ticket, and that this will be the last compilation error. If they don't do so quickly, I'll likely release 4.2.0 which will build at least wiredtiger internally from source, and remove it as a dependency. (At least building all dependencies internally from source expands the space needed to build from 180GB to 260GB, so I'd prefer not to have to do this.)

jokke commented on 2019-08-12 15:46

This would probably already do the trick. Haven't tried yet though

diff --git a/.SRCINFO b/.SRCINFO
index 4226b0e..4efcc77 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -0,0 +1,2 @@
+# Generated by mksrcinfo v8
+# Mon Aug 12 15:45:30 UTC 2019
@@ -4 +6 @@ pkgbase = mongodb
-   pkgrel = 1
+   pkgrel = 2
diff --git a/PKGBUILD b/PKGBUILD
index f88d835..3731d15 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13 +13 @@ pkgver=4.0.12
-pkgrel=1
+pkgrel=2
@@ -79 +79 @@ build() {
-  scons core "${_scons_args[@]}"
+  scons2 core "${_scons_args[@]}"
@@ -87 +87 @@ check() {
-  scons unittests "${_scons_args[@]}"
+  scons2 unittests "${_scons_args[@]}"
@@ -105 +105 @@ check() {
-  scons dbtest "${_scons_args[@]}"
+  scons2 dbtest "${_scons_args[@]}"
@@ -108 +108 @@ check() {
-  scons integration_tests "${_scons_args[@]}"
+  scons2 integration_tests "${_scons_args[@]}"
@@ -115 +115 @@ package() {
-  scons install --prefix="${pkgdir}/usr" "${_scons_args[@]}"
+  scons2 install --prefix="${pkgdir}/usr" "${_scons_args[@]}"

jokke commented on 2019-08-11 10:57

Still fails to build after python2-scons changed the names of the binaries to include the suffix "2". e.g. scons2. See the PKGBUILD of python2-scons for more info.

jamespharvey20 commented on 2019-08-10 02:46

READ ME - aur/python2-scons is now required

The new dependency takes a while to compile, sorry.

extra/scons was based on python2 until its new release 4 days ago, 3.1.0-2. Now, it's based on python3. Upstream's build process is incompatible with python3, explaining why the previously succeeding build now fails. The first failure you run into is the SyntaxError: invalid syntax in SConstruct, in comments below.

There's 2 ways forward: 1. Patch in python3 support. 2. Require aur/python2-scons.

I'm going with option #2. Upstream has had merge requests open for several years adding support for python3, and they don't seem to care about it, because no comments have been on it for a year and a half now. See https://github.com/mongodb/mongo/pull/1216 and https://github.com/mongodb/mongo/pull/1195

If it were just a few small changes, I'd consider patching it in. Looking through these pull requests, it's at least hundreds of lines, maybe thousands, they aren't approved by upstream, and they don't apply cleanly to current versions.

yavorski commented on 2019-08-09 14:09

==> Starting build()...
scons: Reading SConscript files ...
  File "/home/lambda/dev/aur/mongodb/src/mongodb-src-r4.0.11/SConstruct", line 909

    print( "python version: " + " ".join( [ `i` for i in sys.version_info ] ) )

                                            ^

SyntaxError: invalid syntax

==> ERROR: A failure occurred in build().
    Aborting...

gazro commented on 2019-08-09 13:29

line 909

print( "python version: " + " ".join( [ `i` for i in sys.version_info ] ) )

                                        ^

SyntaxError: invalid syntax

==> ERROR: A failure occurred in build(). Aborting...

gonciarz commented on 2019-08-08 11:11

I cannot build a package. Those are logs: ==> Making package: mongodb 4.0.11-1 (Thu 08 Aug 2019 13:06:49 CEST) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> WARNING: Using existing $srcdir/ tree ==> Starting build()... scons: Reading SConscript files ... File "/home/rob/.cache/yay/mongodb/src/mongodb-src-r4.0.11/SConstruct", line 909

print( "python version: " + " ".join( [ `i` for i in sys.version_info ] ) )

                                        ^

SyntaxError: invalid syntax

jokke commented on 2019-08-07 22:10

Fails to build:

scons: Reading SConscript files ...
  File "/build/mongodb/src/mongodb-src-r4.0.11/SConstruct", line 909

    print( "python version: " + " ".join( [ `i` for i in sys.version_info ] ) )

                                            ^

SyntaxError: invalid syntax

yaron commented on 2019-05-22 11:47

RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version!

Failed :(

jamespharvey20 commented on 2019-03-30 23:45

Please keep all comments on this package about mongodb only, not the mongodb-bin variant or upstream tarballs. Questions specifically about those need to go elsewhere, like on the mongodb-bin package.

I'm having a bit of a hard time following the last 3 comments, in part because I can't see the original non-edited question. But, I think other than build diskspace usage, that all other discussion was really regarding upstream's tarballs and the mongodb-bin package. In case I'm wrong, please let me know. This mongodb package should build and install /usr/share/man/man1/mongo{d,s}.1.gz. If it doesn't, please say how you're building it. I'm using devtools.

Regarding why this needs 180GB of diskspace, that's only to build it, not install it. As for why, you'd want to ask upstream. There's been a thread discussing this here: https://groups.google.com/forum/#!searchin/mongodb-user/space%7Csort:date/mongodb-user/cHMbYPyD6f0/2dhGXqxsBwAJ

The majority of the time and space usage is in check(). They appear to be using an awful lot of data during their tests. If you don't run these tests, on my 32 Xeon cores, it finishes in 15 minutes instead of 60, and uses 10GB of diskspace instead of 165GB. I can't advocate skipping the tests, but I will note that if you install mongodb-bin, you're only getting testing on upstream's machine with its dependencies, not yours. So, maybe skipping the tests here is the same thing, since I always run them before pushing an updated version. But, I still recommend running them, as it's a database and integrity is paramount.