Bug 220857 - databases/mongodb: build failure in the cluster, C++ code error.
Summary: databases/mongodb: build failure in the cluster, C++ code error.
Status: Closed DUPLICATE of bug 216213
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-19 16:36 UTC by Peter Wemm
Modified: 2017-07-20 09:21 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wemm freebsd_committer freebsd_triage 2017-07-19 16:36:30 UTC
This happens on 11.x and 12.x:


In file included from src/mongo/db/db.cpp:47:
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; }
                                      ~~~~~~~~~~~~~~~~~~~ ^ ~
In file included from src/mongo/db/db.cpp:49:
In file included from src/mongo/db/commands/server_status.h:36:
In file included from src/mongo/db/stats/counters.h:37:
In file included from src/mongo/db/pdfile.h:41:
In file included from src/mongo/db/catalog/database.h:33:
In file included from src/mongo/db/structure/catalog/namespace_details.h:34:
In file included from src/mongo/db/structure/catalog/index_details.h:40:
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/db/db.cpp:60:
In file included from src/mongo/db/instance.h:34:
In file included from src/mongo/client/dbclientinterface.h:1401:
src/mongo/client/dbclientcursor.h:120:40: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
        bool isDead() const { return  !this || cursorId == 0; }
                                      ~^~~~
In file included from src/mongo/db/db.cpp:71:
In file included from src/mongo/db/repl/rs.h:39:
In file included from src/mongo/db/repl/rs_config.h:37:
In file included from src/mongo/util/concurrency/race.h:31:
src/mongo/util/concurrency/mutexdebugger.h:90:17: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]
            if( this == 0 || m == 0 ) return;
                ^~~~    ~
src/mongo/util/concurrency/mutexdebugger.h:150:17: warning: 'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false [-Wtautological-undefined-compare]
            if( this == 0 || m == 0 ) return; // still in startup pre-main()
                ^~~~    ~
3 warnings and 2 errors generated.
scons: *** [build/freebsd/cc_cc/cxx_c++/ssl/use-system-pcre/use-system-snappy/use-system-v8/mongo/db/db.o] Error 1
scons: building terminated because of errors.
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/mongodb

Note: the regular package builders are using old 11.x and 12.x build jails.  For the cluster we use relatively recent build jails.  In this case, both are from June 2017.
Comment 1 commit-hook freebsd_committer 2017-07-20 09:14:34 UTC
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
Comment 2 commit-hook freebsd_committer 2017-07-20 09:18:40 UTC
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
Comment 3 Jan Beich freebsd_committer 2017-07-20 09:20:01 UTC

*** This bug has been marked as a duplicate of bug 216213 ***
Comment 4 commit-hook freebsd_committer 2017-07-20 09:21:47 UTC
A commit references this bug:

Author: jbeich
Date: Thu Jul 20 09:21:04 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