GCC 5, like each release of GCC, comes with new error detections and warnings. This is exactly why building ports with -Werror is heavily discourages (in fact there is a standard blanket to remove these when found). In the case of krb5, it fails here: cc_file.c: In function 'fcc_next_cred': cc_file.c:368:9: error: 'maxsize' may be used uninitialized in this function [-Werror=maybe-uninitialized] ret = load_data(context, id, maxsize, buf); ^ cc_file.c:1091:12: note: 'maxsize' was declared here size_t maxsize; ^ cc_file.c: In function 'read_principal': cc_file.c:414:9: error: 'maxsize' may be used uninitialized in this function [-Werror=maybe-uninitialized] ret = load_principal(context, id, maxsize, &buf); ^ cc1: some warnings being treated as errors Makefile:779: recipe for target 'cc_file.so' failed gmake[4]: *** [cc_file.so] Error 1 gmake[4]: Leaving directory '/wrkdirs/security/krb5/work/krb5-1.13/src/lib/krb5/ccache' Makefile:1107: recipe for target 'all-recurse' failed gmake[3]: *** [all-recurse] Error 1 gmake[3]: Leaving directory '/wrkdirs/security/krb5/work/krb5-1.13/src/lib/krb5' Makefile:951: recipe for target 'all-recurse' failed gmake[2]: *** [all-recurse] Error 1 gmake[2]: Leaving directory '/wrkdirs/security/krb5/work/krb5-1.13/src/lib' Makefile:1526: recipe for target 'all-recurse' failed gmake[1]: *** [all-recurse] Error 1 gmake[1]: Leaving directory '/wrkdirs/security/krb5/work/krb5-1.13/src' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/security/krb5 => Cleaning up wrkdir ===> Cleaning for krb5-1.13_1 At least 103 other ports depend on krb5 directly or indirectly on DragonFly (there's no kerberos in base) proposed fix: 1) just remove -Werror from cflags 2) resolved the warning above.
Auto-assigned to maintainer cy@FreeBSD.org
CFLAGS isn't set by the port though is set by the configure script in the tarball. slippy$ pwd /home/cy/freebsd/svn/ports/security/krb5 slippy$ ag -i werror slippy$ Can you try CFLAGS=-Wno-werror make please?
it did not work nor did "CONFIGURE_ARGS+= --disable-werror". I looked at the configure script and it's testing flags to that work with Werror so I'd guess the configure script would have to be patched. (or the error in source file fixed)
Created attachment 152918 [details] patch to fix build using gcc5 as compiler This will allow krb5 to build with -Werror on gcc5. Basically it initializes "max_size" to 0 in the case of an error on the getsize function. I'm surprised krb didn't abort when the function return an error though.
Good stuff. Looks like the two older krb5 ports don't need it.
A commit references this bug: Author: cy Date: Thu Feb 12 21:15:16 UTC 2015 New revision: 378897 URL: https://svnweb.freebsd.org/changeset/ports/378897 Log: Fix gcc5 build for DragonFly BSD. PR: 197561 Submitted by: marino Changes: head/security/krb5/Makefile head/security/krb5/files/patch-lib__krb5__ccache__cc_file.c
Committed. Thanks.