November 1, 2016 - Shuah Khan

Beware of Ubuntu 16.10 Upgrade Woes

I wanted to share a word of caution for anybody planning to update their development and test systems to Ubuntu 16.10: I can’t build kernels anymore. Ubuntu recommends a special patch to the kernel Makefile. This patch will work only on Ubuntu kernel sources and not the upstream Linux kernel trees.

Linux kernel builds fail with the following message

The message about CONFIG_CC_STACKPROTECTOR_STRONG is misleading because this Kernel config option is enabled in most distro kernels; disabling it won’t solve the kernel build failure problem. It fails because the position independent executable option is set as default in gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12). As a result, Linux Kernel Makefile needs to update to build the kernel with “-fno-pie” option.

The Ubuntu 16.10 release notes say

We have modified GCC to by-default compile programs with position independent executable support to improve the security benefits provided by Address Space Layout Randomization.

This may cause difficulty when trying to compile Linux kernels that still need this patch applied. Other programs may experience other problems; some debugging guidelines are at

This clearly states a patch needs to applied to the Linux Kernel makefile. This patch forces no-pie for distro compilers that enable pie by default. So at the moment, I am going to refrain from upgrading my development and test systems.

I am following up with the Ubuntu kernel team and upstream on this issue. There is a patch in the works upstream to address the GCC change to enable position independent executable option by default. In the meantime, the following change worked for me on Linux 4.8.4 and Linux 4.9-rc1. I was able to build Linux 4.8.4 successfully and it is running nicely.

Shuah Khan

About Shuah Khan

Shuah Khan is a Senior Linux Kernel Developer at Samsung's Open Source Group. She is a Linux Kernel Maintainer and Contributor who focuses on Linux Media Core and Power Management. She maintains Kernel Selftest framework. She has contributed to IOMMU, and DMA areas. In addition, she is helping with stable release kernel testing. She authored Linux Kernel Testing and Debugging paper published on the Linux Journal and writes Linux Journal kernel news articles. She has presented at several Linux conferences and Linux Kernel Developer Keynote Panels. She served on the Linux Foundation Technical Advisory Board. Prior to joining Samsung, she worked as a kernel and software developer at HP and Lucent.

Image Credits: Open Source Way

Development / Linux Bugs / Ubuntu /

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments Protected by WP-SpamShield Anti-Spam