Bug 216070 - textproc/source-highlight: fails to build with lang/gcc6 or later
Summary: textproc/source-highlight: fails to build with lang/gcc6 or later
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rene Ladan
URL:
Keywords: needs-patch
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2017-01-14 15:41 UTC by Jan Beich
Modified: 2018-08-29 12:19 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kevlo)


Attachments
svn-diff-source_highlight (1.57 KB, patch)
2018-01-12 14:04 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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/