§2024-04-05

real	542m23.450s
user	2193m2.131s
sys	     635m25.492s
(mongo) alexlai@pi58G:~/build/mongo/build/install/bin$ ls
mongod  mongod.debug  mongos  mongos.debug  resmoke.py
(mongo) alexlai@pi58G:~/build/mongo/build/install/bin$ ls -l
total 6671920
-rwxr-xr-x 2 alexlai alexlai  169836856 Apr  5 23:23 mongod
-rwxr-xr-x 2 alexlai alexlai 4172085040 Apr  5 23:23 mongod.debug
-rwxr-xr-x 2 alexlai alexlai  122251536 Apr  5 23:18 mongos
-rwxr-xr-x 2 alexlai alexlai 2367851344 Apr  5 23:18 mongos.debug
-rwxr--r-- 2 alexlai alexlai       1782 Apr  5 14:29 resmoke.py
(mongo) alexlai@pi58G:~/build/mongo/build/install/bin$ ./mongod --version
db version v7.0.8
Build Info: {
    "version": "7.0.8",
    "gitVersion": "9224eea71cb3758d547be47ca60ba40049bf4c8b",
    "openSSLVersion": "OpenSSL 3.0.11 19 Sep 2023",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distarch": "aarch64",
        "target_arch": "aarch64"
    }
}
(mongo) alexlai@pi58G:~/build/mongo/build/install/bin$ ./mongos --version
mongos version v7.0.8
Build Info: {
    "version": "7.0.8",
    "gitVersion": "9224eea71cb3758d547be47ca60ba40049bf4c8b",
    "openSSLVersion": "OpenSSL 3.0.11 19 Sep 2023",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distarch": "aarch64",
        "target_arch": "aarch64"
    }
}

(mongo) alexlai@pi58G:~/build/mongo/build/install/bin$ ./mongod.debug --version
bash: ./mongod.debug: cannot execute binary file: Exec format error
(mongo) alexlai@pi58G:~/build/mongo/build/install/bin$ ./mongos.debug --version
bash: ./mongos.debug: cannot execute binary file: Exec format error
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ uname -a
Linux pi58G 6.1.43-rockchip-rk3588 #1.0.8 SMP Sat Feb  3 00:04:38 CST 2024 aarch64 GNU/Linux

sudo apt install build-essential
$ sudo apt install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libcurl4-openssl-dev : Depends: libcurl4 (= 7.88.1-10+deb12u5) but 8.5.0-2~bpo12+1 is to be installed
E: Unable to correct problems, you have held broken packages.
alexlai@pi58G:~$ sudo apt install libcurl4-nss-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libcurl3-nss nss-plugin-pem
Suggested packages:
  libcurl4-doc libidn-dev libkrb5-dev libldap2-dev libnss3-dev librtmp-dev libssh2-1-dev
The following NEW packages will be installed:
  libcurl3-nss libcurl4-nss-dev nss-plugin-pem
0 upgraded, 3 newly installed, 0 to remove and 61 not upgraded.
Need to get 902 kB of archives.
After this operation, 2,926 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
$ sudo apt install liblzma-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
liblzma-dev is already the newest version (5.4.1-0.2).
liblzma-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.

$ sudo apt install python3.11-venv
$ python3 -m venv ~/PYTHON-3.11.2  --prompt mongo # Optional (venv_path can be a path of your choice)
alexlai@pi58G:~$ source ~/PYTHON-3.11.2/bin/activate
(mongo) alexlai@pi58G:~$ which python3
/home/alexlai/PYTHON-3.11.2/bin/python3
(mongo) alexlai@pi58G:~$ which pip
/home/alexlai/PYTHON-3.11.2/bin/pip

(mongo) alexlai@pi58G:~$ python3 -m pip install 'poetry==1.5.1'

(mongo) alexlai@pi58G:~$ $ python3 -m poetry install --no-root --sync

P(mongo) alexlai@pi58G:~$ python3 -m poetry install --no-root --sync
Installing dependencies from lock file

Package operations: 0 installs, 0 updates, 48 removals

  • Removing attrs (23.2.0)
  • Removing build (0.10.0)
  • Removing cachecontrol (0.12.14)
  • Removing certifi (2024.2.2)
  • Removing cffi (1.16.0)
  • Removing charset-normalizer (3.3.2)
  • Removing cleo (2.1.0)
  • Removing crashtest (0.4.1)
  • Removing cryptography (42.0.5)
  • Removing distlib (0.3.8)
  • Removing dulwich (0.21.7)
  • Removing filelock (3.13.3)
  • Removing html5lib (1.1)
  • Removing idna (3.6)
  • Removing importlib-metadata (7.1.0)
  • Removing installer (0.7.0)
  • Removing jaraco-classes (3.4.0)
  • Removing jeepney (0.8.0)
  • Removing jsonschema (4.21.1)
  • Removing jsonschema-specifications (2023.12.1)
  • Removing keyring (23.13.1)
  • Removing lockfile (0.12.2)
  • Removing more-itertools (10.2.0)
  • Removing msgpack (1.0.8)
  • Removing packaging (24.0)
  • Removing pexpect (4.9.0)
  • Removing pkginfo (1.10.0)
  • Removing platformdirs (3.11.0)
  • Removing poetry (1.5.1)
  • Removing poetry-core (1.6.1)
  • Removing poetry-plugin-export (1.5.0)
  • Removing ptyprocess (0.7.0)
  • Removing pycparser (2.22)
  • Removing pyproject-hooks (1.0.0)
  • Removing rapidfuzz (3.7.0)
  • Removing referencing (0.34.0)
  • Removing requests (2.31.0)
  • Removing requests-toolbelt (1.0.0)
  • Removing rpds-py (0.18.0)
  • Removing secretstorage (3.3.3)
  • Removing shellingham (1.5.4)
  • Removing six (1.16.0)
  • Removing tomlkit (0.12.4)
  • Removing trove-classifiers (2024.3.25)
  • Removing urllib3 (1.26.18)
  • Removing virtualenv (20.25.1)
  • Removing webencodings (0.5.1)
  • Removing zipp (3.18.1)
$ mkdir -p build && cd $_
$ git clone https://github.com/mongodb/mongo.git && cd mongo
$ git checkout r7.0.0-rc8 -b test
Updating files: 100% (10380/10380), done.
Switched to a new branch 'test'

$ git tags
$ git checkout r7.0.8 -b test
Updating files: 100% (25638/25638), done.
Switched to a new branch 'test'

#!/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)
#
I’m trying to build MongoDB on an ODRIOD N2 with Armbian+Yunohost so I can install Wekan. (Usually I’m on Arch, but Yunohost is .deb orientated).

I’m trying to follow these 37 instructions, but python3 buildscripts/scons.py --ssl CC=gcc-8 CXX=g++-8 CCFLAGS="-march=armv8-a+crc -mtune=cortex-a53" --install-mode=hygienic --install-action=hardlink --separate-debug archive-core{,-debug} (note; switched to a53 not a72) slows the system down to just above a freeze within 5 minutes of work.

Are there any options I could set to see if that would help the build continue without locking the N2 up?

$ pip3 install -r etc/pip/compile-requirements.txt ???