bcmwl-kernel-source 6.30.223.248+bdcom-0ubuntu8: bcmwl kernel module failed to build [code model kernel does not support PIC mode]

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

Bug Description

DKMS make.log for bcmwl-6.30.223.248+bdcom 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/6.30.223.248+bdcom/build/built-in.o
  CC [M] /var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/src/shared/linux_osl.o
/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/src/shared/linux_osl.c:1:0: error: code model kernel does not support PIC mode
 /*
 ^
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/src/shared/linux_osl.o' failed
make[1]: *** [/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/src/shared/linux_osl.o] Error 1
Makefile:1396: recipe for target '_module_/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build' failed
make: *** [_module_/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build] Error 2

This problem persists with the new linux kernel version 4.4.0.21

ProblemType: Package
DistroRelease: Ubuntu 16.10
Package: bcmwl-kernel-source 6.30.223.248+bdcom-0ubuntu8
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:6.30.223.248+bdcom-0ubuntu8:/var/lib/dkms/bcmwl/6.30.223.248+bdcom/build/src/shared/linux_osl.c:1:0: 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)
PackageVersion: 6.30.223.248+bdcom-0ubuntu8
RelatedPackageVersions:
 dpkg 1.18.4ubuntu2
 apt 1.2.11
SourcePackage: bcmwl
Title: bcmwl-kernel-source 6.30.223.248+bdcom-0ubuntu8: bcmwl kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Guru Prasath (guru98) wrote :
summary: bcmwl-kernel-source 6.30.223.248+bdcom-0ubuntu8: bcmwl kernel module
- failed to build
+ failed to build [code model kernel does not support PIC mode]
Revision history for this message
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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in bcmwl (Ubuntu):
status: New → Confirmed
Revision history for this message
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
Revision history for this message
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
removed: 4.4.0.21
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.