Bug 247771 - mail/filtermail: Fails to build: error: cannot cast from type 'std::istream' (FreeBSD 13.0-CURRENT)
Summary: mail/filtermail: Fails to build: error: cannot cast from type 'std::istream' ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-05 09:02 UTC by Mike Clarke
Modified: 2020-08-08 15:16 UTC (History)
2 users (show)

See Also:
jmc-freebsd2: maintainer-feedback+
pi: merge-quarterly+


Attachments
Patch to upgrade mail/filtermail to 0.8.6 (2.42 KB, patch)
2020-07-05 09:02 UTC, Mike Clarke
no flags Details | Diff
Revised patch with updated maintainer email address (2.54 KB, patch)
2020-07-05 10:24 UTC, Mike Clarke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Clarke 2020-07-05 09:02:50 UTC
Created attachment 216210 [details]
Patch to upgrade mail/filtermail to 0.8.6

With OSVERSION: 1300094 portscout reports failure to build

c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I. -I../include -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -I../intl -I.. -I../include -I.  -I/usr/local/include -Wall -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -MT rcfile.o -MD -MP -MF .deps/rcfile.Tpo -c -o rcfile.o rcfile.cc
rcfile.ll:151:14: error: no viable overloaded '='
        yyin = new ifstream (sub_file.c_str ());
        ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/istream:200:20: note: candidate function not viable: no known conversion from 'std::__1::ifstream *' (aka 'basic_ifstream<char> *') to 'std::__1::basic_istream<char>' for 1st argument; dereference the argument with *
    basic_istream& operator=(basic_istream&& __rhs);
                   ^
/usr/include/c++/v1/istream:211:20: note: candidate function not viable: no known conversion from 'std::__1::ifstream *' (aka 'basic_ifstream<char> *') to 'const std::__1::basic_istream<char>' for 1st argument; dereference the argument with *
    basic_istream& operator=(const basic_istream& __rhs) = delete;
                   ^
rcfile.ll:153:15: error: cannot cast from type 'std::istream' (aka 'basic_istream<char>') to pointer type 'std::__1::ifstream *' (aka 'basic_ifstream<char> *')
        if (!((ifstream*) yyin)->is_open ())
              ^~~~~~~~~~~~~~~~

This appears to be caused by a recent update to contrib/flex from 2.5.37 to 2.6.4 where upstream changed yyin and yyout from pointers to references.

I've upgraded filtermail to 0.8.6 and added textproc/flex as a conditional dependency for ${OSVERSION} < 1300000.

This builds and runs successfully on 13.0-CURRENT and 12.1-RELEASE-p5
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2020-07-05 09:02:50 UTC
Maintainer informed via mail
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2020-07-05 09:55:15 UTC
^Triage: Set maintainer address manually (doesn't match MAINTAINER line)

@Maintainer Could you please either update your Bugzilla email address to match the ports MAINTAINER line, or vice-versa, it will ensure our auto-assigner can notify you correctly and automatically
Comment 3 Mike Clarke 2020-07-05 10:24:45 UTC
Created attachment 216213 [details]
Revised patch with updated maintainer email address

Changed maintainer email to match my Bugzilla email address as requested
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2020-08-08 09:50:45 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-08-08 09:50:55 UTC
A commit references this bug:

Author: pi
Date: Sat Aug  8 09:50:42 UTC 2020
New revision: 544378
URL: https://svnweb.freebsd.org/changeset/ports/544378

Log:
  mail/filtermail: update 0.8.3 -> 0.8.6

  - fix build with more recent flex versions
  - pet portlint

  PR:		247771
  Submitted by:	Mike Clarke <jmc-freebsd2@milibyte.co.uk> (maintainer)
  MFH:		2020Q3
  Relnotes:	https://raw.githubusercontent.com/nondeterministic/mailfilter/master/NEWS

Changes:
  head/mail/filtermail/Makefile
  head/mail/filtermail/distinfo
  head/mail/filtermail/files/patch-src__Makefile.in
  head/mail/filtermail/files/patch-src__filter.hh
  head/mail/filtermail/files/patch-src__preferences.cc
  head/mail/filtermail/pkg-descr
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-08-08 15:16:47 UTC
A commit references this bug:

Author: pi
Date: Sat Aug  8 15:16:08 UTC 2020
New revision: 544501
URL: https://svnweb.freebsd.org/changeset/ports/544501

Log:
  MFH: r544378

  mail/filtermail: update 0.8.3 -> 0.8.6

  - fix build with more recent flex versions
  - pet portlint

  PR:		247771
  Submitted by:	Mike Clarke <jmc-freebsd2@milibyte.co.uk> (maintainer)
  Relnotes:	https://raw.githubusercontent.com/nondeterministic/mailfilter/master/NEWS
  Approved by:	portmgr (joneum)

Changes:
_U  branches/2020Q3/
  branches/2020Q3/mail/filtermail/Makefile
  branches/2020Q3/mail/filtermail/distinfo
  branches/2020Q3/mail/filtermail/files/patch-src__Makefile.in
  branches/2020Q3/mail/filtermail/files/patch-src__filter.hh
  branches/2020Q3/mail/filtermail/files/patch-src__preferences.cc
  branches/2020Q3/mail/filtermail/pkg-descr