ยง2024-01-27
$ sudo pacman -Syyuu
$ sudo pacman -S base-devel
resolving dependencies...
looking for conflicting packages...
Packages (19) autoconf-2.71-4 automake-1.16.5-2 bison-3.8.2-5 debugedit-5.0-5 fakeroot-1.31-2 flex-2.6.4-5 gc-8.2.4-1 gcc-12.1.0-2.1 guile-3.0.9-1 libisl-0.26-1 libmpc-1.3.1-1 libtool-2.4.7-2 m4-1.4.19-3 make-4.4.1-2 patch-2.7.6-10 pkgconf-1.8.1-1 texinfo-7.0.3-1 which-2.21-6 base-devel-1-1
Total Download Size: 46.56 MiB
Total Installed Size: 224.22 MiB
:: Proceed with installation? [Y/n]
$ sudo pacman -S openssl xz git python3
warning: openssl-3.1.4-1 is up to date -- reinstalling
warning: xz-5.4.5-1 is up to date -- reinstalling
warning: python-3.11.6-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (7) perl-error-0.17029-5 perl-mailtools-2.21-7 perl-timedate-2.33-5 git-2.43.0-1 openssl-3.1.4-1 python-3.11.6-1 xz-5.4.5-1
Total Download Size: 24.64 MiB
Total Installed Size: 130.19 MiB
Net Upgrade Size: 41.95 MiB
:: Proceed with installation? [Y/n] y
$ gcc --version
gcc (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Python3
$ python3 --version
Python 3.11.6
[alexlai@n2Mnjaro ~]$ python3 -m venv ~/PYTHON-3.11.6
[alexlai@n2Mnjaro ~]$ source ~/PYTHON-3.11.6/bin/activate
(PYTHON-3.11.6) [alexlai@n2Mnjaro ~]$ which python3
/home/alexlai/PYTHON-3.11.6/bin/python3
- git clone mongo
$ mkdir -p build && cd $_
$ git clone https://github.com/mongodb/mongo.git && cd mongo
$ git checkout r7.3.0-rc1 -b test
Switched to a new branch 'test'
- pip requirements
$ python3 -m pip install 'poetry==1.5.1'
...
nstalling collected packages: webencodings, trove-classifiers, ptyprocess, lockfile, distlib, zipp, urllib3, tomlkit, six, shellingham, rpds-py, rapidfuzz, pyproject-hooks, pycparser, poetry-core, platformdirs, pkginfo, pexpect, packaging, msgpack, more-itertools, jeepney, installer, idna, filelock, crashtest, charset-normalizer, certifi, attrs, virtualenv, requests, referencing, jaraco.classes, importlib-metadata, html5lib, dulwich, cleo, cffi, build, requests-toolbelt, jsonschema-specifications, cryptography, cachecontrol, SecretStorage, jsonschema, keyring, poetry-plugin-export, poetry
Successfully installed SecretStorage-3.3.3 attrs-23.2.0 build-0.10.0 cachecontrol-0.12.14 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-3.3.2 cleo-2.1.0 crashtest-0.4.1 cryptography-42.0.1 distlib-0.3.8 dulwich-0.21.7 filelock-3.13.1 html5lib-1.1 idna-3.6 importlib-metadata-7.0.1 installer-0.7.0 jaraco.classes-3.3.0 jeepney-0.8.0 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 keyring-23.13.1 lockfile-0.12.2 more-itertools-10.2.0 msgpack-1.0.7 packaging-23.2 pexpect-4.9.0 pkginfo-1.9.6 platformdirs-3.11.0 poetry-1.5.1 poetry-core-1.6.1 poetry-plugin-export-1.5.0 ptyprocess-0.7.0 pycparser-2.21 pyproject-hooks-1.0.0 rapidfuzz-3.6.1 referencing-0.32.1 requests-2.31.0 requests-toolbelt-1.0.0 rpds-py-0.17.1 shellingham-1.5.4 six-1.16.0 tomlkit-0.12.3 trove-classifiers-2024.1.8 urllib3-1.26.18 virtualenv-20.25.0 webencodings-0.5.1 zipp-3.17.0
[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
$ pip install --upgrade pip
$ python3 -m poetry install --no-root --sync
- ~/scripts/buildMongo.sh as (
chmod a+x buildMongo.sh
)
#!/bin/bash
# -j number of CPUS, no plus 2, odroid-n2 -j 6, odroid-hc4 -j4, orangePi5 -j 8
# execute form git clone https://github.com/mongodb/mongo.git && cd mongo
# under python3 eviromental control
# git checkout r7.0.0-rc8 -b test
# time python3 buildscripts/scons.py install-core -j6 --ssl --linker=gold CFLAGS="-march=armv8-a+crc -mtune=generic" --disable-warnings-as-errors >log 2>&1 &
time python3 buildscripts/scons.py install-core -j6 --ssl --linker=gold CFLAGS="-march=armv8-a+crc -mtune='cortex-a73.cortex-a53' " --disable-warnings-as-errors >log 2>&1 &
# CFLAGS="-march=armv8-a+crc -mtune='cortex-a73.cortex-a53' " 2023-07-25
#
# install-mongod
# install-mongos
# install-core (includes only mongod and mongos)
# install-servers (includes all server components)
# install-devcore (includes mongod, mongos, and jstestshell (formerly mongo shell))
# install-all (includes a complete end-user distribution and tests)
# install-all-meta (absolutely everything that can be built and installed)
#
- make it
(PYTHON-3.10.6) alexlai@hc4Jammy:~/build/mongo$ ~/scripts/buildMongo.sh
ps aux ; and look for python3 buildscripts/scons.py ... and write down the pid i.e. 1332
thentail -f log
to see the progress
-
2023-08-10:13:00 ,@n2Mnjaro-01.yushei.net:/opt/xfs/alexlai/build/mongo
- compile r7.1.0-alpha
= 2023-08-11 05:24 still compiling, but log is growing very slow, htop is not showing any busy activity - seeing src/mongo/util/summation.h:94:42 a lot and stay there like forever,
- mem used 3.49G/s.61G while swap 8.45G/13.4G, cpu 0=5 showing very little activity
- killed on 2023-08-15. failed!!!
- compile r7.1.0-alpha
-
2023-07-26 OK
real 3526m39943s
user 4219m57985s
sys 2985557s
[alexlai@n2Mnjaro ~]$ cd build/mongo/build/install/bin/
[alexlai@n2Mnjaro bin]$ ls
mongod mongos resmoke.py
[alexlai@n2Mnjaro bin]$ ls mongod mongos resmoke.py
[alexlai@n2Mnjaro bin]$ ./mongos --version mongos version v7.0.0-rc8 Build Info: { "version": "7.0.0-rc8", "gitVersion": "27da922959c12df48ae2ecf8aad0f37f42f71451", "openSSLVersion": "OpenSSL 3.1.1 30 May 2023", "modules": [], "allocator": "tcmalloc", "environment": { "distarch": "aarch64", "target_arch": "aarch64" } }
[alexlai@n2Mnjaro bin]$ ./mongod --version db version v7.0.0-rc8 Build Info: { "version": "7.0.0-rc8", "gitVersion": "27da922959c12df48ae2ecf8aad0f37f42f71451", "openSSLVersion": "OpenSSL 3.1.1 30 May 2023", "modules": [], "allocator": "tcmalloc", "environment": { "distarch": "aarch64", "target_arch": "aarch64" } }
[alexlai@n2Mnjaro bin]$ ls -l total 6520432 -rwxr-xr-x 2 alexlai alexlai 4250577184 Jul 28 02:30 mongod-aarch64-7.0.0-rc8-MnJaroN2 -rwxr-xr-x 2 alexlai alexlai 2426337936 Jul 28 01:56 mongos-aarch64-7.0.0-rc8-MnJaroN2 -rwxr--r-- 2 alexlai alexlai 1782 Jul 26 02:38 resmoke.py [alexlai@n2Mnjaro bin]$ strip --strip-all mongod-aarch64-7.0.0-rc8-MnJaroN2 [alexlai@n2Mnjaro bin]$ strip --strip-all mongos-aarch64-7.0.0-rc8-MnJaroN2 [alexlai@n2Mnjaro bin]$ ls -l total 262020 -rwxr-xr-x 2 alexlai alexlai 121585888 Jul 28 04:30 mongod-aarch64-7.0.0-rc8-MnJaroN2 -rwxr-xr-x 2 alexlai alexlai 88134176 Jul 28 04:30 mongos-aarch64-7.0.0-rc8-MnJaroN2 -rwxr--r-- 2 alexlai alexlai 1782 Jul 26 02:38 resmoke.py