Bug 216060 - graphics/fracplanet: fails to build with lang/gcc6 or later
Summary: graphics/fracplanet: fails to build with lang/gcc6 or later
Status: Closed DUPLICATE of bug 229874
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2017-01-14 07:14 UTC by Jan Beich
Modified: 2018-08-05 21:00 UTC (History)
0 users

See Also:


Attachments

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 07:14:13 UTC
image.cpp:88:10: error: no viable conversion from returned value of type 'std::ofstream'
      (aka 'basic_ofstream<char>') to function return type 'bool'
  return out;
         ^~~
image.cpp:118:10: error: no viable conversion from returned value of type 'std::ofstream'
      (aka 'basic_ofstream<char>') to function return type 'bool'
  return out;
         ^~~
image.cpp:135:10: error: no viable conversion from returned value of type 'std::ofstream'
      (aka 'basic_ofstream<char>') to function return type 'bool'
  return out;
         ^~~

build log: http://sprunge.us/MOgI
regressed by: https://github.com/llvm-mirror/libcxx/commit/3a1b90a866b6
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-14 07:15:11 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.

image.cpp: In member function 'bool Raster<T>::write_pgmfile(const string&, Progress*) const [with T = unsigned char; std::__cxx11::string = std::__cxx11::basic_string<char>]':
image.cpp:88:10: error: cannot convert 'std::ofstream {aka std::basic_ofstream<char>}' to 'bool' in return
   return out;
          ^~~
image.cpp: In member function 'bool Raster<T>::write_pgmfile(const string&, Progress*) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]':
image.cpp:104:28: warning: narrowing conversion of '(((int)(* it)) >> 8)' from 'int' to 'uchar {aka unsigned char}' inside { } [-Wnarrowing]
    const uchar p[2]={((*it)>>8),(*it)};
                      ~~~~~~^~~~
image.cpp:104:34: warning: narrowing conversion of '(ushort)(* it)' from 'ushort {aka short unsigned int}' to 'uchar {aka unsigned char}' inside { } [-Wnarrowing]
    const uchar p[2]={((*it)>>8),(*it)};
                                 ~^~~~
image.cpp:118:10: error: cannot convert 'std::ofstream {aka std::basic_ofstream<char>}' to 'bool' inreturn
   return out;
          ^~~
image.cpp: In member function 'bool Raster<T>::write_ppmfile(const string&, Progress*) const [with T = ByteRGBA; std::__cxx11::string = std::__cxx11::basic_string<char>]':
image.cpp:135:10: error: cannot convert 'std::ofstream {aka std::basic_ofstream<char>}' to 'bool' inreturn
   return out;
          ^~~
Comment 2 Jan Beich freebsd_committer freebsd_triage 2018-01-12 13:45:52 UTC
Clang 6 defaults to C++14, so pkg-fallout@ will complain soon.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2018-08-05 21:00:46 UTC
Appears to have been fixed during update.
http://beefy11.nyi.freebsd.org/data/latest-per-pkg/fracplanet/0.5.1/head-i386-default.log
http://beefy12.nyi.freebsd.org/data/latest-per-pkg/fracplanet/0.5.1/head-amd64-default.log

*** This bug has been marked as a duplicate of bug 229874 ***