Bug 8438

Summary: uclibc needs patch for gcc 5.x
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Markus Volk <f_l_k>
Component: coreAssignee: Ross Burton <ross.burton>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: major    
Priority: Medium+ CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher
Version: 2.0   
Target Milestone: 2.0   
Hardware: Other   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Markus Volk 2015-10-03 09:29:37 UTC
the uclibc recipe in recipes-core needs the following patch for gcc 5.x


http://git.buildroot.org/buildroot/tree/package/uclibc/0.9.33.2/0071-Fix-libgcc_s_resume-issue.patch?id=6c7f3b28e694da032a80cc5f55ef124f2c6e81ee
Comment 1 Ross Burton 2015-10-08 16:58:08 UTC
Even with that patch uclibc doesn't build for me using gcc5:

| /data/poky-master/tmp/work/core2-64-poky-linux-uclibc/uclibc/0.9.33+gitAUTOINC+ca1c74d67d-r9/git/libc/sysdeps/linux/x86_64/brk.c:27: undefined reference to `__stack_chk_guard'
| /data/poky-master/tmp/work/core2-64-poky-linux-uclibc/uclibc/0.9.33+gitAUTOINC+ca1c74d67d-r9/git/libc/sysdeps/linux/x86_64/brk.c:44: undefined reference to `__stack_chk_fail'

Did I do something bad (I just did TCLIBC=uclibc), or are there other patches needed too?
Comment 2 Markus Volk 2015-10-08 18:42:04 UTC
I am stuck with an old kernel version (3.10.70), because I have to use some binary blob drivers. Therefore, some modifications had been necessary in order to build for my set-top box

I didn't need any further patches. 

This is my uclibc config.

https://github.com/neutrino-hd/meta-neutrino/tree/master/recipes-custom/uclibc/uclibc

The local.conf i am using is this one

https://github.com/neutrino-hd/meta-coolstream/blob/master/example/local.conf

Please consider the fact that I am not a real developer and only do this for fun 

Is UCLIBC_HAS_SSP set in your uclibc config? 

I will try this out with a clean yocto build as soon as i find some time
Comment 3 Markus Volk 2015-10-09 17:03:22 UTC
I tried to reproduce your error message and startet with a clean jethro branch. I only changed to tclibc = "uclibc" in local.conf and was able to build uclibc for machine "qemux86" without errors. 

Then i pulled in meta-raspberrypi, because it is very close to the architecture i am building for and stumbled across the same errors i had, when i first tried to build uclibc for my machine. So i used the uclibc.bbappend posted above and was able to complete the build for machine "raspberrypi2" (fix-libgcc_s_resume-issue.patch was also needed)

The patch seems only be needed for arm architecture or at least for armv7a
Comment 4 Ross Burton 2015-10-23 16:06:53 UTC
Khem posted a series to make uclibc work with current master.
Comment 5 Ross Burton 2015-10-27 13:59:12 UTC
Fixed as of oe-core 5c515a1c7a86c510b6ae4f99c5b2e20d52622543.
Comment 6 Markus Volk 2015-10-27 18:49:05 UTC
Thanks for the fix
Comment 7 Bogdan Alexandru Voiculescu 2015-11-18 16:05:06 UTC
Verified on master fc45deac89ef63ca1c44e763c38ced7dfd72cbe1
for passing the UTMP error I added 
UCLIBC_HAS_UTMP=y
/meta/recipes-core/uclibc/uclibc-git/uClibc.distro