Summary: | app-admin/tripwire-2.4.2.2-r2 with sys-devel/gcc-4.9 - archive.cpp:889:28: error: redeclaration of 'eArchiveOpen e' [-fpermissive] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kacper Kowalik (Xarthisius) (RETIRED) <xarthisius> |
Component: | Current packages | Assignee: | Chema Alonso Josa (RETIRED) <nimiux> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gabemarcano, O01eg |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceforge.net/p/tripwire/bugs/59/ | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 495124 | ||
Attachments: |
build log
tripwire-2.4.2.2-r2.ebuild.patch tripwire-2.4.2.2-exception-shadowing.patch |
Description
Kacper Kowalik (Xarthisius) (RETIRED)
2013-12-24 10:27:38 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 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? (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. 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 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.
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.
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 + |