Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124839 - app-admin/tripwire-2.3.1.2-r2 ebuild comile errors, friend class
Summary: app-admin/tripwire-2.3.1.2-r2 ebuild comile errors, friend class
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Tavis Ormandy (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-03 11:25 UTC by Justin Findlay
Modified: 2006-03-08 10:44 UTC (History)
1 user (show)

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


Attachments
a patch that fixes all broken forward friend declarations (tripwire-2.3.1-2.friend-declaration.patch,346 bytes, patch)
2006-03-03 11:27 UTC, Justin Findlay
Details | Diff
same diff, but this time it works (tripwire-2.3.1-2.fix_broken_friends.patch,1.22 KB, patch)
2006-03-08 10:28 UTC, Justin Findlay
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Findlay 2006-03-03 11:25:13 UTC
To me it either looks as if someone over at tripwire was uncareful in patching the source as this bug is just some omissions of syntactical propriety or it hasn't been tested with gcc-4 yet.  Nevertheless, from Bjarne himself:

qq/
A friend class must be previously declared in an enclosing scope or defined in the non-class scope immediately enclosing the class that is declaring it a friend.  Scopes outside the innermost enclosing namespace scope are not considered.
/ -- The C++ Programming Language, Special Edition. p 280

$ gcc --version
gcc (GCC) 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8)
Comment 1 Justin Findlay 2006-03-03 11:27:45 UTC
Created attachment 81225 [details, diff]
a patch that fixes all broken forward friend declarations

This patch should be pretty self explanatory.  It patches the three class declarations who use friend classes without previously declaring them within the enclosing scope.
Comment 2 Patrizio Bassi 2006-03-06 01:34:58 UTC
i manually patched, following the patch attached (please use -Nru swith for diff)

and that works.


please apply and close this gcc4 problem.
Comment 3 Tavis Ormandy (RETIRED) gentoo-dev 2006-03-08 01:59:31 UTC
Thanks Justin, please provide a unified diff (produced using diff -u), and I'll get this fix into portage.
Comment 4 Justin Findlay 2006-03-08 10:28:37 UTC
Created attachment 81707 [details, diff]
same diff, but this time it works
Comment 5 Tavis Ormandy (RETIRED) gentoo-dev 2006-03-08 10:44:16 UTC
Thanks Justin, I checked with a c++ guy here, and he confirms your observations, so I went ahead and added your patch.

fixed in cvs.