[packages/mongodb] - fix building with gcc 6.x - rel 9

baggins baggins at pld-linux.org
Fri Apr 14 17:41:09 CEST 2017


commit 2ccc6de590d134a4ca6f1a287bd5fc863b380b61
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Apr 14 17:40:54 2017 +0200

    - fix building with gcc 6.x
    - rel 9

 gcc6.patch      | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mongodb.spec    |  6 ++++-
 no-Werror.patch | 11 ++++++++++
 3 files changed, 84 insertions(+), 1 deletion(-)
---
diff --git a/mongodb.spec b/mongodb.spec
index a40cfbc..a383d92 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -8,7 +8,7 @@ Summary:	MongoDB client shell and tools
 Summary(pl.UTF-8):	Powłoka kliencka i narzędzia dla bazy danych MongoDB
 Name:		mongodb
 Version:	2.2.4
-Release:	8
+Release:	9
 License:	AGPL v3
 Group:		Applications/Databases
 Source0:	http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
@@ -23,6 +23,8 @@ Patch2:		boost-1.50.patch
 Patch3:		%{name}-install.patch
 Patch4:		%{name}-shared.patch
 Patch5:		gcc4.patch
+Patch6:		no-Werror.patch
+Patch7:		gcc6.patch
 URL:		http://www.mongodb.org/
 BuildRequires:	boost-devel >= 1.50
 BuildRequires:	libpcap-devel
@@ -152,6 +154,8 @@ konfiguracji oraz skrypty init.d.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 # Fix permissions
 find -type f -executable | xargs chmod a-x
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644
index 0000000..d49a563
--- /dev/null
+++ b/gcc6.patch
@@ -0,0 +1,68 @@
+--- mongodb-src-r2.2.4/src/mongo/util/concurrency/threadlocal.h~	2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/util/concurrency/threadlocal.h	2017-04-14 17:05:17.819748109 +0200
+@@ -16,10 +16,10 @@
+ *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+ 
+-#include "mongo/client/undef_macros.h"
++//#include "mongo/client/undef_macros.h"
+ #include <boost/thread/tss.hpp>
+ #include <boost/bind.hpp>
+-#include "mongo/client/redef_macros.h"
++//#include "mongo/client/redef_macros.h"
+ 
+ 
+ namespace mongo { 
+--- mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.h~	2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.h	2017-04-14 17:12:49.282347360 +0200
+@@ -170,7 +170,7 @@
+         _keyFieldsOnly( queryPlan.keyFieldsOnly() ),
+         _scanAndOrderRequired( queryPlan.scanAndOrderRequired() ) {
+         }
+-        bool valid() const { return _fieldRangeSetMulti; }
++        bool valid() const { return _fieldRangeSetMulti != NULL; }
+         shared_ptr<FieldRangeSet> _fieldRangeSetMulti;
+         shared_ptr<Projection::KeyOnly> _keyFieldsOnly;
+         bool _scanAndOrderRequired;
+--- mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.cpp~	2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.cpp	2017-04-14 17:22:59.293485280 +0200
+@@ -1419,7 +1419,7 @@
+             if ( _explainPlanInfo ) {
+                 _explainPlanInfo.reset( new ExplainPlanInfo() );
+                 _explainPlanInfo->notePlan( *_c, _queryPlan->scanAndOrderRequired(),
+-                                           _queryPlan->keyFieldsOnly() );
++                                           _queryPlan->keyFieldsOnly() != NULL );
+                 shared_ptr<ExplainClauseInfo> clauseInfo( new ExplainClauseInfo() );
+                 clauseInfo->addPlanInfo( _explainPlanInfo );
+                 _mps->addClauseInfo( clauseInfo );
+--- mongodb-src-r2.2.4/src/mongo/db/queryoptimizercursorimpl.cpp~	2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/queryoptimizercursorimpl.cpp	2017-04-14 17:24:01.807612099 +0200
+@@ -96,7 +96,7 @@
+             // The query plan must have a matcher.  The matcher's constructor performs some aspects
+             // of query validation that should occur as part of this class's init() if not handled
+             // already.
+-            fassert( 16249, queryPlan().matcher() );
++            fassert( 16249, queryPlan().matcher() != NULL );
+ 
+             // All candidate cursors must support yields for QueryOptimizerCursorImpl's
+             // prepareToYield() and prepareToTouchEarlierIterate() to work.
+@@ -221,7 +221,7 @@
+             }
+             _explainPlanInfo.reset( new ExplainPlanInfo() );
+             _explainPlanInfo->notePlan( *_c, queryPlan().scanAndOrderRequired(),
+-                                        queryPlan().keyFieldsOnly() );
++                                        queryPlan().keyFieldsOnly() != NULL );
+             return _explainPlanInfo;
+         }
+         shared_ptr<ExplainPlanInfo> explainInfo() const { return _explainPlanInfo; }
+--- mongodb-src-r2.2.4/src/mongo/db/ops/query.cpp~	2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/ops/query.cpp	2017-04-14 17:25:35.475055105 +0200
+@@ -584,7 +584,7 @@
+         shared_ptr<ExplainRecordingStrategy> ret
+         ( new SimpleCursorExplainStrategy( ancillaryInfo, _cursor ) );
+         ret->notePlan( queryPlan.valid() && queryPlan._scanAndOrderRequired,
+-                      queryPlan._keyFieldsOnly );
++                      queryPlan._keyFieldsOnly != NULL );
+         return ret;
+     }
+ 
diff --git a/no-Werror.patch b/no-Werror.patch
new file mode 100644
index 0000000..00f55d8
--- /dev/null
+++ b/no-Werror.patch
@@ -0,0 +1,11 @@
+--- mongodb-src-r2.2.4/SConstruct~	2017-04-14 16:32:34.000000000 +0200
++++ mongodb-src-r2.2.4/SConstruct	2017-04-14 16:33:47.864602817 +0200
+@@ -686,7 +686,7 @@
+                          "-Winvalid-pch"] )
+     # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+     if linux:
+-        env.Append( CCFLAGS=["-Werror", "-pipe"] )
++        env.Append( CCFLAGS=["-pipe"] )
+         if not has_option('clang'):
+             env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mongodb.git/commitdiff/2ccc6de590d134a4ca6f1a287bd5fc863b380b61



More information about the pld-cvs-commit mailing list