Bug 216036

Summary: science/openbabel: fails to build with lang/gcc6 or later
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: dim
Priority: --- Keywords: needs-patch
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216034
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216035
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216047
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216053
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216055
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216060
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216066
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216070
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216077
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216078
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216080
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216082

Description Jan Beich freebsd_committer freebsd_triage 2017-01-13 16:31:45 UTC
src/formats/chemkinformat.cpp:642:13: warning: comparison between NULL and non-pointer ('istream' (aka 'basic_istream<char>') and NULL) [-Wnull-arithmetic]
  return ifs!=NULL;
         ~~~^ ~~~~
src/formats/chemkinformat.cpp:642:13: error: invalid operands to binary expression ('istream' (aka 'basic_istream<char>') and 'long')
  return ifs!=NULL;
         ~~~^ ~~~~

build log: http://sprunge.us/ZORA
bisect first bad: https://github.com/llvm-mirror/libcxx/commit/3a1b90a866b6
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-13 16:33:26 UTC
src/ops/conformer.cpp:83:10: error: no
      viable conversion from 'std::__1::basic_istream<char>' to 'bool'
    bool ret = iss >> value;
         ^     ~~~~~~~~~~~~
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2017-01-13 18:00:17 UTC
Does this port build its C++ sources with -std=c++11?
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2017-01-13 22:18:01 UTC
Note that the upstream author has reverted the commit causing this here:

http://llvm.org/viewvc/llvm-project?rev=291921&view=rev

and has also merged it to the 4.0 branch.  I will import the upstream branch into the projects/clang400-import branch soon.
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2017-01-21 22:15:42 UTC
This port now builds fine after r312200 in the clang400-import branch.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2017-01-21 22:35:55 UTC
While libc++ case is averted this still affects GCC >= 6. I assume, you wanted to unblock bug 216008 instead.

src/formats/chemkinformat.cpp: In member function 'bool OpenBabel::ChemKinFormat::ReadReactionQualifierLines(std::istream&, OpenBabel::OBReaction*)':
src/formats/chemkinformat.cpp:642:13: error: no match for 'operator!=' (operand types are 'std::istream {aka std::basic_istream<char>}' and 'long int')
   return ifs!=NULL;
             ^
Comment 6 Dimitry Andric freebsd_committer freebsd_triage 2017-01-21 22:40:59 UTC
Ah yes, I was misled by a similar-looking bugs, sorry :)
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-01-21 23:12:27 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jan 21 23:12:18 UTC 2017
New revision: 432091
URL: https://svnweb.freebsd.org/changeset/ports/432091

Log:
  science/openbabel: unbreak with GCC >= 6

  GCC defaults to C++14 since 6.0 which no longer converts istream to
  bool by default. Instead of fixing just downgrade to C++98.

  PR:		216036

Changes:
  head/science/openbabel/Makefile
Comment 8 Jan Beich freebsd_committer freebsd_triage 2017-01-21 23:15:55 UTC
comment 7 wouldn't have helped libc++ since it leaks C++11 stuff. ;)
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-01-21 23:24:39 UTC
A commit references this bug:

Author: jbeich
Date: Sat Jan 21 23:24:18 UTC 2017
New revision: 432092
URL: https://svnweb.freebsd.org/changeset/ports/432092

Log:
  MFH: r432091

  science/openbabel: unbreak with GCC >= 6

  GCC defaults to C++14 since 6.0 which no longer converts istream to
  bool by default. Instead of fixing just downgrade to C++98.

  PR:		216036
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2017Q1/
  branches/2017Q1/science/openbabel/Makefile
Comment 10 commit-hook freebsd_committer freebsd_triage 2017-02-05 18:58:14 UTC
A commit references this bug:

Author: jbeich
Date: Sun Feb  5 18:57:52 UTC 2017
New revision: 433442
URL: https://svnweb.freebsd.org/changeset/ports/433442

Log:
  textproc/irstlm: unbreak with GCC >= 6

  GCC defaults to C++14 since 6.0 which no longer converts istream to
  bool by default. Instead of fixing just downgrade to C++98.

  PR:		216036
  Approved by:	demon (maintainer, implicit)

Changes:
  head/textproc/irstlm/Makefile
Comment 11 Jan Beich freebsd_committer freebsd_triage 2017-02-05 19:00:29 UTC
Oops, comment 10 had wrong bug number.