Bug 216047 - devel/shiboken: fails to build with lang/gcc6 or later
Summary: devel/shiboken: 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: William Grzybowski
URL:
Keywords: needs-patch
: 226331 (view as bug list)
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2017-01-14 03:15 UTC by Jan Beich
Modified: 2018-04-24 14:03 UTC (History)
2 users (show)

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


Attachments
shiboken clang6 (1.02 KB, patch)
2018-01-31 17:34 UTC, Pawel Pekala
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 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 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 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 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 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 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 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