Jory and I both hit this. On both the default amd64 profile or hardened-multilib, audit fails to build with gcc-4.6.0. It fails with a redefinition of typedef mode_t. autrace.c:210:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -D_REENTRANT -D_GNU_SOURCE -O2 -pipe -Wl,-O1 -Wl,--as-needed -o autrace autrace.o delete_all.o auditctl-llist.o -lpthread -Lmt -lauditmt libtool: link: x86_64-pc-linux-gnu-gcc -D_REENTRANT -D_GNU_SOURCE -O2 -pipe -Wl,-O1 -o autrace autrace.o delete_all.o auditctl-llist.o -Wl,--as-needed -lpthread -L/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/src/mt -lauditmt make[2]: Leaving directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/src' Making all in audisp make[2]: Entering directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp' Making all in plugins make[3]: Entering directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp/plugins' Making all in builtins make[4]: Entering directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp/plugins/builtins' make[4]: Nothing to be done for `all'. make[4]: Leaving directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp/plugins/builtins' Making all in remote make[4]: Entering directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp/plugins/remote' x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../.. -I.. -I../../../lib -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -Wundef -O2 -pipe -c -o audisp_remote-audisp-remote.o `test -f 'audisp-remote.c' || echo './'`audisp-remote.c In file included from audisp-remote.c:34:0: remote-config.h:27:52: error: redefinition of typedef 'mode_t' with different type /usr/include/sys/types.h:71:18: note: previous declaration of 'mode_t' was here make[4]: *** [audisp_remote-audisp-remote.o] Error 1 make[4]: Leaving directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp/plugins/remote' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp/plugins' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4/audisp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-process/audit-1.7.4/work/audit-1.7.4' make: *** [all] Error 2 emake failed Reproducible: Always Steps to Reproduce: 1. toolchain: gcc-4.6.0, glibc-2.13-r2, binutils-2.20.1-r1 2. emerge audit It will probably fail on all arches and all profiles.
Okay I think this is a name conflict. In audisp/plugins/remote/remote-config.h on line 27 we have mode_t defined as an enum: typedef enum { M_IMMEDIATE, M_STORE_AND_FORWARD } mode_t; However, 1) <sys/types.h> has mode_t typedefed to __mode_t which in 2) <bits/types.h> is typedefed to __MODE_T_TYPE which in 3) <bits/typesizes.h> is typedefed to __U32_TYPE which in 4) <bits/types.h> is typedefed to an unsigned int I'm not sure why this is coming up in =gcc-4.6.0 but not <gcc-4.6.0
https://fedorahosted.org/audit/changeset/455
(In reply to comment #2) > https://fedorahosted.org/audit/changeset/455 There is more then that simple two liner patch needed. I will dig into this tonight and see what we can put together.
Created attachment 268781 [details, diff] update mode_t to rmode_t for gcc-4.6 This is tested, we can actually use a simple sed for the two instance replace as well.
(In reply to comment #4) > Created attachment 268781 [details, diff] > update mode_t to rmode_t for gcc-4.6 > > This is tested, we can actually use a simple sed for the two instance replace > as well. It *is* just two lines, the name conflict. I tried it as soon as Ryan posted, and it compiled, but I remain confused. Why does gcc-4.6.0 bring out the problem but gcc-4.5.2 misses it? This worries me about unpredictable effects due to the new behavior. *shrug*
Created attachment 269291 [details, diff] change mode_t to rmode_t via sed This is the cleanier solution to prevent unneeded cruft in the tree :) Hope we can get this landed soon.
Added to the overlay in the meantime. https://overlays.gentoo.org/proj/gcc-porting/changeset/168
Created attachment 271057 [details] Log file another problem. _____________________________________ Portage 2.2.0_alpha30 (hardened/linux/amd64/no-multilib, gcc-4.6.0, libc-0-r0, 2.6.38-hardened x86_64)
(In reply to comment #8) > Created attachment 271057 [details] > Log file > > another problem. > _____________________________________ > Portage 2.2.0_alpha30 (hardened/linux/amd64/no-multilib, gcc-4.6.0, libc-0-r0, > 2.6.38-hardened x86_64) Do not highjack a bug report, open a new report for the problem. Make sure you also attach emerge --info audit
please test 2.1.3 instead.
2.1.3 works.