Bug 216070

Summary: textproc/source-highlight: fails to build with lang/gcc6 or later
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Rene Ladan <rene>
Status: Closed FIXED    
Severity: Affects Only Me CC: ndowens04, rene, w.schwarzenfeld
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (kevlo)
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=216036
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216035
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=216047
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
Bug Depends on:    
Bug Blocks: 224669    
Attachments:
Description Flags
svn-diff-source_highlight none

Description Jan Beich freebsd_committer freebsd_triage 2017-01-14 15:41:59 UTC
settings.cpp:97:15: error: invalid operands to binary expression ('ifstream'
      (aka 'basic_ifstream<char>') and 'int')
    return (i != 0);
            ~ ^  ~
settings.cpp:104:15: error: invalid operands to binary expression ('ifstream'
      (aka 'basic_ifstream<char>') and 'int')
    return (i != 0);
            ~ ^  ~
settings.cpp:112:11: error: invalid operands to binary expression ('ifstream'
      (aka 'basic_ifstream<char>') and 'int')
    if (i != 0) {
        ~ ^  ~

build log: http://sprunge.us/GUFD
regressed by: https://github.com/llvm-mirror/libcxx/commit/3a1b90a866b6
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-14 15:43:35 UTC
(In reply to Dimitry Andric from bug 216034 comment #6)
> 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.

lang/gcc6 and later versions are also affected.

settings.cpp: In member function 'bool srchilite::Settings::checkForTestFile()':
settings.cpp:97:15: error: no match for 'operator!=' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
     return (i != 0);
             ~~^~~~
settings.cpp: In member function 'bool srchilite::Settings::checkForConfFile()':
settings.cpp:104:15: error: no match for 'operator!=' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
     return (i != 0);
             ~~^~~~
settings.cpp: In member function 'bool srchilite::Settings::readDataDir()':
settings.cpp:112:11: error: no match for 'operator!=' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
     if (i != 0) {
         ~~^~~~
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2018-01-12 11:25:10 UTC
Maintainer reset.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2018-01-12 13:45:53 UTC
Clang 6 defaults to C++14, so pkg-fallout@ will complain soon.
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-12 14:04:20 UTC
Created attachment 189650 [details]
svn-diff-source_highlight
Comment 5 Nathan 2018-08-28 03:13:56 UTC
This port works in the current 12-CURRENT r338331
Comment 6 Jan Beich freebsd_committer freebsd_triage 2018-08-29 12:19:17 UTC
(In reply to Nathan from comment #5)
> This port works in the current 12-CURRENT r338331

Indeed. Looks like C++11 issues were fixed by ports r461455. As of Clang 7 and GCC 8 it still builds fine.

http://www.ipv6proxy.net/go.php?u=http://beefy11.nyi.freebsd.org/data/latest-per-pkg/source-highlight/
http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/source-highlight/