Hi zigo,

On 14:13 Thu 30 Jun     , Thomas Goirand wrote:
> Hi,
> 
> I've been looking into this problem, and the following has to bee added
> to the SConstruct file (around line 720) to allow mongodb to build:
> 
> -Wdeprecated-declarations
> -Wno-error=misleading-indentation
> -Wno-error=nonnull-compare
> -Wno-error=literal-suffix
> 
> But that's unfortunately not enough. At some point, -fpermissive has to
> be added, but that also is turned into errors. Adding -fpermissive and
> removing -Wall made the bad source code build, but I stopped my
> investigations there.

I think MongoDB 2.4 in unstable is already dead enough[1] that we should 
drop it before it gets a chance to build against GCC 6 in a couple of 
months. The attached patch fixes the FTBFS for the 2.6 package in 
experimental by disabling the newly-introduced warnings and patching 
(some) C++11 compatibility, but then again 2.6 will also be EOL by 
October[1].

Note that most (if not all) of these warnings seem to be fixed in the 
3.2 branch which IMHO should be the target version for Stretch.

[1] https://www.mongodb.com/support-policy
> 
> Laszlo, since you're coming to Debconf, maybe we can discuss this when
> you arrive tomorrow?

I started a discussion with Làszlo quite a while ago regarding an 
updated MongoDB package, but didn't have the time to finish it, so I'd 
be happy to join you as well :)

Regards,
Apollon
Index: mongodb-2.6.11/SConstruct
===================================================================
--- mongodb-2.6.11.orig/SConstruct
+++ mongodb-2.6.11/SConstruct
@@ -842,6 +842,10 @@ if nix:
                          "-Wno-unused-variable",
                          "-Wno-maybe-uninitialized",
                          "-Wno-unknown-pragmas",
+			 "-Wno-misleading-indentation",
+			 "-Wno-deprecated-declarations",
+			 "-Wno-nonnull-compare",
+			 "-Wno-error=overflow",
                          "-Winvalid-pch"] )
     # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
     if linux or darwin:
Index: mongodb-2.6.11/src/mongo/db/exec/working_set.cpp
===================================================================
--- mongodb-2.6.11.orig/src/mongo/db/exec/working_set.cpp
+++ mongodb-2.6.11/src/mongo/db/exec/working_set.cpp
@@ -119,7 +119,7 @@ namespace mongo {
     }
 
     bool WorkingSetMember::hasComputed(const WorkingSetComputedDataType type) const {
-        return _computed[type];
+        return _computed[type].get();
     }
 
     const WorkingSetComputedData* WorkingSetMember::getComputed(const WorkingSetComputedDataType type) const {
Index: mongodb-2.6.11/src/mongo/db/pipeline/document_source_sort.cpp
===================================================================
--- mongodb-2.6.11.orig/src/mongo/db/pipeline/document_source_sort.cpp
+++ mongodb-2.6.11/src/mongo/db/pipeline/document_source_sort.cpp
@@ -99,7 +99,7 @@ namespace mongo {
     bool DocumentSourceSort::coalesce(const intrusive_ptr<DocumentSource> &pNextSource) {
         if (!limitSrc) {
             limitSrc = dynamic_cast<DocumentSourceLimit*>(pNextSource.get());
-            return limitSrc; // false if next is not a $limit
+            return limitSrc.get(); // false if next is not a $limit
         }
         else {
             return limitSrc->coalesce(pNextSource);
Index: mongodb-2.6.11/src/mongo/db/pipeline/document_source_cursor.cpp
===================================================================
--- mongodb-2.6.11.orig/src/mongo/db/pipeline/document_source_cursor.cpp
+++ mongodb-2.6.11/src/mongo/db/pipeline/document_source_cursor.cpp
@@ -141,7 +141,7 @@ namespace mongo {
 
         if (!_limit) {
             _limit = dynamic_cast<DocumentSourceLimit*>(nextSource.get());
-            return _limit; // false if next is not a $limit
+            return _limit.get(); // false if next is not a $limit
         }
         else {
             return _limit->coalesce(nextSource);
Index: mongodb-2.6.11/src/mongo/s/chunk_manager_targeter.cpp
===================================================================
--- mongodb-2.6.11.orig/src/mongo/s/chunk_manager_targeter.cpp
+++ mongodb-2.6.11/src/mongo/s/chunk_manager_targeter.cpp
@@ -48,7 +48,7 @@ namespace mongo {
             *errMsg = ex.toString();
         }
 
-        return config;
+        return config.get();
     }
 
     ChunkManagerTargeter::ChunkManagerTargeter() :

Attachment: signature.asc
Description: PGP signature

Reply via email to