Commit a69d248d authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Fixed MongoDB compilation

parent 6e2841fb
...@@ -33,10 +33,12 @@ all: mongodb-service ...@@ -33,10 +33,12 @@ all: mongodb-service
tar xf mongodb-src-r4.4.6.tar.gz tar xf mongodb-src-r4.4.6.tar.gz
patch -Np1 -d mongodb-src-r4.4.6 < mongodb-src-r4.4.6-no_debug.patch patch -Np1 -d mongodb-src-r4.4.6 < mongodb-src-r4.4.6-no_debug.patch
patch -Np1 -d mongodb-src-r4.4.6 < mongodb-src-r4.4.6-fix_compile_error.patch
mkdir mongo-home mkdir mongo-home
cd mongodb-src-r4.4.6 && HOME=$(CURDIR)/mongo-home pip3 install --upgrade pip
cd mongodb-src-r4.4.6 && HOME=$(CURDIR)/mongo-home pip3 install -r buildscripts/requirements.txt cd mongodb-src-r4.4.6 && HOME=$(CURDIR)/mongo-home pip3 install -r buildscripts/requirements.txt
cd mongodb-src-r4.4.6 && scons all --release --opt=on --disable-warnings-as-errors MONGO_VERSION=4.4.6 -j 1 cd mongodb-src-r4.4.6 && scons PREFIX=/usr DESTDIR= install-all --release --opt=on --disable-warnings-as-errors MONGO_VERSION=4.4.6 -j 1
cd mongodb-src-r4.4.6 && scons --prefix=/usr install --disable-warnings-as-errors MONGO_VERSION=4.4.6 # cd mongodb-src-r4.4.6 && scons --prefix=/usr install --disable-warnings-as-errors MONGO_VERSION=4.4.6
cd mongodb-src-r4.4.6 && HOME=$(CURDIR)/mongo-home pip3 uninstall -y -r buildscripts/requirements.txt cd mongodb-src-r4.4.6 && HOME=$(CURDIR)/mongo-home pip3 uninstall -y -r buildscripts/requirements.txt
@echo "$$MONGODB_SERVICE" > /lib/systemd/system/mongodb.service @echo "$$MONGODB_SERVICE" > /lib/systemd/system/mongodb.service
systemctl enable mongodb.service systemctl enable mongodb.service
......
diff -uNr mongodb-src-r4.4.6/src/mongo/db/exec/plan_stats.h mongodb-src-r4.4.6-fix_compile_error/src/mongo/db/exec/plan_stats.h
--- mongodb-src-r4.4.6/src/mongo/db/exec/plan_stats.h 2021-05-03 17:11:41.000000000 +0930
+++ mongodb-src-r4.4.6-fix_compile_error/src/mongo/db/exec/plan_stats.h 2024-09-15 11:51:56.928184587 +0930
@@ -38,6 +38,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/query/stage_types.h"
#include "mongo/util/container_size_helper.h"
+#include <optional>
#include "mongo/util/time_support.h"
namespace mongo {
diff -uNr mongodb-src-r4.4.6/src/mongo/stdx/thread.h mongodb-src-r4.4.6-fix_compile_error/src/mongo/stdx/thread.h
--- mongodb-src-r4.4.6/src/mongo/stdx/thread.h 2021-05-03 17:11:41.000000000 +0930
+++ mongodb-src-r4.4.6-fix_compile_error/src/mongo/stdx/thread.h 2024-09-15 11:54:53.145537980 +0930
@@ -37,6 +37,7 @@
#include <exception>
#include <thread>
#include <type_traits>
+#include <cstdlib>
#include "mongo/stdx/exception.h"
#include "mongo/util/thread_safety_context.h"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment