[oe] "krb" fails to build, suspect GCC bug

Martin Jansa martin.jansa at gmail.com
Tue Oct 27 19:57:42 UTC 2015


On Tue, Oct 27, 2015 at 11:26:32AM -0700, Khem Raj wrote:
> On Tue, Oct 27, 2015 at 11:21 AM, Martin Jansa <martin.jansa at gmail.com> wrote:
> > On Sat, Sep 05, 2015 at 02:39:14PM +0200, Mike Looijmans wrote:
> >> I got this weird build failure from the "krb" package:
> >>
> >> | make[3]: Entering directory
> >> '/TOPDIR/build/tmp/work/mips32el-oe-linux/krb5/1.13.2-r0/krb5-1.13.2/src/lib/krb5/ccache'
> >> | mipsel-oe-linux-gcc  -mel -mabi=32 -mhard-float -march=mips32
> >> --sysroot=/TOPDIR/build/tmp/sysroots/formuler1 -fPIC -DSHARED
> >> -DHAVE_CONFIG_H  -I../../../include -I../../../include -I./ccapi -I. -I.
> >>   -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -Os -pipe -g
> >> -feliminate-unused-debug-types -DDESTRUCTOR_ATTR_WORKS=1
> >> -I/TOPDIR/build/tmp/sysroots/formuler1/usr/include/et -Wall -Wcast-align
> >> -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow
> >> -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes
> >> -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function
> >> -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas
> >> -Wsign-compare -Werror=uninitialized -Werror=pointer-arith
> >> -Werror=declaration-after-statement
> >> -Werror-implicit-function-declaration -pthread -c cc_file.c -o
> >> cc_file.so.o && mv -f cc_file.so.o cc_file.so
> >> | 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;
> >> |             ^
> >> | cc1: some warnings being treated as errors
> >>
> >> Looking at the source, this doesn't make any sense at all. The
> >> declaration of the variable isn't even in the same method body. And the
> >> line it complains about is about the fifth time it passes that variable
> >> to another method.
> >>
> >> And working around it by initializing maxsize=0 just makes the compiler
> >> choke on a similar situation elsewhere:
> >> | packet.c:50:67: error: 'id' may be used uninitialized in this function
> >>
> >>
> >> I suspect the problem here is GCC and not the krb code. Anyone seen this?
> >
> > I've seen it today in my world builds, It seems to fail only when building with -Os.
> >
> > I've seen similar issue in mdadm, also only with -Os.
> >
> 
> is this regression ? or seen for first time?

krb5 fails to build like this with -Os at least since dizzy

mdadm failure:
| raid6check.c: In function 'check_stripes':
| raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|   char *stripe_buf;
|         ^
| cc1: all warnings being treated as errors
| make: *** [raid6check.o] Error 1
| ERROR: oe_runmake failed

is newer (seen only in Jethro builds).

But maybe only because this is built in do_compile_ptest_base and ptest
support was added in oe-core/jethro, it fails the same with gcc-5.2 and gcc-4.9.

> 
> > --
> > Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20151027/016c0c45/attachment-0002.sig>


More information about the Openembedded-devel mailing list