ยง2024-10-12
A freshly ubuntu Noble.
It looks like you can not do native comipling on odroid anymore. Failed!!
~$ which python3
/usr/bin/python3
alexlai@hc4Bookworm:~$ pip --version
-bash: pip: command not found
alexlai@hc4Bookworm:~$ python3 --version
Python 3.11.2
- install requirement for compiling your own pyhton
sudo apt-get update && \
sudo apt-get install -y build-essential checkinstall \
libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev \
libcurl4-openssl-dev liblzma-dev git wget zlib1g-dev libbz2-dev \
libffi-dev tk-dev libgdbm-compat-dev libncurses5-dev libncursesw5-dev git \
python-dev-is-python3 libssl-dev python3.12-venv
2. compile your own python3 <-- skip
mkdir -p build/src && cd $_
export PYTHON_VERSION=3.10.15
wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz
cd ..
tar xvf src/Python-$PYTHON_VERSION.tar.xz &&
cd Python-$PYTHON_VERSION
./configure --enable-optimizations --with-ensurepip=install &&
make -j 6 &&
sudo make altinstall
3. verifyy install <-- skip
$ python3.13 --version Python 3.13.0 alexlai@hc4Bookworm:~/build/Python-3.13.0$ pip3.13 --version pip 24.2 from /usr/local/lib/python3.13/site-packages/pip (python 3.13)
4. git clone
$ cd ~/build
git clone https://github.com/mongodb/mongo.git && cd mongo
- setup python control
alexlai@hc4Noble:~$ python3 --version
Python 3.12.3
$ sudo apt install python3.12-venv
$ python3 -m venv ~/PYTHON-3.12.3
$ source ~/PYTHON-3.12.3/bin/activate
(PYTHON-3.12.3) alexlai@hc4Noble:~$ which python3
/home/alexlai/PYTHON-3.12.3/bin/python3
(PYTHON-3.12.3) alexlai@hc4Noble:~$ which pip pip3
/home/alexlai/PYTHON-3.12.3/bin/pip
/home/alexlai/PYTHON-3.12.3/bin/pip3
$ sudo apt install python-dev-is-python3 libssl-dev
$ export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
$ python3.13 -m venv ~/PYTHON-3.13.0
$ source ~/PYTHON-3.12.3/bin/activate
(PYTHON-3.12.3) alexlai@hc4Noble:~/build/mongo$ buildscripts/poetry_sync.sh
$ buildscripts/poetry_sync.sh
Using '/home/alexlai/PYTHON-3.11.2/bin/python3' based on VIRTUAL_ENV=/home/alexlai/PYTHON-3.11.2
/home/alexlai/PYTHON-3.11.2/bin/python3 -m pip install --require-virtualenv poetry==1.8.3
....
Installing collected packages: trove-classifiers, ptyprocess, fastjsonschema, distlib, zipp, urllib3, tomlkit, shellingham, rapidfuzz, pyproject-hooks, pycparser, poetry-core, platformdirs, pkginfo, pexpect, packaging, msgpack, more-itertools, jeepney, installer, idna, filelock, crashtest, charset-normalizer, certifi, virtualenv, requests, jaraco.classes, importlib-metadata, dulwich, cleo, cffi, build, requests-toolbelt, cryptography, cachecontrol, SecretStorage, keyring, poetry-plugin-export, poetry
Successfully installed SecretStorage-3.3.3 build-1.2.2.post1 cachecontrol-0.14.0 certifi-2024.8.30 cffi-1.17.1 charset-normalizer-3.4.0 cleo-2.1.0 crashtest-0.4.1 cryptography-43.0.1 distlib-0.3.9 dulwich-0.21.7 fastjsonschema-2.20.0 filelock-3.16.1 idna-3.10 importlib-metadata-8.5.0 installer-0.7.0 jaraco.classes-3.4.0 jeepney-0.8.0 keyring-24.3.1 more-itertools-10.5.0 msgpack-1.1.0 packaging-24.1 pexpect-4.9.0 pkginfo-1.11.2 platformdirs-4.3.6 poetry-1.8.3 poetry-core-1.9.0 poetry-plugin-export-1.8.0 ptyprocess-0.7.0 pycparser-2.22 pyproject-hooks-1.2.0 rapidfuzz-3.10.0 requests-2.32.3 requests-toolbelt-1.0.0 shellingham-1.5.4 tomlkit-0.13.2 trove-classifiers-2024.10.11 urllib3-2.2.3 virtualenv-20.26.6 zipp-3.20.2
env PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring /home/alexlai/PYTHON-3.11.2/bin/python3 -m poetry install --no-root --sync
(PYTHON-3.11.2) alexlai@hc4Bookworm:~/build/mongo$ 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 Checking required python packages... Requirements list: Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 0 removals, 183 skipped
- Installing greenlet (3.0.3): Skipped for the following reason: Not required
- Installing python-utils (3.8.2): Skipped for the following reason: Not required
- Installing zope-event (5.0): Skipped for the following reason: Not required
- Installing argcomplete (3.5.0): Skipped for the following reason: Already installed
- Installing asn1crypto (1.5.1): Skipped for the following reason: Already installed
- Installing astroid (2.15.8): Skipped for the following reason: Already installed
- Installing automat (22.10.0): Skipped for the following reason: Already installed
- Installing blinker (1.8.2): Skipped for the following reason: Already installed
- Installing attrs (24.2.0): Skipped for the following reason: Already installed
- Installing botocore (1.34.157): Skipped for the following reason: Already installed
- Installing build (1.2.1): Skipped for the following reason: Already installed
- Installing cachecontrol (0.14.0): Skipped for the following reason: Already installed
- Installing bottle (0.12.25): Skipped for the following reason: Already installed
- Installing cffi (1.17.0): Skipped for the following reason: Already installed
- Installing cheetah3 (3.2.6.post1): Skipped for the following reason: Already installed
- Installing cleo (2.1.0): Skipped for the following reason: Already installed
- Installing boto3 (1.34.157): Skipped for the following reason: Already installed
- Installing charset-normalizer (3.3.2): Skipped for the following reason: Already installed
- Installing certifi (2024.7.4): Skipped for the following reason: Already installed
- Installing click (8.1.7): Skipped for the following reason: Already installed
- Installing colorama (0.4.6): Skipped for the following reason: Already installed
- Installing constantly (23.10.4): Skipped for the following reason: Already installed
- Installing crashtest (0.4.1): Skipped for the following reason: Already installed
- Installing cryptography (36.0.2): Skipped for the following reason: Already installed
- Installing curatorbin (1.2.4): Skipped for the following reason: Already installed
- Installing cxxfilt (0.3.0): Skipped for the following reason: Not required
- Installing decorator (5.1.1): Skipped for the following reason: Already installed
- Installing defusedxml (0.7.1): Skipped for the following reason: Already installed
- Installing deprecated (1.2.14): Skipped for the following reason: Already installed
- Installing dill (0.3.8): Skipped for the following reason: Already installed
- Installing distlib (0.3.8): Skipped for the following reason: Already installed
- Installing distro (1.9.0): Skipped for the following reason: Already installed
- Installing enum-compat (0.0.3): Skipped for the following reason: Already installed
- Installing docker (7.1.0): Skipped for the following reason: Already installed
- Installing dulwich (0.21.7): Skipped for the following reason: Already installed
- Installing dnspython (2.6.1): Skipped for the following reason: Already installed
- Installing eventlet (0.36.1): Skipped for the following reason: Not required
- Installing filelock (3.15.4): Skipped for the following reason: Already installed
- Installing evergreen-py (3.9.0): Skipped for the following reason: Already installed
- Installing fastjsonschema (2.20.0): Skipped for the following reason: Already installed
- Installing evergreen-lint (0.1.9): Skipped for the following reason: Already installed
- Installing flask (2.3.3): Skipped for the following reason: Already installed
- Installing flask-cors (4.0.1): Skipped for the following reason: Not required
- Installing gdbmongo (0.15.1): Skipped for the following reason: Already installed
- Installing geckodriver-autoinstaller (0.1.0): Skipped for the following reason: Already installed
- Installing gevent (24.2.1): Skipped for the following reason: Not required
- Installing gitdb (4.0.11): Skipped for the following reason: Already installed
- Installing gitpython (3.1.43): Skipped for the following reason: Already installed
- Installing idna (3.7): Skipped for the following reason: Already installed
- Installing importlib-metadata (8.0.0): Skipped for the following reason: Already installed
- Installing hyperlink (21.0.0): Skipped for the following reason: Already installed
- Installing inject (5.2.1): Skipped for the following reason: Already installed
- Installing installer (0.7.0): Skipped for the following reason: Already installed
- Installing incremental (22.10.0): Skipped for the following reason: Already installed
- Installing itsdangerous (2.2.0): Skipped for the following reason: Already installed
- Installing h11 (0.14.0): Skipped for the following reason: Already installed
- Installing isort (5.13.2): Skipped for the following reason: Already installed
- Installing googleapis-common-protos (1.63.2): Skipped for the following reason: Already installed
- Installing jaraco-classes (3.4.0): Skipped for the following reason: Already installed
- Installing jeepney (0.8.0): Skipped for the following reason: Already installed
- Installing jinja2 (3.1.4): Skipped for the following reason: Already installed
- Installing jira (3.1.1): Skipped for the following reason: Already installed
- Installing jmespath (1.0.1): Skipped for the following reason: Already installed
- Installing jsonschema (4.23.0): Skipped for the following reason: Already installed
- Installing jsonschema-specifications (2023.12.1): Skipped for the following reason: Already installed
- Installing keyring (24.3.1): Skipped for the following reason: Already installed
- Installing lazy-object-proxy (1.10.0): Skipped for the following reason: Already installed
- Installing markupsafe (2.1.5): Skipped for the following reason: Already installed
- Installing lxml (5.2.2): Skipped for the following reason: Not required
- Installing mdurl (0.1.2): Skipped for the following reason: Already installed
- Installing ldaptor (19.0.0): Skipped for the following reason: Already installed
- Installing mccabe (0.7.0): Skipped for the following reason: Already installed
- Installing markdown-it-py (3.0.0): Skipped for the following reason: Already installed
- Installing memory-profiler (0.61.0): Skipped for the following reason: Already installed
- Installing mongomock (4.1.2): Skipped for the following reason: Already installed
- Installing mongo-ninja-python (1.11.1.7): Skipped for the following reason: Already installed
- Installing msgpack (1.0.8): Skipped for the following reason: Already installed
- Installing mock (5.1.0): Skipped for the following reason: Already installed
- Installing mypy-extensions (1.0.0): Skipped for the following reason: Already installed
- Installing mongo-tooling-metrics (1.0.8): Skipped for the following reason: Already installed
- Installing mypy (1.11.1): Skipped for the following reason: Already installed
- Installing more-itertools (10.4.0): Skipped for the following reason: Already installed
- Installing networkx (3.3): Skipped for the following reason: Already installed
- Installing oauthlib (3.2.2): Skipped for the following reason: Already installed
- Installing ocspbuilder (0.10.2): Skipped for the following reason: Already installed
- Installing ocspresponder (0.5.0): Skipped for the following reason: Already installed
- Installing opentelemetry-api (1.26.0): Skipped for the following reason: Already installed
- Installing opentelemetry-exporter-otlp-proto-common (1.26.0): Skipped for the following reason: Already installed
- Installing opentelemetry-proto (1.26.0): Skipped for the following reason: Already installed
- Installing opentelemetry-sdk (1.26.0): Skipped for the following reason: Already installed
- Installing packaging (23.2): Skipped for the following reason: Already installed
- Installing oscrypto (1.3.0): Skipped for the following reason: Already installed
- Installing pathspec (0.12.1): Skipped for the following reason: Already installed
- Installing opentelemetry-semantic-conventions (0.47b0): Skipped for the following reason: Already installed
- Installing passlib (1.7.4): Skipped for the following reason: Already installed
- Installing pkce (1.0.3): Skipped for the following reason: Already installed
- Installing pkginfo (1.11.1): Skipped for the following reason: Already installed
- Installing pipx (1.6.0): Skipped for the following reason: Already installed
- Installing poetry (1.8.3): Skipped for the following reason: Already installed
- Installing pexpect (4.9.0): Skipped for the following reason: Already installed
- Installing poetry-plugin-export (1.8.0): Skipped for the following reason: Already installed
- Installing progressbar2 (4.4.2): Skipped for the following reason: Not required
- Installing poetry-core (1.9.0): Skipped for the following reason: Already installed
- Installing proxy-protocol (0.11.3): Skipped for the following reason: Already installed
- Installing outcome (1.3.0.post0): Skipped for the following reason: Already installed
- Installing ptyprocess (0.7.0): Skipped for the following reason: Already installed
- Installing platformdirs (4.2.2): Skipped for the following reason: Already installed
- Installing py (1.11.0): Skipped for the following reason: Already installed
- Installing protobuf (4.25.4): Skipped for the following reason: Already installed
- Installing puremagic (1.27): Skipped for the following reason: Already installed
- Installing pycparser (2.22): Skipped for the following reason: Already installed
- Installing pyasn1 (0.6.0): Skipped for the following reason: Already installed
- Installing pydocstyle (6.3.0): Skipped for the following reason: Already installed
- Installing psutil (6.0.0): Skipped for the following reason: Already installed
- Installing pygments (2.18.0): Skipped for the following reason: Already installed
- Installing pyasn1-modules (0.4.0): Skipped for the following reason: Already installed
- Installing pykmip (0.10.0): Skipped for the following reason: Already installed
- Installing pydantic (1.10.17): Skipped for the following reason: Already installed
- Installing pymongo (4.3.3): Skipped for the following reason: Already installed
- Installing pygithub (1.59.1): Skipped for the following reason: Already installed
- Installing pylint (2.17.7): Skipped for the following reason: Already installed
- Installing pynacl (1.5.0): Skipped for the following reason: Already installed
- Installing pymongo-auth-aws (1.2.0): Skipped for the following reason: Already installed
- Installing pyparsing (2.4.7): Skipped for the following reason: Already installed
- Installing pyjwt (2.9.0): Skipped for the following reason: Already installed
- Installing pysocks (1.7.1): Skipped for the following reason: Already installed
- Installing pympler (1.1): Skipped for the following reason: Not required
- Installing pyproject-hooks (1.1.0): Skipped for the following reason: Already installed
- Installing rapidfuzz (3.9.6): Skipped for the following reason: Already installed
- Installing python-dateutil (2.9.0.post0): Skipped for the following reason: Already installed
- Installing regex (2021.11.10): Skipped for the following reason: Already installed
- Installing pyopenssl (22.0.0): Skipped for the following reason: Already installed
- Installing referencing (0.35.1): Skipped for the following reason: Already installed
- Installing pyyaml (5.3.1): Skipped for the following reason: Already installed
- Installing requests (2.32.3): Skipped for the following reason: Already installed
- Installing requests-oauth (0.4.1): Skipped for the following reason: Already installed
- Installing rich (13.7.1): Skipped for the following reason: Already installed
- Installing rpds-py (0.20.0): Skipped for the following reason: Already installed
- Installing retry (0.9.2): Skipped for the following reason: Already installed
- Installing requests-oauthlib (2.0.0): Skipped for the following reason: Already installed
- Installing requests-toolbelt (1.0.0): Skipped for the following reason: Already installed
- Installing ruff (0.5.7): Skipped for the following reason: Already installed
- Installing sentinels (1.0.0): Skipped for the following reason: Already installed
- Installing service-identity (18.1.0): Skipped for the following reason: Already installed
- Installing setuptools (58.5.3): Skipped for the following reason: Already installed
- Installing shellingham (1.5.4): Skipped for the following reason: Already installed
- Installing shrub-py (1.1.4): Skipped for the following reason: Already installed
- Installing six (1.16.0): Skipped for the following reason: Already installed
- Installing s3transfer (0.10.2): Skipped for the following reason: Already installed
- Installing sniffio (1.3.1): Skipped for the following reason: Already installed
- Installing snowballstemmer (2.2.0): Skipped for the following reason: Already installed
- Installing sortedcontainers (2.4.0): Skipped for the following reason: Already installed
- Installing sqlalchemy (2.0.32): Skipped for the following reason: Already installed
- Installing selenium (4.23.1): Skipped for the following reason: Already installed
- Installing tabulate (0.9.0): Skipped for the following reason: Already installed
- Installing secretstorage (3.3.3): Skipped for the following reason: Already installed
- Installing tomlkit (0.13.0): Skipped for the following reason: Already installed
- Installing smmap (5.0.1): Skipped for the following reason: Already installed
- Installing trio (0.26.2): Skipped for the following reason: Already installed
- Installing trio-websocket (0.11.1): Skipped for the following reason: Already installed
- Installing trove-classifiers (2024.7.2): Skipped for the following reason: Already installed
- Installing twisted (24.3.0): Skipped for the following reason: Already installed
- Installing structlog (24.4.0): Skipped for the following reason: Already installed
- Installing tqdm (4.66.5): Skipped for the following reason: Already installed
- Installing types-requests (2.32.0.20240712): Skipped for the following reason: Already installed
- Installing typer (0.12.3): Skipped for the following reason: Already installed
- Installing typing-extensions (4.12.2): Skipped for the following reason: Already installed
- Installing unittest-xml-reporting (3.0.4): Skipped for the following reason: Already installed
- Installing urllib3 (2.2.2): Skipped for the following reason: Already installed
- Installing userpath (1.9.2): Skipped for the following reason: Already installed
- Installing tenacity (9.0.0): Skipped for the following reason: Already installed
- Installing websocket-client (1.8.0): Skipped for the following reason: Already installed
- Installing werkzeug (2.3.7): Skipped for the following reason: Already installed
- Installing wheel (0.37.0): Skipped for the following reason: Already installed
- Installing wrapt (1.16.0): Skipped for the following reason: Already installed
- Installing types-pyyaml (6.0.12.20240808): Skipped for the following reason: Already installed
- Installing yamllint (1.35.1): Skipped for the following reason: Already installed
- Installing types-setuptools (57.4.12): Skipped for the following reason: Already installed
- Installing zipp (3.19.2): Skipped for the following reason: Already installed
- Installing virtualenv (20.26.3): Skipped for the following reason: Already installed
- Installing yapf (0.26.0): Skipped for the following reason: Already installed
- Installing wsproto (1.2.0): Skipped for the following reason: Already installed
- Installing zope-interface (5.5.2): Skipped for the following reason: Already installed
scons: Reading SConscript files ... ModuleNotFoundError: No module named 'mongo_tooling_metrics': File "/home/alexlai/build/mongo/SConstruct", line 23: from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
real 0m9.129s user 0m8.535s sys 0m0.515s
pip install mongo-tooling-metrics psutil
$ git checkout r6.3.0-alpha -b r6.3.0-alpha
$ pip install -r etc/pip/compile-requirements.txt
running "python3 buildscripts/scons.py install-mongod" to compile mongoDB from source, error is
scons: Reading SConscript files ...
/home/alexlai/build/mongo/SConstruct:5598: SyntaxWarning: invalid escape sequence '\,'
pattern = "exec\\(open\\(['\"](.*)['\"]\, ['\"][a-z]+['\"]\\).read\\(\\)\\)"
ModuleNotFoundError: No module named 'mongo_tooling_metrics':
File "/home/alexlai/build/mongo/SConstruct", line 23:
from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
ChatGPT said:
ChatGPT
The error message you're encountering indicates that the SConstruct file is trying to import a module called mongo_tooling_metrics, which is not found. This could happen for several reasons. Here are some steps to troubleshoot and resolve the issue:
Check Dependencies: Ensure that all dependencies required to build MongoDB from source are installed. The mongo_tooling_metrics module is likely part of a package that needs to be present. Check the MongoDB build documentation for any prerequisites.
Clone the Latest Source: If you cloned the MongoDB repository, ensure you're using the latest version. There might have been updates that include necessary modules:
bash
Copy code
git clone https://github.com/mongodb/mongo.git
cd mongo
git pull origin master
Install Missing Modules: If mongo_tooling_metrics is not included in your source, you may need to install it. Check the official MongoDB documentation for instructions on how to get this module or any related packages.
Set PYTHONPATH: If you have the mongo_tooling_metrics code in a different location, you can set your PYTHONPATH environment variable to include that directory:
bash
Copy code
export PYTHONPATH=/path/to/your/mongo_tooling_metrics:$PYTHONPATH
Verify Python Version: Ensure you're using a compatible version of Python. MongoDB often has specific version requirements. You can check your Python version with:
bash
Copy code
python3 --version
Clean Build Environment: Sometimes remnants from previous builds can cause issues. You can clean your build environment by running:
bash
Copy code
python3 buildscripts/scons.py --clean
Check for Open Issues: Look through the MongoDB GitHub repository's issues section for similar problems. Others may have encountered the same issue, and solutions or workarounds might be posted there.
If you've gone through these steps and are still encountering issues, please provide additional details about your environment (OS, Python version, etc.), and I'll help further!
ChatGPT can make mistakes. Check important info.