Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685174 - dev-util/ddd-3.3.12-r4: strclass.h:813:19: error: friend declaration of ‘string common_prefix(const string&, const string&, int)’ specifies default arguments and isn’t a definition [-fpermissive]
Summary: dev-util/ddd-3.3.12-r4: strclass.h:813:19: error: friend declaration of ‘stri...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-06 09:04 UTC by Kobboi
Modified: 2019-12-03 23:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,31.78 KB, text/x-log)
2019-05-06 09:04 UTC, Kobboi
Details
The infamous patch itself (ddd-3.3.12-friend-default.patch,2.26 KB, patch)
2019-11-13 00:05 UTC, Bob Johnson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kobboi 2019-05-06 09:04:01 UTC
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -I./..    -O2 -ggdb -Wall -W -Wwrite-strings -march=x86-64 -pipe -fomit-frame-pointer -trigraphs  -c -o rxclass.o rxclass.C
In file included from cook.h:31,
                 from cook.C:36:
strclass.h:813:19: error: friend declaration of ‘string common_prefix(const string&, const string&, int)’ specifies default arguments and isn’t a definition [-fpermissive]
  813 |     friend string common_prefix(const string& x, const string& y,
      |                   ^~~~~~~~~~~~~
strclass.h:815:19: error: friend declaration of ‘string common_suffix(const string&, const string&, int)’ specifies default arguments and isn’t a definition [-fpermissive]
  815 |     friend string common_suffix(const string& x, const string& y,
      |                   ^~~~~~~~~~~~~
strclass.h:866:16: error: friend declaration of ‘int readline(std::istream&, string&, char, int)’ specifies default arguments and isn’t a definition [-fpermissive]
  866 |     friend int readline(std::istream& s, string& x,
      |                ^~~~~~~~
In file included from cwd.h:32,
                 from cwd.C:31:
strclass.h:813:19: error: friend declaration of ‘string common_prefix(const string&, const string&, int)’ specifies default arguments and isn’t a definition [-fpermissive]
  813 |     friend string common_prefix(const string& x, const string& y,
      |                   ^~~~~~~~~~~~~
strclass.h:815:19: error: friend declaration of ‘string common_suffix(const string&, const string&, int)’ specifies default arguments and isn’t a definition [-fpermissive]
  815 |     friend string common_suffix(const string& x, const string& y,
      |                   ^~~~~~~~~~~~~
strclass.h:866:16: error: friend declaration of ‘int readline(std::istream&, string&, char, int)’ specifies default arguments and isn’t a definition [-fpermissive]
  866 |     friend int readline(std::istream& s, string& x,
      |                ^~~~~~~~
make[2]: *** [Makefile:2369: cwd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:2369: cook.o] Error 1
Comment 1 Kobboi 2019-05-06 09:04:23 UTC
Created attachment 575392 [details]
build.log
Comment 2 Kobboi 2019-05-06 09:04:44 UTC
Compiled file on January 16, now using GCC 9.1
Comment 3 Jonas Stein gentoo-dev 2019-05-06 20:29:38 UTC
Thank you for the report. Please recompile and 
paste the emerge info as described on
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
The logs must be part of the ticket, but not on external websites.
We need to have all information at hand before ticket assignment, so that the maintainer can look after it in one session with minimal number of callbacks.
Please reopen this ticket (Status:unconfirmed) afterwards.
Comment 4 Kobboi 2019-05-06 21:07:43 UTC
Portage 2.3.66 (python 3.6.8-final-0, kobboi/samsonov, gcc-9.1.0, glibc-2.29-r2, 4.19.39 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.39-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    32781184 total,   1298956 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: bfa5f82349cb0446008e094f767d618356b45679

sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.1 [disabled]
app-shells/bash:          5.0_p7::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/ccache:          3.7.1::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            6.4.0-r5::gentoo, 9.1.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /var/cache/kobboi/gentoo
    sync-type: git
    sync-uri: https://github.com/kobboi/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/src/debug /usr/lib/debug"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="ssh://christophe@10.8.0.6/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth bzip2 cairo cdda cdr cli colord crypt cups cxx dbus djvu dri dts dvd dvdr eds egl emboss encode evo exif fam ffmpeg flac fluidsynth fortran frei0r gdbm gif glade glamor gles gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle iconv introspection ipv6 jpeg lcms ldap libass libnotify libsecret libtirpc mad midi mng modemmanager mono mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp opus pam pango pcre pdf png policykit ppds pulseaudio qt5 readline samba sdl seccomp smartcard smp spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse synaptics libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="vesa radeon nvidia intel amdgpu dummy fbdev nouveau radeonsi v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-util/ddd-3.3.12-r4::gentoo was built with the following:
USE="readline" ABI_X86="(64)"
Comment 5 Kobboi 2019-05-06 21:08:36 UTC
Portage 2.3.66 (python 3.6.8-final-0, kobboi/samsonov, gcc-9.1.0, glibc-2.29-r2, 4.19.39 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.39-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    32781184 total,   1298956 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: bfa5f82349cb0446008e094f767d618356b45679

sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.1 [disabled]
app-shells/bash:          5.0_p7::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/ccache:          3.7.1::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            6.4.0-r5::gentoo, 9.1.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /var/cache/kobboi/gentoo
    sync-type: git
    sync-uri: https://github.com/kobboi/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=x86-64 -pipe -fomit-frame-pointer -g -ggdb"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/src/debug /usr/lib/debug"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="ssh://christophe@10.8.0.6/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth bzip2 cairo cdda cdr cli colord crypt cups cxx dbus djvu dri dts dvd dvdr eds egl emboss encode evo exif fam ffmpeg flac fluidsynth fortran frei0r gdbm gif glade glamor gles gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle iconv introspection ipv6 jpeg lcms ldap libass libnotify libsecret libtirpc mad midi mng modemmanager mono mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp opus pam pango pcre pdf png policykit ppds pulseaudio qt5 readline samba sdl seccomp smartcard smp spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse synaptics libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="vesa radeon nvidia intel amdgpu dummy fbdev nouveau radeonsi v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-util/ddd-3.3.12-r4::gentoo was built with the following:
USE="readline" ABI_X86="(64)"
Comment 6 Fred Krogh 2019-05-07 15:10:55 UTC
I'm getting the same error using gcc-9.1.  Let me know if you want more info.
Comment 7 David Carlos Manuelda 2019-05-13 00:36:57 UTC
Found the following report [1] over the internet containing a patch that fixes the issue and makes ddd to compile.

Please investigate its application on portage

[1]: http://savannah.gnu.org/bugs/?41997
Comment 8 Juergen Rose 2019-06-25 11:40:03 UTC
(In reply to David Carlos Manuelda from comment #7)
> Found the following report [1] over the internet containing a patch that
> fixes the issue and makes ddd to compile.
> 
> Please investigate its application on portage
> 
> [1]: http://savannah.gnu.org/bugs/?41997

The patch worked for me.
Comment 9 Michael Rohleder (mroh) 2019-09-12 02:34:29 UTC
Patch worked for me too.
Comment 10 David Flogeras 2019-11-11 10:34:25 UTC
I'll pile on here too, I'd expect this bug to heat up now that gcc-9 is stable.
Comment 11 Bob Johnson 2019-11-13 00:05:39 UTC
Created attachment 595922 [details, diff]
The infamous patch itself

Me too. Patch attached.
Comment 12 Maciej Mrozowski gentoo-dev 2019-12-03 23:17:21 UTC
This was inadvertently fixed while doing https://bugs.gentoo.org/696934. I separated forward declaration from friend declaration though, so slightly different approach than proposed here.