Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 495204 - app-admin/tripwire-2.4.2.2-r2 with sys-devel/gcc-4.9 - archive.cpp:889:28: error: redeclaration of 'eArchiveOpen e' [-fpermissive]
Summary: app-admin/tripwire-2.4.2.2-r2 with sys-devel/gcc-4.9 - archive.cpp:889:28: er...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chema Alonso Josa (RETIRED)
URL: https://sourceforge.net/p/tripwire/bu...
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.9
  Show dependency tree
 
Reported: 2013-12-24 10:27 UTC by Kacper Kowalik (Xarthisius) (RETIRED)
Modified: 2015-10-01 09:36 UTC (History)
2 users (show)

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


Attachments
build log (tripwire-2.4.2.2-r2:20131224-101946.log,16.46 KB, text/plain)
2013-12-24 10:27 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details
tripwire-2.4.2.2-r2.ebuild.patch (tripwire-2.4.2.2-r2.ebuild.patch,315 bytes, patch)
2015-02-09 22:18 UTC, Gabriel Marcano
Details | Diff
tripwire-2.4.2.2-exception-shadowing.patch (tripwire-2.4.2.2-exception-shadowing.patch,536 bytes, patch)
2015-02-09 22:20 UTC, Gabriel Marcano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-12-24 10:27:38 UTC
Created attachment 366078 [details]
build log

Please note that gcc-4.9 is not yet in tree, so don't feel obligated to fix this bug just yet. Nevertheless please don't close it as invalid. I'll try to provide patches in near (or distant) future. TIA!

Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.9.0-pre9999, glibc-2.17, 3.4.61-gentoo x86_64)
=================================================================
System uname: Linux-3.4.61-gentoo-x86_64-AMD_Opteron-tm-_Processor_6128-with-gentoo-2.2
KiB Mem:    16467244 total,   4233268 free
KiB Swap:   20971500 total,  20764540 free
Timestamp of tree: Tue, 24 Dec 2013 01:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.6, 3.3.3
dev-util/cmake:           2.8.12.1-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1, 4.8.2, 4.9.0_pre9999::toolchain
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo toolchain
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/entropy /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j18"
PKGDIR="/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"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/toolchain"
SYNC="rsync://ladon/gentoo-portage"
USE="X acl amd64 berkdb bzip2 cairo cli cracklib crypt cxx dri fortran gdbm hwdb iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre png policykit python readline romio session sqlite sse sse2 ssl tcpd threads unicode vim-syntax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm mdraid" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl en" OFFICE_IMPLEMENTATION="libreoffice" OPENMPI_RM="pbs" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="mga" 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"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Stuart Shelton 2014-08-08 18:21:18 UTC
Also note that this fails with llvm/clang:

/opt/gentoo/usr/bin/clang++ -DHAVE_CONFIG_H		 -I. -I../.. -I..  -I/opt/gentoo/usr/include  -DCONFIG_DIR="\"/etc/tripwire\"" -fno-strict-aliasing  -march=core-avx-i -pipe -O2 -c -o corestrings.o corestrings.cpp
archive.cpp:889:26: error: redefinition of 'e' with a different type: 'eArchiveOpen' vs 'eFSServices &'
            eArchiveOpen e(strTempFile, errStr);
                         ^
archive.cpp:886:29: note: previous definition is here
        catch( eFSServices& e)
                            ^
1 error generated.
Makefile:356: recipe for target 'archive.o' failed
make[3]: *** [archive.o] Error 1

$ clang --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
Comment 2 Gabriel Marcano 2014-12-17 15:49:42 UTC
Reading the code for archive.cpp where the error appears, I see this:

886    catch( eFSServices& e)
887      {
888          TSTRING errStr = TSS_GetString( cCore, core::STR_BAD_TEMPDIRECTORY );
889          eArchiveOpen e(strTempFile, errStr);
890          throw e;
891      }

According to the GCC porting guide, this is malformed C++ (Shadowing name of exception in catch handler now rejected). Should this issue be closed an a new one opened up against tripwire?
Comment 3 Anthony Basile gentoo-dev 2015-01-17 16:02:11 UTC
(In reply to Gabriel Marcano from comment #2)
> Reading the code for archive.cpp where the error appears, I see this:
> 
> 886    catch( eFSServices& e)
> 887      {
> 888          TSTRING errStr = TSS_GetString( cCore,
> core::STR_BAD_TEMPDIRECTORY );
> 889          eArchiveOpen e(strTempFile, errStr);
> 890          throw e;
> 891      }
> 
> According to the GCC porting guide, this is malformed C++ (Shadowing name of
> exception in catch handler now rejected). Should this issue be closed an a
> new one opened up against tripwire?

We do not have to close this bug.  It will not be a blocker against 4.9 but leave it in place until tripwire is fixed.  The maintainer (nimiux) should push a bug to upstream tripwire.
Comment 4 Chema Alonso Josa (RETIRED) gentoo-dev 2015-01-19 09:42:00 UTC
Sorry for the huge delay. I've filed an upstream bug.

https://sourceforge.net/p/tripwire/bugs/59/

I don't have the time now to take a closer look at the code, so if you guys find a patch to fix this, I'll be glad to push it.

Thanks for the report
Comment 5 Gabriel Marcano 2015-02-09 22:18:19 UTC
Created attachment 396002 [details, diff]
tripwire-2.4.2.2-r2.ebuild.patch

This patch adds an epatch for a file that patches the exception shadowing problem. I'll be uploading the patch (which should be placed in the tripwire/files directory) in a second.
Comment 6 Gabriel Marcano 2015-02-09 22:20:32 UTC
Created attachment 396004 [details, diff]
tripwire-2.4.2.2-exception-shadowing.patch

This should fix the problem that prevented compilation. I tested this patch on my computer, and the program compiled. I did not do any further testing, though. In theory, the fix was simple, in that all that was needed was to rename the variable that was shadowing the name of the exception in its scope. I don't think fixing the shadowing will have any unintended consequences. As an aside, tripwire triggered a lot of warnings in GCC.
Comment 7 Chema Alonso Josa (RETIRED) gentoo-dev 2015-02-13 17:55:35 UTC
Thanks for the patch. I've pushed it to the tree. I'll test it in the next days.

+*tripwire-2.4.2.2-r3 (13 Feb 2015)
+
+  13 Feb 2015; Chema Alonso <nimiux@gentoo.org> +tripwire-2.4.2.2-r3.ebuild,
+  +files/tripwire-2.4.2.2-exception-shadowing.patch:
+  Bump to fix bug #495204. Thank to Gabriel Marcano
+