[apparmor] gcc 5 errors

Seth Arnold seth.arnold at canonical.com
Thu Feb 12 20:40:41 UTC 2015


Doko has conducted a gcc5 rebuild of the Ubuntu archive and AppArmor has
failed:
http://people.ubuntuwire.org/~wgrant/rebuild-ftbfs-test/test-rebuild-20150202-gcc5-vivid.html

It looks like all the errors reported boil down to one real problem:

g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wsign-compare -Wmissing-field-initializers -Wformat-security -Wunused-parameter -std=gnu++0x -D_GNU_SOURCE  -DPACKAGE=\"apparmor-parser\" -DLOCALEDIR=\"/usr/share/locale\" -DSUBDOMAIN_CONFDIR=\"/etc/apparmor\" -I../libraries/libapparmor//include -c -o dbus.o dbus.cc
dbus.cc: In member function 'virtual std::ostream& dbus_rule::dump(std::ostream&)':
dbus.cc:152:32: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'std::ostream {aka std::basic_ostream<char>}')
   os << " member=\"" << member << os << "\"";
                                ^

I'm surprised to see the '<< os <<' here; I don't know what was intended
to happen here, but removing it with the following patch didn't introduce
any new build errors or warnings on the gcc-4.8 on vivid.

(I don't have an easy way to test the build with gcc-5, so this may not be
exhaustive.)

Any comments?

Thanks
-------------- next part --------------
---
 parser/dbus.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/parser/dbus.cc
===================================================================
--- a/parser/dbus.cc
+++ b/parser/dbus.cc
@@ -149,7 +149,7 @@
 	if (interface)
 		os << " interface=\"" << interface << "\"";
 	if (member)
-		os << " member=\"" << member << os << "\"";
+		os << " member=\"" << member << "\"";
 
 	if (!(mode & AA_DBUS_BIND) && (peer_label || name)) {
 		os << " peer=( ";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150212/247bfc12/attachment.pgp>


More information about the AppArmor mailing list