Bug 216047

Summary: devel/shiboken: fails to build with lang/gcc6 or later
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: William Grzybowski <wg>
Status: Closed FIXED    
Severity: Affects Only Me CC: pawel, w.schwarzenfeld
Priority: --- Keywords: needs-patch
Version: LatestFlags: bugzilla: maintainer-feedback? (wg)
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=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
Bug Depends on:    
Bug Blocks: 224669    
Attachments:
Description Flags
shiboken clang6 none

Description Jan Beich freebsd_committer freebsd_triage 2017-01-14 03:15:15 UTC
tests/libsample/simplefile.cpp:93:12: error: no viable conversion from returned value of type 'std::ifstream' (aka 'basic_ifstream<char>') to function return type 'bool'
    return ifile;
           ^~~~~
tests/libsample/simplefile.cpp:100:12: error: no viable conversion from returned value of type 'std::ifstream' (aka 'basic_ifstream<char>') to function return type 'bool'
    return ifile;
           ^~~~~
2 errors generated.

build log: http://sprunge.us/XeHJ
bisect first bad: https://github.com/llvm-mirror/libcxx/commit/3a1b90a866b6
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-01-14 03:29:55 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.

tests/libsample/simplefile.cpp: In member function 'bool SimpleFile::exists() const':
tests/libsample/simplefile.cpp:93:12: error: cannot convert 'std::ifstream {aka std::basic_ifstream<char>}' to 'bool' in return
     return ifile;
            ^~~~~
tests/libsample/simplefile.cpp: In static member function 'static bool SimpleFile::exists(const char*)':
tests/libsample/simplefile.cpp:100:12: error: cannot convert 'std::ifstream {aka std::basic_ifstream<char>}' to 'bool' in return
     return ifile;
            ^~~~~
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2017-01-21 22:55:20 UTC
This port now builds fine with clang, after r312200 in the clang400-import branch.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2018-01-12 13:45:49 UTC
Clang 6 defaults to C++14, so pkg-fallout@ will complain soon.
Comment 4 Pawel Pekala freebsd_committer freebsd_triage 2018-01-31 17:34:43 UTC
Created attachment 190228 [details]
shiboken clang6

This patch fixes build for me. It was adopted by Gentoo, upstream seems dead.
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-03-03 20:24:35 UTC
see also Bug #226331.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-03-03 20:31:44 UTC
Maintainer timeout?
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-03-03 20:50:07 UTC
*** Bug 226331 has been marked as a duplicate of this bug. ***
Comment 8 Jan Beich freebsd_committer freebsd_triage 2018-03-03 21:11:39 UTC
Comment on attachment 190228 [details]
shiboken clang6

Looks good. Other options (see bug 216080): bool(ifile), !ifile.fail() or USE_CXXSTD=gnu++98.
Comment 9 commit-hook freebsd_committer freebsd_triage 2018-04-24 14:02:48 UTC
A commit references this bug:

Author: wg
Date: Tue Apr 24 14:02:13 UTC 2018
New revision: 468212
URL: https://svnweb.freebsd.org/changeset/ports/468212

Log:
  devel/shiboken: fix build with gcc6

  PR:		216047
  Submitted by:	jbeich

Changes:
  head/devel/shiboken/files/patch-tests_libsample_simplefile.cpp