@pimkodeli Does https://aur.archlinux.org/packages/mongodb-bin not work? I'm running that on the 7.1.9 kernel and it seems fine (granted I'm not really an advanced user). Failing that, have you looked at makepkg.conf? Dunno the CPU on your NUC, but for me adding -j16 (on an 8-core, 16-thread CPU) to MAKEFLAGS helped a lot.
Search Criteria
Package Details: mongodb 8.3.7-1
Package Actions
| Git Clone URL: | https://aur.archlinux.org/mongodb.git (read-only, click to copy) |
|---|---|
| Package Base: | mongodb |
| Description: | A high-performance, open source, schema-free document-oriented database |
| Upstream URL: | https://www.mongodb.com/ |
| Keywords: | database document-oriented nosql |
| Licenses: | SSPL-1.0 |
| Provides: | mongodb |
| Submitter: | felixonmars |
| Maintainer: | pricechrispy |
| Last Packager: | pricechrispy |
| Votes: | 37 |
| Popularity: | 0.52 |
| First Submitted: | 2019-01-18 22:08 (UTC) |
| Last Updated: | 2026-07-30 22:44 (UTC) |
Dependencies (32)
- curl (curl-gitAUR, curl-c-aresAUR)
- gcc15-libs
- glibc (glibc-gitAUR, glibc-git-native-pgoAUR, glibc-eacAUR)
- libsasl
- libstemmer (libstemmer-gitAUR)
- libunwind (libunwind-carbonAUR, libunwind-gitAUR)
- openssl (openssl-gitAUR, openssl-aegisAUR, openssl-staticAUR)
- snappy (snappy-gitAUR)
- yaml-cpp
- zlib (zlib-gitAUR, zlib-ng-compat-gitAUR, zlib-ng-compat)
- zstd (zstd-gitAUR, zstd-staticAUR)
- bazelisk (bazelisk-gitAUR) (make)
- bc (bc-ghAUR) (make)
- gcc15 (make)
- libxml2-legacy (make)
- lld (llvm-gitAUR, clang-static-gitAUR) (make)
- onetbb (make)
- python (make)
- python-boto3 (python-boto3-gitAUR) (make)
- python-cheetah3 (make)
- Show 12 more dependencies...
Required by (18)
- adminer (optional)
- alerta (optional)
- cronsun-bin
- flyenv-bin (optional)
- flyenv-git (optional)
- grasscutter-git (optional)
- icalingua++-electron-git (optional)
- icalingua++-git (optional)
- librechat (optional)
- nodejs-generator-scalatra (optional)
- omada-controller
- omada-controller-rxy
- pritunl-git (optional)
- pump.io (optional)
- python-ivre (optional)
- python-ivre-git (optional)
- python-pydal-git (optional)
- rocketchat-server
Sources (8)
olwilliams commented on 2026-08-27 03:06 (UTC)
pimkodeli commented on 2026-08-26 14:48 (UTC) (edited on 2026-08-26 15:26 (UTC) by pimkodeli)
I've been trying to update/install of this package and the compilation (on my intel archlinux box) takes more than 25gb of disk space and takes 10h on my Intel NUC system. it constantly fails because it runs out of disk space (and I need to keep increasing the virtual machine). Unsure why this package requires a client-side full recompile. is there no option that comes as a binary (the mongoldb-bin package doesn't work because it is incompatible with newer 7.xxx kernels).
how can this be avoided or sped up?
pricechrispy commented on 2026-06-28 22:39 (UTC) (edited on 2026-06-28 22:42 (UTC) by pricechrispy)
As of 2026-06-28:
-
Deviating from upstream compiler guidance
https://github.com/mongodb/mongo/blob/master/docs/building.md, now using GCC15, as GCC14 fails to compile due to:/build/gcc14/src/gcc14/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:154:10: fatal error: linux/scc.h: No such file or directory. -
Service now enables Glibc's RSEQ, which as a side effect disables TCMalloc's RSEQ usage, required for kernels 6.19+ until upstream resolves
https://jira.mongodb.org/browse/SERVER-121912. -
You may set the following to control cpu and ram required to build:
--local_resources=cpu=16 \
--local_resources=memory=HOST_RAM*.7 \
AlexBocken commented on 2026-06-01 19:43 (UTC)
Thanks for maintaining this package!
Had issues building cleanly until I changed the things below. If we require gcc14 to build i'd recommend not reading in CC etc. from /etc/makepkg.conf, otherwise the PKGBUILD tends to fail if these are set to something improper.
Further, some bazel esotericism to ensure proper compilers are used:
diff --git a/PKGBUILD b/PKGBUILD
index 41917f2..834ba65 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -79,16 +79,23 @@ prepare() {
build() {
cd "${srcdir}/mongo-r${pkgver}"
# Set gcc14 toolchain for Bazel to resolve C++ toolchain properly
- export CC="${CC:-gcc-14}"
- export CXX="${CXX:-g++-14}"
- export AR="${AR:-gcc-ar-14}"
-
+ export CC="gcc-14"
+ export CXX="g++-14"
+ export AR="gcc-ar-14"
+
# export BAZELISK_SKIP_WRAPPER=1
# export MONGO_BAZEL_WRAPPER_DEBUG=1
export USE_NATIVE_TOOLCHAIN=1
+ # Bazel's autodetected host/exec C++ toolchain (@local_config_cc) is generated
+ # once and cached in ~/.cache/bazel (outside srcdir, so makepkg -C never clears
+ # it). A stale cache can pin the "gcc" tool slot to clang, which then compiles
+ # exec-config targets (e.g. grpc codegen tools) with clang regardless of CC.
+ # Expunge so @local_config_cc is regenerated with the CC/CXX below.
+ bazelisk clean --expunge
+
# core does not build the mongo shell (jstestshell)
# bazelisk build install-core
@@ -108,6 +115,7 @@ build() {
--repo_env=CXX="${CXX}" \
--repo_env=AR="${AR}" \
--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0 \
+ --//bazel/config:compiler_type=gcc \
--cxxopt='-std=c++20' \
--host_cxxopt='-std=c++20' \
--cxxopt='-w' \
balwierz commented on 2026-05-07 10:03 (UTC)
Confirmed, it compiles with current GCC 15, no need for GCC-14. (it is a heavy dependency to compile this compiler)
pricechrispy commented on 2026-01-13 18:32 (UTC)
@omgold Per the mongodb build instructions, they verify functionality with GCC 14. To avoid introducing unknown side effects for such a large project, I won't deviate from their guidance on the major version of the compiler used. You may of course modify the PKGBUILD to do so if it suits your needs.
omgold commented on 2026-01-13 09:57 (UTC)
Is using GCC 14 still needed? For me it compiles just fine with the default version (Mongodb 8.2.3 with GCC 15.2.1).
pricechrispy commented on 2025-11-09 20:45 (UTC)
Current releases https://www.mongodb.com/try/download/community
pricechrispy commented on 2025-10-03 16:59 (UTC)
Before upgrading to 8.2, you must set the feature compatibility version to 8.0. See documentation: https://www.mongodb.com/docs/manual/release-notes/8.2-upgrade-standalone/#feature-compatibility-version
Note that building takes about 84gb of memory as of 8.2.1.
ItachiSan commented on 2025-09-14 08:59 (UTC) (edited on 2025-09-14 09:50 (UTC) by ItachiSan)
Hi, I host automatic builds here:
https://build.opensuse.org/package/show/home:ItachiSan:archlinux/mongodb
I saw that there is a download step; is there any way to avoid it?
Pinned Comments
pricechrispy commented on 2026-06-28 22:39 (UTC) (edited on 2026-06-28 22:42 (UTC) by pricechrispy)
As of 2026-06-28:
Deviating from upstream compiler guidance
https://github.com/mongodb/mongo/blob/master/docs/building.md, now using GCC15, as GCC14 fails to compile due to:/build/gcc14/src/gcc14/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:154:10: fatal error: linux/scc.h: No such file or directory.Service now enables Glibc's RSEQ, which as a side effect disables TCMalloc's RSEQ usage, required for kernels 6.19+ until upstream resolves
https://jira.mongodb.org/browse/SERVER-121912.You may set the following to control cpu and ram required to build:
pricechrispy commented on 2025-11-09 20:45 (UTC)
Current releases https://www.mongodb.com/try/download/community
pricechrispy commented on 2025-10-03 16:59 (UTC)
Before upgrading to 8.2, you must set the feature compatibility version to 8.0. See documentation: https://www.mongodb.com/docs/manual/release-notes/8.2-upgrade-standalone/#feature-compatibility-version
Note that building takes about 84gb of memory as of 8.2.1.