Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Unable to build due to outdated dependencies #180

Open
musahaydar opened this issue Sep 5, 2021 · 3 comments
Open

Unable to build due to outdated dependencies #180

musahaydar opened this issue Sep 5, 2021 · 3 comments
Assignees

Comments

@musahaydar
Copy link

I am unable to build pmse with Python 3.8 due to outdated dependencies. pgenheaders.h was removed in Python 3.8, and the typed-ast package no longer supports Python 3.8+.

@KFilipek
Copy link
Contributor

Hey, sorry for my late response.
Generally for old version of MongoDB they used Python2 which is no longer maintained.
Anyway, Ubuntu 21.04 still have packages for compatibility purposed and I successfully built this project using following commands:

# installing python2 and pip2
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
pip2 --version

# clone repos
cd ~
git clone https://github.com/mongodb/mongo
git clone https://github.com/pmem/pmse
git clone https://github.com/pmem/pmdk

<BUILD HERE PMDK lib>

# set correct version of MongoDB for PMSE
git checkout r3.5.13 -b r3.5.13

# install dependencies
cd mongo
sudo apt install scons
pip2 install -r buildscripts/requirements.txt
mkdir -p src/mongo/db/modules/
ln -sf ~/pmse src/mongo/db/modules/pmse
python2 buildscripts/scons.py LIBPATH=~/pmdk/ -j $(nproc --all) core --disable-warnings-as-errors --dbg=off --opt=on

I'm waiting for your response if it helps you, then I will update Readme.
Best regards,
Krzysztof Filipek

@KFilipek KFilipek self-assigned this Sep 22, 2021
@musahaydar
Copy link
Author

This seems to build, but mongo fails to run, with the error exception in initAndListen: Location18656: Cannot start server with an unknown storage engine: pmse, terminating.

@KFilipek
Copy link
Contributor

Hey,
It looks like you don't compile MongoDB with the PMSE.
Typical mistake is wrong path with symbolic link to pmse source directory.
You should see in your log this 2 marked lines at the bottom:

Checking whether backtrace_symbols is declared... (cached) yes
Checking whether backtrace_symbols_fd is declared... (cached) yes
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
Checking if std::atomic<int64_t> works... (cached) yes
Checking if std::atomic<uint64_t> works... (cached) yes
Checking if std::atomic<int32_t> works... (cached) yes
Checking if std::atomic<uint32_t> works... (cached) yes
Checking for extended alignment 64 for concurrency types... (cached) yes
Checking for mongoc_get_major_version() in C library mongoc-1.0... (cached) no
configuring module: pmse
Configuring pmse storage engine module

Then it should works:

kfilipek@kfilipek-desktop:~/Development/work/mongo$ ./mongod --storageEngine=pmse --dbpath=/tmp/
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] MongoDB starting : pid=219389 port=27017 dbpath=/tmp/ 64-bit host=kfilipek-desktop
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] db version v3.5.13
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] git version: 52bbaa007cd84631d6da811d9a05b59f2dfad4f3
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] allocator: tcmalloc
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] modules: pmse 
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] build environment:
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten]     distarch: x86_64
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten]     target_arch: x86_64
2021-10-20T15:41:55.613+0200 I CONTROL  [initandlisten] options: { storage: { dbPath: "/tmp/", engine: "pmse" } }
2021-10-20T15:41:55.613+0200 I STORAGE  [initandlisten] /tmp/
2021-10-20T15:41:55.721+0200 I STORAGE  [initandlisten] Engine pool created
2021-10-20T15:41:55.767+0200 I STORAGE  [initandlisten] ns: _mdb_catalog
2021-10-20T15:41:55.767+0200 I STORAGE  [initandlisten] /tmp/_mdb_catalog

Make sure that you have proper link in mongo directory:

ls -alh src/mongo/db/modules/pmse
cd src/mongo/db/modules/pmse
ls -l

You should have files from PMSE:

build.py  build.pyc  LICENSE  README.md  run-jstests.py  SConscript  src  tests  utils

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants