Bug 10457

Summary: ppp: 4.8 kernel fix breaks builds with older external toolchains
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Christopher Larson <kergoth>
Component: connectivityAssignee: Yi Zhao <yi.zhao>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jackie.huang, meta.mr.watcher, meta.watcher, pokylinux, randy.macleod, yi.zhao
Version: unspecified   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Christopher Larson 2016-10-19 15:54:56 UTC
A patch is applied to fix builds with 4.8 kernels (specifically, 4.8 linux-libc-headers, as it doesn't use actual kernel headers), but doing so breaks builds with older linux-libc-headers.

This isn't an issue for internal toolchain builds, as we only keep around a single linux-libc-headers version, but the external toolchain has its own, and I haven't seen any updated to 4.8 yet, so this effectively breaks ppp builds for all current external toolchains.

It'd be nice if we could find a fix that worked for kernels earlier and later than 4.8 both, so we don't have to decide whether to revert the patch in meta-sourcery based on the particulars of the external toolchain in use.
Comment 1 Christopher Larson 2016-10-19 18:24:33 UTC
Updated the meta-sourcery workaround to grab the kernel version from the external toolchain sysroot and remove the patch based on that, so this is low priority.
Comment 2 Robert Berger 2016-11-15 16:28:02 UTC
It does not only break it for external toolchains, but also if you set LINUXLIBCVERSION to something < 4.8 for internal toolchains with morty.

I took your ppp_2.4.7.bbappend, hacked it a bit and added it to my meta layer so it works now with an internal toolchain, but a LINUXLIBCVERSION before 4.4 as well:

KERNEL_48_PATCH = "file://ppp-fix-building-with-linux-4.8.patch"
SRC_URI_remove := "${@'${KERNEL_48_PATCH}' if [int(i) for i in ('${LINUXLIBCVERSION}'.replace('%', '') or '0.0').split('.')] < [4, 8] else ''}"
Comment 3 Robert Berger 2016-11-15 16:29:19 UTC
should be but a LINUXLIBCVERSION before 4.8 as well:
Comment 4 dengke 2017-03-09 02:57:21 UTC
(In reply to comment #2)
> It does not only break it for external toolchains, but also if you set
> LINUXLIBCVERSION to something < 4.8 for internal toolchains with morty.
> 
> I took your ppp_2.4.7.bbappend, hacked it a bit and added it to my meta
> layer so it works now with an internal toolchain, but a LINUXLIBCVERSION
> before 4.4 as well:
> 
> KERNEL_48_PATCH = "file://ppp-fix-building-with-linux-4.8.patch"
> SRC_URI_remove := "${@'${KERNEL_48_PATCH}' if [int(i) for i in
> ('${LINUXLIBCVERSION}'.replace('%', '') or '0.0').split('.')] < [4, 8] else
> ''}"

So we specify the patch to the kernel 4.8 can solve the problem.
Comment 5 Robert Berger 2017-05-11 18:16:02 UTC
This patch should only be applied when a 4.8 (or maybe newer) kernel is used and certainly makes a problem for 4.4 kernels.