You are not logged in.

#1 2022-01-02 12:33:40

ib
Member
Registered: 2021-12-11
Posts: 25

How do I stop compile time from interrupting?

I am building mongodb 4.2 package with aur. During compilation, I constantly see errors:

scons: *** [build/opt/mongo/db/concurrency/lock_manager.o] Error 1
scons: building terminated because of errors.
build/opt/mongo/db/query/plan_cache.o failed: Error 1
build/opt/mongo/db/concurrency/lock_manager.o failed: Error 1
==> ERROR: A failure occurred in build().

After the next attempt:

scons: *** [build/opt/mongo/db/free_mon/free_mon_mongod.o] Error 1
scons: building terminated because of errors.
build/opt/mongo/db/repl/local_oplog_info.o failed: Error 1
build/opt/mongo/db/free_mon/free_mon_mongod.o failed: Error 1
==> ERROR: A failure occurred in build().
    Aborting...

And so on. The files are compiled but the next one gets an error.
Is this a problem with my processor, or is it something weird about it?

Last edited by ib (2022-01-02 12:37:00)

Offline

#2 2022-01-02 12:46:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: How do I stop compile time from interrupting?

You cut out the parts with the actual errors.

First thing to consider with mongodb, though, is your system. It requires a ton of RAM and disk space, as well as processor time.

Offline

#3 2022-01-02 13:03:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: How do I stop compile time from interrupting?

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2022-01-02 22:03:04

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: How do I stop compile time from interrupting?

git diff of changes needed to make the package build.  No other testing performed

diff --git a/PKGBUILD b/PKGBUILD
index bc6ec34..4f44084 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,32 +9,36 @@
 
 pkgname=mongodb
 # #.<odd number>.# releases are unstable development/testing
-pkgver=4.2.8
+pkgver=4.4.11
 pkgrel=1
 pkgdesc="A high-performance, open source, schema-free document-oriented database"
 arch=("x86_64")
 url="https://www.${pkgname}.com/"
 license=("custom:SSPL")
 # lsb-release::/etc/lsb-release required by src/mongo/util/processinfo_linux.cpp::getLinuxDistro()
-depends=("curl" "libstemmer" "lsb-release" "snappy" "gperftools")
+depends=("curl" "libstemmer" "lsb-release" "snappy" "gperftools" "boost-libs" "pcre" "zstd")
 optdepends=("${pkgname}-tools: mongoimport, mongodump, mongotop, etc")
-makedepends=("scons" "python-psutil" "python-setuptools" "python-regex" "python-cheetah3" "python-yaml" "python-requests")
+makedepends=("scons" "python-psutil" "python-setuptools" "python-regex" "python-cheetah3" "python-yaml" "python-requests" "boost" "libunwind")
 checkdepends=("python-pymongo")
 backup=("etc/${pkgname}.conf")
 source=(
   "http://downloads.${pkgname}.org/src/${pkgname}-src-r${pkgver}.tar.gz"
+  optional.patch
   "${pkgname}.sysusers"
   "${pkgname}.tmpfiles"
 )
-sha256sums=('e8880277e3910afd82c71ed61861d518f2040cbc062e00a26d53a3224284db8f'
+sha256sums=('360b79c640de4bad7b749890d3aa50f99399ba23d01b941e6aaca2d04462b161'
+            'ff365bc00ecf504ecfff10b75681ed710629d8bae461d82a31d486061fc43121'
             '3757d548cfb0e697f59b9104f39a344bb3d15f802608085f838cb2495c065795'
             'b7d18726225cd447e353007f896ff7e4cbedb2f641077bce70ab9d292e8f8d39')
 
 _scons_args=(
-  #--use-system-pcre # wait for pcre 8.44+ https://jira.mongodb.org/browse/SERVER-40836 and https://jira.mongodb.org/browse/SERVER-42990
+  --use-system-pcre # wait for pcre 8.44+ https://jira.mongodb.org/browse/SERVER-40836 and https://jira.mongodb.org/browse/SERVER-42990
   --use-system-snappy
   # --use-system-yaml # https://jira.mongodb.org/browse/SERVER-43980
   --use-system-zlib
+  --use-system-zstd
+  --use-system-libunwind
   #--use-system-wiredtiger # https://jira.mongodb.org/browse/SERVER-42813 upstream broke this in 4.2.0, says in meantime not to use it
   --use-system-stemmer
   --use-sasl-client
@@ -43,14 +47,16 @@ _scons_args=(
   # --use-system-asio     # https://jira.mongodb.org/browse/SERVER-21839 marked as fixed, but still doesn't compile.  MongoDB uses custom patches.
   # --use-system-icu      # Doesn't compile
   --use-system-tcmalloc   # in gperftools
-  # --use-system-boost    # Doesn't compile
+  --use-system-boost      # 
   # --use-system-valgrind # Compiles, but namcap says not used
-  # --use-system-sqlite   #   "
+  # --use-system-sqlite   # 
   # --use-system-mongo-c  # Doesn't compile
+  CPPDEFINES=BOOST_LOG_DYN_LINK
 )
 
 prepare() {
   cd "${srcdir}/${pkgname}-src-r${pkgver}"
+  patch -p1 -i ../optional.patch
 
   # Keep historical Arch dbPath
   sed -i 's|dbPath: /var/lib/mongo|dbPath: /var/lib/mongodb|' rpm/mongod.conf
@@ -81,10 +87,10 @@ build() {
   cd "${srcdir}/${pkgname}-src-r${pkgver}"
 
   export SCONSFLAGS="$MAKEFLAGS"
-  scons core "${_scons_args[@]}"
+  scons install-core "${_scons_args[@]}"
 }
 
-check() {
+check_() {
   # Before 4.2.0, only 8 unit tests would fail under devtools, because mlock() is not available under systemd-nspawn
   # See https://jira.mongodb.org/browse/SERVER-32773
   # 4.2.0 uses mlock() in many more places.  At first attempt, I had 24 tests pass, and 345 skipped due to the failing test.
@@ -116,7 +122,7 @@ check() {
 package() {
   cd "${srcdir}/${pkgname}-src-r${pkgver}"
 
-  scons install --prefix="${pkgdir}/usr" "${_scons_args[@]}"
+  scons install-core "${_scons_args[@]}" PREFIX=/usr DESTDIR="$pkgdir"
 
   # Keep historical Arch conf file name
   install -Dm644 "rpm/mongod.conf" "${pkgdir}/etc/${pkgname}.conf"
@@ -131,8 +137,9 @@ package() {
 
   install -Dm644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
   install -Dm644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
-  install -Dm644 LICENSE-Community.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-Community.txt"
+  install -Dm644 "${pkgdir}"/usr/{THIRD-PARTY-NOTICES,LICENSE-Community.txt,MPL-2} -t "${pkgdir}"/usr/share/licenses/${pkgname}
+  rm "${pkgdir}"/usr/{THIRD-PARTY-NOTICES,LICENSE-Community.txt,MPL-2,README}
 
   # This script won't run on Arch. If needed, see AUR package mongodb-compass.
-  rm "${pkgdir}/usr/bin/install_compass"
+#  rm "${pkgdir}/usr/bin/install_compass"
 }
diff --git a/optional.patch b/optional.patch
new file mode 100644
index 0000000..568b975
--- /dev/null
+++ b/optional.patch
@@ -0,0 +1,12 @@
+diff --git a/src/mongo/db/exec/plan_stats.h b/src/mongo/db/exec/plan_stats.h
+index ea75f673..a1d9f78e 100644
+--- a/src/mongo/db/exec/plan_stats.h
++++ b/src/mongo/db/exec/plan_stats.h
+@@ -33,6 +33,7 @@
+ #include <cstdlib>
+ #include <string>
+ #include <vector>
++#include <optional>
+ 
+ #include "mongo/db/index/multikey_paths.h"
+ #include "mongo/db/jsobj.h"

Last edited by loqs (2022-01-02 22:27:36)

Offline

#5 2022-01-03 11:49:32

ib
Member
Registered: 2021-12-11
Posts: 25

Re: How do I stop compile time from interrupting?

Scimmia wrote:

You cut out the parts with the actual errors.

First thing to consider with mongodb, though, is your system. It requires a ton of RAM and disk space, as well as processor time.

That's all I see on the screen. There are no other mistakes anywhere

Offline

#6 2022-01-03 16:13:44

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: How do I stop compile time from interrupting?

ib wrote:

That's all I see on the screen. There are no other mistakes anywhere

See the makepkg.8 --log to log output.
The error on this system was on line 5330 of build.log while output continued to 8000 lines which is why all the output is requested.
Due to parallel compilation where the error will be located will change from run to run.

What is the result when you apply the changes I provided?

Last edited by loqs (2022-01-03 16:29:12)

Offline

Board footer

Powered by FluxBB