In file included from src/mongo/db/fts/fts_command.cpp:35: In file included from src/mongo/db/fts/fts_util.h:37: In file included from src/mongo/db/storage/record.h:35: In file included from src/mongo/db/storage/extent.h:34: src/mongo/db/structure/catalog/namespace.h:58:65: error: ordered comparison between pointer and zero ('const char *' and 'int') bool hasDollarSign() const { return strchr( buf , '$' ) > 0; } ~~~~~~~~~~~~~~~~~~~ ^ ~ In file included from src/mongo/s/shard.cpp:33: In file included from src/mongo/s/shard.h:35: src/mongo/client/connpool.h:326:40: error: ordered comparison between pointer and zero ('mongo::DBClientBase *' and 'int') bool ok() const { return _conn > 0; } ~~~~~ ^ ~ In file included from src/mongo/s/shard.cpp:33: src/mongo/s/shard.h:295:40: error: ordered comparison between pointer and zero ('mongo::DBClientBase *' and 'int') bool ok() const { return _conn > 0; } ~~~~~ ^ ~ In file included from src/mongo/db/dbcommands_generic.cpp:44: In file included from src/mongo/db/db.h:33: src/mongo/db/client.h:263:59: error: ordered comparison between pointer and zero ('mongo::Client *' and 'int') inline bool haveClient() { return currentClient.get() > 0; } ~~~~~~~~~~~~~~~~~~~ ^ ~ build log: http://sprunge.us/gicD regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Created attachment 180846 [details] mongodb.diff Just ran into this when trying to build mongodb on 12.0-CURRENT. With a couple of patches mongodb can build again. When building with LibreSSL there is an additional build failure: build/freebsd/cc_cc/cxx_c++/ssl/use-system-pcre/use-system-snappy/use-system-v8/mongo/util/net/ssl_manager.o: In function `mongo::_mongoInitializerFunction_SSLManager(mongo::InitializerContext*)': src/mongo/util/net/ssl_manager.cpp:(.text+0x35b): undefined reference to `FIPS_mode_set' SConstruct checks for FIPS_mode_set (which base's OpenSSL has but LibreSSL does not have) with base's OpenSSL in the include path and incorrectly defines MONGO_HAVE_FIPS_MODE_SET.
Comment on attachment 180846 [details] mongodb.diff > +post-patch-SSL-on: > +.if ${SSL_DEFAULT:Mlibressl*} > + @${REINPLACE_CMD} 's/\([ ]*\).*MONGO_HAVE_FIPS_MODE_SET.*/\1pass/' \ > + ${WRKSRC}/SConstruct > +.endif I can't reproduce but maybe add USES+=localbase to fix SCons check instead. > +- bool ok() const { return _conn > 0; } > ++ bool ok() const { return _conn != nullptr; } GCC before 6.0 defaults to -std=gnu++98 but libc++ often leaks C++11 surrogates. Better take advantage of base r228918 instead. In file included from src/mongo/s/shard.h:35:0, from src/mongo/s/balancer_policy.h:37, from src/mongo/s/balancer_policy.cpp:34: src/mongo/client/connpool.h:326:9: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat] bool ok() const { return _conn != nullptr; } ^ src/mongo/client/connpool.h: In member function 'virtual bool mongo::ScopedDbConnection::ok() const': src/mongo/client/connpool.h:326:43: error: 'nullptr' was not declared in this scope bool ok() const { return _conn != nullptr; } ^
Ping
A commit references this bug: Author: jbeich Date: Thu Jul 20 09:14:17 UTC 2017 New revision: 446250 URL: https://svnweb.freebsd.org/changeset/ports/446250 Log: databases/mongodb: unbreak with clang >= 4.0 Convert ptr > 0 to ptr != 0. As semantics are similar no need for PORTREVISION bump. PR: 216213 220857 Submitted by: tobik (based on) Approved by: maintainer timeout (4 months) + portmgr blanket Obtained from: upstream (still under APACHE-2.0) Changes: head/databases/mongodb/Makefile head/databases/mongodb/distinfo
@tobik, thanks for the ping but you didn't respond to my review thus timeout. I've also found an upstream fix which seems to coincide with my opinion on NULL vs. nullptr.
A commit references this bug: Author: jbeich Date: Thu Jul 20 09:17:33 UTC 2017 New revision: 446252 URL: https://svnweb.freebsd.org/changeset/ports/446252 Log: MFH: r446250 databases/mongodb: unbreak with clang >= 4.0 Convert ptr > 0 to ptr != 0. As semantics are similar no need for PORTREVISION bump. PR: 216213 220857 Submitted by: tobik (based on) Approved by: maintainer timeout (4 months) + portmgr blanket Obtained from: upstream (still under APACHE-2.0) Approved by: ports-secteam blanket Changes: _U branches/2017Q3/ branches/2017Q3/databases/mongodb/Makefile branches/2017Q3/databases/mongodb/distinfo
*** Bug 220857 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: jbeich Date: Thu Jul 20 09:21:03 UTC 2017 New revision: 446253 URL: https://svnweb.freebsd.org/changeset/ports/446253 Log: MFH: r446250 databases/mongodb: unbreak with clang >= 4.0 Convert ptr > 0 to ptr != 0. As semantics are similar no need for PORTREVISION bump. PR: 216213 220857 Submitted by: tobik (based on) Approved by: maintainer timeout (4 months) + portmgr blanket Obtained from: upstream (still under APACHE-2.0) Approved by: ports-secteam blanket Changes: _U branches/2017Q2/ branches/2017Q2/databases/mongodb/Makefile branches/2017Q2/databases/mongodb/distinfo