bcmwl-kernel-source bcmwl kernel module failed to build [code model kernel does not support PIC mode]

Bug #1578455 reported by Guru Prasath on 2016-05-05
This bug affects 14 people
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
broadcom-sta (Ubuntu)
dkms (Ubuntu)
gcc-5 (Ubuntu)

Bug Description

DKMS make.log for bcmwl- for kernel 4.4.0-21-generic (x86_64)
Thu May 5 06:57:03 IST 2016
make: Entering directory '/usr/src/linux-headers-4.4.0-21-generic'
arch/x86/Makefile:133: stack-protector enabled but compiler support broken
Makefile:670: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  LD /var/lib/dkms/bcmwl/
  CC [M] /var/lib/dkms/bcmwl/
/var/lib/dkms/bcmwl/ error: code model kernel does not support PIC mode
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/bcmwl/' failed
make[1]: *** [/var/lib/dkms/bcmwl/] Error 1
Makefile:1396: recipe for target '_module_/var/lib/dkms/bcmwl/' failed
make: *** [_module_/var/lib/dkms/bcmwl/] Error 2

This problem persists with the new linux kernel version

ProblemType: Package
DistroRelease: Ubuntu 16.10
Package: bcmwl-kernel-source
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
DKMSKernelVersion: 4.4.0-21-generic
Date: Thu May 5 06:57:07 2016
DuplicateSignature: dkms:bcmwl-kernel-source: error: code model kernel does not support PIC mode
InstallationDate: Installed on 2016-05-04 (0 days ago)
InstallationMedia: Ubuntu-GNOME 16.10 "Yakkety Yak" - Alpha amd64 (20160426)
 dpkg 1.18.4ubuntu2
 apt 1.2.11
SourcePackage: bcmwl
Title: bcmwl-kernel-source bcmwl kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Guru Prasath (guru98) wrote :
summary: bcmwl-kernel-source bcmwl kernel module
- failed to build
+ failed to build [code model kernel does not support PIC mode]
Guru Prasath (guru98) wrote :

I added a extra [KBUILD_CFLAGS += -fno-pic] in the [/usr/src/linux-headers-4.4.0-21-generic/arch/x86/Makefile] which seemed to make the package compile. But still don't know of any side consequences.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bcmwl (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

I'm grouping both bcmwl and broadcom-sta here. Because last time I checked they were both based on the same upstream Broadcom code. So they have the same bugs...

Changed in broadcom-sta (Ubuntu):
status: New → Confirmed
Bas Zoetekouw (baszoetekouw) wrote :

Note that this bug is not specific to the broadcom code. It affects _all_ kernel module builds, and is caused by a recent change in gcc-5 (which makes -fPIE default).

The solution should therefore probably be implemented more generically than just in these packages: possible in dkms or in the kernel headers.

no longer affects: gcc-defaults (Ubuntu)
Changed in dkms (Ubuntu):
status: New → Confirmed
Changed in gcc-5 (Ubuntu):
status: New → Confirmed
tags: added: gcc-5
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers