Bug 238647 - misc/estic: Unbreak with GCC 9
Summary: misc/estic: Unbreak with GCC 9
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: Dirk Meyer
URL: http://package22.nyi.freebsd.org/data...
Keywords: needs-qa, patch
Depends on:
Blocks: 238330
  Show dependency treegraph
 
Reported: 2019-06-17 07:30 UTC by Tobias Kortkamp
Modified: 2019-06-27 10:01 UTC (History)
3 users (show)

See Also:
dinoex: maintainer-feedback+


Attachments
estic.diff (379 bytes, patch)
2019-06-17 07:30 UTC, Tobias Kortkamp
tobik: maintainer-approval? (dinoex)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer 2019-06-17 07:30:54 UTC
Created attachment 205168 [details]
estic.diff

estic fails to build with GCC 9:

g++9 -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9 -std=gnu++98  -DFREEBSD -g -Wall -x c++ -I /usr/local/include -fno-implicit-templates -DEXPLICIT_TEMPLATES -c bitset.cc
In file included from stream.h:76,
                 from bitset.cc:25:
str.h:346:19: error: friend declaration of 'String ShowControls(const String&, unsigned int)' specifies default arguments and isn't a definition [-fpermissive]
  346 |     friend String ShowControls (const String& S, unsigned Style = ccDefault);
      |                   ^~~~~~~~~~~~
str.h:346:19: error: friend declaration of 'String ShowControls(const String&, unsigned int)' specifies default arguments and isn't the only declaration [-fpermissive]
str.h:97:12: note: previous declaration of 'String ShowControls(const String&, unsigned int)'
   97 |     String ShowControls (const String& S, unsigned Style);
      |            ^~~~~~~~~~~~
*** Error code 1

Adding -fpermissive to CXXFLAGS allows it to build, but maybe there is a
nicer way?

http://package22.nyi.freebsd.org/data/112amd64-default-PR238330/2019-06-09_20h29m30s/logs/errors/estic-1.61_9.log
Comment 1 Dirk Meyer freebsd_committer 2019-06-27 07:23:56 UTC
I will test a some patches.
Comment 2 commit-hook freebsd_committer 2019-06-27 10:00:55 UTC
A commit references this bug:

Author: dinoex
Date: Thu Jun 27 09:59:55 UTC 2019
New revision: 505205
URL: https://svnweb.freebsd.org/changeset/ports/505205

Log:
  - fix build with gcc9
  - fix build with clang from base on FreeBSD-11 and FreeBSD-12
  PR:		238647

Changes:
  head/misc/estic/Makefile
  head/misc/estic/files/patch-str.h