Bug 8214

Summary: glibc build failure with DEBUG_BUILD = "1"
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Steven Walter <stevenrwalter>
Component: coreAssignee: Juro Bystricky <juro.bystricky>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: major    
Priority: Medium+ CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher, raj.khem, randy.e.witt, sgw, stevenrwalter
Version: 1.8   
Target Milestone: 2.0   
Hardware: x86   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Steven Walter 2015-08-27 01:58:19 UTC
Building on Ubuntu 14.04 x86_64.  Configured for MACHINE = qemux86 and SDKMACHINE = i686.  Running "bitbake glibc" fails in glibc with this compile error:

| In file included from ../sysdeps/i386/tlsdesc.c:25:0:
| ../include/inline-hashtab.h: In function '_dl_make_tlsdesc_dynamic':
| ./tlsdeschtab.h:28:1: error: inlining failed in call to 'hash_tlsdesc': indirect function call with a ye
t undetermined callee [-Werror=inline]
|  hash_tlsdesc (void *p)
|  ^
[...]
| cc1: all warnings being treated as errors
| make[2]: *** [/mnt/storage/poky/build/tmp/work/i586-poky-linux/glibc/2.21-r0/build-i586-poky-linux/elf/t
lsdesc.os] Error 1
Comment 1 Steven Walter 2015-08-27 02:09:47 UTC
DEBUG_BUILD = "1" is also necessary for the failure to occur.  SDKMACHINE = i686 without DEBUG_BUILD = "1" succeeds.
Comment 2 Randy Witt 2015-08-27 02:41:32 UTC
I tested this in my ubuntu container and it also happened when using qemux86-64 with DEBUG_BUILD = "1". I left SDKMACHINE at the default, I don't believe SDKMACHINE has an effect on this issue.
Comment 3 Steven Walter 2015-08-27 12:28:02 UTC
Agreed, I can reproduce this with only DEBUG_BUILD = "1".
Comment 4 Juro Bystricky 2015-08-27 15:50:17 UTC
Seems to be already fixed with the commit:
625e0ec8b5e5f1c39b3bfad0e6adfecaf957d689

(I will verify this)
Comment 5 Juro Bystricky 2015-08-27 17:02:03 UTC
So yes, it's been fixed with 1.9 (tested with master commit 393bd7496d71eb101f21234c1233a2d18fd2c73e)

glibc builds OK, you get a notification:

NOTE: glibc can't be built with -O, -O -Wno-error will be used instead.

Will try to cherry pick the commit 625e0ec8b5e5f1c39b3bfad0e6adfecaf957d689
and apply it to Fido (1.8).
Comment 6 Steven Walter 2015-08-27 17:18:17 UTC
Cherry-picking that commit onto the fido branch doesn't help for me.  I still get the same fatal warning on tlsdesc.os.  I do get the NOTE about using -Wno-error during parse time, but my log.do_compile still shows the -Werror flag being used.
Comment 7 Juro Bystricky 2015-08-27 17:22:37 UTC
(In reply to comment #6)
> Cherry-picking that commit onto the fido branch doesn't help for me.  I
> still get the same fatal warning on tlsdesc.os.  I do get the NOTE about
> using -Wno-error during parse time, but my log.do_compile still shows the
> -Werror flag being used.

Thanks. I will have a closer look. Apparently it needs cherry-picking something else as well.
Comment 8 Juro Bystricky 2015-08-27 19:21:02 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Cherry-picking that commit onto the fido branch doesn't help for me.  I
> > still get the same fatal warning on tlsdesc.os.  I do get the NOTE about
> > using -Wno-error during parse time, but my log.do_compile still shows the
> > -Werror flag being used.
> 
> Thanks. I will have a closer look. Apparently it needs cherry-picking
> something else as well.

So this commit needs to be back ported as well:
d6a2cf3cbef581478185c25d8a7a6109a201c583
Comment 9 Steven Walter 2015-08-27 19:46:26 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > Cherry-picking that commit onto the fido branch doesn't help for me.  I
> > > still get the same fatal warning on tlsdesc.os.  I do get the NOTE about
> > > using -Wno-error during parse time, but my log.do_compile still shows the
> > > -Werror flag being used.
> > 
> > Thanks. I will have a closer look. Apparently it needs cherry-picking
> > something else as well.
> 
> So this commit needs to be back ported as well:
> d6a2cf3cbef581478185c25d8a7a6109a201c583

Unless I'm mistaken, that commit is already present in the fido branch
Comment 10 Steven Walter 2015-08-27 19:56:52 UTC
(In reply to comment #6)
> Cherry-picking that commit onto the fido branch doesn't help for me.  I
> still get the same fatal warning on tlsdesc.os.  I do get the NOTE about
> using -Wno-error during parse time, but my log.do_compile still shows the
> -Werror flag being used.

My bad, that commit does in fact fix the issue.  I have a glibc bbappend in one of my layers that must have been defeating the fix.  It works in a stock poky build.
Comment 11 Juro Bystricky 2015-08-28 20:57:59 UTC
So it turns out only the commit 625e0ec8b5e5f1c39b3bfad0e6adfecaf957d689: “glibc: Consider adding -Wno-error in cases when not using -O2”

needs to be backported to Fido.
Comment 13 Bogdan Alexandru Voiculescu 2015-10-26 12:36:30 UTC
Verified on master: 505a82673ac2487df5ea343a6422c2fc47018831
and on fido: fido:fa55b8e5050c6d7a47ef8e9bc213d0cc9471b43a