From patchwork Sat Apr 27 14:41:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1092031 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Q/YQ+TbY"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rttD0WCKz9sNK for ; Sun, 28 Apr 2019 00:42:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 49CA58643B; Sat, 27 Apr 2019 14:42:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sWbQEeUfZ4v1; Sat, 27 Apr 2019 14:42:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 31E5786361; Sat, 27 Apr 2019 14:42:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D738C1BF340 for ; Sat, 27 Apr 2019 14:42:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D41EA86361 for ; Sat, 27 Apr 2019 14:42:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8PTlzl8E4oTR for ; Sat, 27 Apr 2019 14:42:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id AF5B584845 for ; Sat, 27 Apr 2019 14:42:04 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id j13so7628990wmh.2 for ; Sat, 27 Apr 2019 07:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oAmT4UnCX3H+C4brq6sohj1guQvBuBWwbyA8z5wstK0=; b=Q/YQ+TbYsHwiXPVar3PGWfawfVI+jJ+J+ggzRIeALQHycUbUv7OpNcaAZmgfRLtbFN ZC11T2ru+Dc1oy+8HKlnNnh4s6ROnAITZ3IRnDeWXzIHmh/GRgdO52wqgNrFO0EzYL0U twV4Od1jjdfl0PV48sf03eBaRgfx4gWwG5jahNo6NiJrm2UwkNe93WHjFUQfSBMCkxky 7ieGAEpAxZtVMgV7p5gKfpAcoygBybWeza8iDwm05B6ZLYhDBYTxJPEUPLEVEg2iFDLL sHmVnD96tq8+fXq9wy3Md8GDQiSTmVXclW3q9nct+C/LuQDE8SOq0JfQNGnDSgpDkP7d WUAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oAmT4UnCX3H+C4brq6sohj1guQvBuBWwbyA8z5wstK0=; b=n2EfEg1o7/IDVZkcLqty2XaUFV2iH2C4HHuE4MecrNZDNsPatkfPhEj7BwLvlde5gf nK6Ezk2pn+R0S8YKUPrAqqftpltXhX4fUtDwxeyZJBAwnwRrdDnSCpuW5Pae5TnM8/Fl EHhih71cP9jS7RdMGu0yrxr9iO0msbwdF39t37SFzY7fCLw4HgyxgNnWpqEGSwU5d5PY OfQxonrA5BNU7W77yKD/E58Alij3NGpqBz5z7VCsMH/pz01CnZzduHbW4EZmfHWtYFAv 1HOen0UJ3+vhe4EK/sjsNuIltLXPI2dQGxHVhlTfPLIn6iXWaq75llFxMkemP+8OYmww 82rg== X-Gm-Message-State: APjAAAUB9B0NK+uBqhMAFWJJPxgVrOXYI+YWpG0cLD8dv0pn5zSZ+Twk ukmZ7pt/eXhiliiTksFpxpU5E32b X-Google-Smtp-Source: APXvYqwwWExOgs62IBJ8Z/xthXAMr815+AQJfEY4Ak24vn8ITnzf6/L+G7BJXbrr+1oXDnHMX01dkQ== X-Received: by 2002:a1c:9d82:: with SMTP id g124mr756163wme.110.1556376122770; Sat, 27 Apr 2019 07:42:02 -0700 (PDT) Received: from kali.home (lfbn-ren-1-314-196.w2-10.abo.wanadoo.fr. [2.10.15.196]) by smtp.gmail.com with ESMTPSA id j13sm7966729wrd.88.2019.04.27.07.42.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Apr 2019 07:42:02 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 27 Apr 2019 16:41:36 +0200 Message-Id: <20190427144136.9072-4-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190427144136.9072-1-fontaine.fabrice@gmail.com> References: <20190427144136.9072-1-fontaine.fabrice@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 4/4] package/mongodb: bump to version 4.1.10 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Geoffrey Ragot , Peter Korsgaard , Fabrice Fontaine , Asaf Kahlon Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Drop !BR2_PACKAGE_PYTHON3 dependency as SConstruct requires host-python3 since version 4.1.10 and: https://github.com/mongodb/mongo/commit/8dd6d4755734ed37c1b98dfdefce3ca6bc65f1f6 - host-python-psutil is needed since 4.1.8 and https://github.com/mongodb/mongo/commit/ff03811e31851984617d73739de8acc7640b19a2 - Drop unneeded host-python-typing dependency - C++17 and so gcc 7 is required since 4.1.8 and https://github.com/mongodb/mongo/commit/01d84b2565fc9ea9626a55dcf1f3f817968088f2 - Set --disable-minimum-compiler-version-enforcement as mongodb enforces gcc >= 8.2 since verson 4.1.8 and https://github.com/mongodb/mongo/commit/9ac90b128ebeb1bb431ebe3fe9176cb6142818cb - Explictly disable ssl if needed as ssl is enabled by default - Add host-python-cheetah3 dependency if needed - Manage new http-client option added in version 4.1.2 and https://github.com/mongodb/mongo/commit/4d7dcca91bc2bbde65843fe88c41fa040e0d1877 - Add a patch to fix build with system libraries Signed-off-by: Fabrice Fontaine --- ...0002-fix-build-with-system-libraries.patch | 64 +++++++++++++++++++ package/mongodb/Config.in | 8 +-- package/mongodb/mongodb.hash | 2 +- package/mongodb/mongodb.mk | 23 ++++--- 4 files changed, 83 insertions(+), 14 deletions(-) create mode 100644 package/mongodb/0002-fix-build-with-system-libraries.patch diff --git a/package/mongodb/0002-fix-build-with-system-libraries.patch b/package/mongodb/0002-fix-build-with-system-libraries.patch new file mode 100644 index 0000000000..cf8b69d221 --- /dev/null +++ b/package/mongodb/0002-fix-build-with-system-libraries.patch @@ -0,0 +1,64 @@ +From 40c7112d346721a57a134bd7b3d87d797d9c1a55 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 27 Apr 2019 10:55:05 +0200 +Subject: [PATCH] fix build with system libraries + +Since commit 66430d75e33827da60195deb317058c71f75e03f which replaced all +InjectThirdPartyIncludePaths calls by InjectThirdParty calls, building +with system libraries such as --use-system-boost will fail on: + +KeyError: 'boost': + File "/home/fabrice/buildroot/output/build/mongodb-r4.1.10/SConstruct", line 3876: + variant_dir='$BUILD_DIR', + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Script/SConscript.py", line 605: + return _SConscript(self.fs, *files, **subst_kw) + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Script/SConscript.py", line 286: + exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) + File "/home/fabrice/buildroot/output/build/mongodb-r4.1.10/src/SConscript", line 12: + env.SConscript('third_party/SConscript', exports=['env']) + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Script/SConscript.py", line 605: + return _SConscript(self.fs, *files, **subst_kw) + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Script/SConscript.py", line 286: + exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) + File "/home/fabrice/buildroot/output/build/mongodb-r4.1.10/src/third_party/SConscript", line 161: + murmurEnv.SConscript('murmurhash3/SConscript', exports={ 'env' : murmurEnv }) + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Script/SConscript.py", line 605: + return _SConscript(self.fs, *files, **subst_kw) + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Script/SConscript.py", line 286: + exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) + File "/home/fabrice/buildroot/output/build/mongodb-r4.1.10/src/third_party/murmurhash3/SConscript", line 5: + env.InjectThirdParty(libraries=['boost']) + File "/home/fabrice/buildroot/output/host/lib/scons-3.0.5/SCons/Environment.py", line 224: + return self.method(*nargs, **kwargs) + File "/home/fabrice/buildroot/output/build/mongodb-r4.1.10/src/third_party/SConscript", line 148: + mods = thirdPartyEnvironmentModifications[lib] + +This is due to the fact that boost is not added as an element of +thirdPartyEnvironmentModification if --use-system-boost is set + +To fix this error, catch the KeyError + +Signed-off-by: Fabrice Fontaine +--- + src/third_party/SConscript | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/third_party/SConscript b/src/third_party/SConscript +index c129f6765e..089dad7579 100644 +--- a/src/third_party/SConscript ++++ b/src/third_party/SConscript +@@ -183,7 +183,10 @@ def injectThirdParty(thisEnv, libraries=[], parts=[]): + libraries = thisEnv.Flatten([libraries]) + parts = thisEnv.Flatten([parts]) + for lib in libraries: +- mods = thirdPartyEnvironmentModifications[lib] ++ try: ++ mods = thirdPartyEnvironmentModifications[lib] ++ except KeyError: ++ continue + if not parts: + thisEnv.PrependUnique(**mods) + else: +-- +2.20.1 + diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in index 9c5dba8347..1ad20589b1 100644 --- a/package/mongodb/Config.in +++ b/package/mongodb/Config.in @@ -8,12 +8,11 @@ config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS config BR2_PACKAGE_MONGODB bool "mongodb" depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS - depends on !BR2_PACKAGE_PYTHON3 depends on BR2_TOOLCHAIN_USES_GLIBC # needs glibc malloc_usable_size depends on BR2_USE_WCHAR depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17 select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_FILESYSTEM select BR2_PACKAGE_BOOST_IOSTREAMS @@ -35,9 +34,8 @@ config BR2_PACKAGE_MONGODB https://www.mongodb.org/ -comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 6" +comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 7" depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC || \ - !BR2_TOOLCHAIN_GCC_AT_LEAST_6 + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS - depends on !BR2_PACKAGE_PYTHON3 diff --git a/package/mongodb/mongodb.hash b/package/mongodb/mongodb.hash index 916323d7c1..c22091151e 100644 --- a/package/mongodb/mongodb.hash +++ b/package/mongodb/mongodb.hash @@ -1,4 +1,4 @@ # Locally computed: -sha256 5db85f06b2a0b2ae393339a4aed1366928aaef2b46c7c32826fa87c3217dc6f7 mongodb-r4.0.6.tar.gz +sha256 b6e0cd151f95728276a02a9b0d86a1582b1b30d5763fd6b5c0e1a0c488e7bc67 mongodb-r4.1.10.tar.gz sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 APACHE-2.0.txt sha256 09d99ca61eb07873d5334077acba22c33e7f7d0a9fa08c92734e0ac8430d6e27 LICENSE-Community.txt diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk index 53e1ce9963..03c7267358 100644 --- a/package/mongodb/mongodb.mk +++ b/package/mongodb/mongodb.mk @@ -4,7 +4,7 @@ # ################################################################################ -MONGODB_VERSION_BASE = 4.0.6 +MONGODB_VERSION_BASE = 4.1.10 MONGODB_VERSION = r$(MONGODB_VERSION_BASE) MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION)) @@ -13,9 +13,9 @@ MONGODB_LICENSE_FILES = APACHE-2.0.txt LICENSE-Community.txt MONGODB_DEPENDENCIES = \ boost \ - host-python-cheetah \ + host-python-cheetah3 \ + host-python-psutil \ host-python-pyyaml \ - host-python-typing \ host-scons \ pcre \ snappy \ @@ -29,6 +29,7 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \ -j"$(PARALLEL_JOBS)" MONGODB_SCONS_OPTS = \ + --disable-minimum-compiler-version-enforcement \ --disable-warnings-as-errors \ --use-system-boost \ --use-system-pcre \ @@ -60,21 +61,27 @@ endif ifeq ($(BR2_PACKAGE_LIBCURL),y) MONGODB_DEPENDENCIES += libcurl -MONGODB_SCONS_OPTS += --enable-free-mon=on +MONGODB_SCONS_OPTS += \ + --enable-free-mon=on \ + --enable-http-client=on else -MONGODB_SCONS_OPTS += --enable-free-mon=off +MONGODB_SCONS_OPTS += \ + --enable-free-mon=off \ + --enable-http-client=off endif ifeq ($(BR2_PACKAGE_OPENSSL),y) MONGODB_DEPENDENCIES += openssl MONGODB_SCONS_OPTS += \ - --ssl \ + --ssl=on \ --ssl-provider=openssl +else +MONGODB_SCONS_OPTS += --ssl=off endif define MONGODB_BUILD_CMDS (cd $(@D); \ - $(HOST_DIR)/bin/python $(SCONS) \ + $(HOST_DIR)/bin/python3 $(SCONS) \ $(MONGODB_SCONS_ENV) \ $(MONGODB_SCONS_OPTS) \ $(MONGODB_SCONS_TARGETS)) @@ -82,7 +89,7 @@ endef define MONGODB_INSTALL_TARGET_CMDS (cd $(@D); \ - $(HOST_DIR)/bin/python $(SCONS) \ + $(HOST_DIR)/bin/python3 $(SCONS) \ $(MONGODB_SCONS_ENV) \ $(MONGODB_SCONS_OPTS) \ --prefix=$(TARGET_DIR)/usr \