bcmwl kernel module failed to build (error: linux/autoconf.h: No such file or directory)

Bug #580594 reported by David Stansby
This bug affects 163 people
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

WORKAROUND:

This is for users of Ubuntu 10.04 who have upgraded their kernel, or users of Ubuntu 11.04 who have downgraded bcmwl to version 5.60.

If you have linux kernel 3.0 or later then this workaround will not be sufficient. Bug 830282 prevents bcmwl v5.60 from working on linux kernel >=v3.0.

Download and install the latest version of the bcmwl 5.60.* driver (from Ubuntu 10.10 updates):
i386: https://launchpad.net/ubuntu/+source/bcmwl/5.60.48.36+bdcom-0ubuntu5/+build/1781446
amd64: https://launchpad.net/ubuntu/+source/bcmwl/5.60.48.36+bdcom-0ubuntu5/+build/1781445

TEST CASE:

This is the test case for Ubuntu 10.04, which is still not fixed as of July 2011.

sudo apt-add-repository ppa:kernel-ppa/ppa && sudo apt-get update
sudo apt-get install linux-image-generic-lts-backport-natty linux-headers-generic-lts-backport-natty
sudo apt-get install bcmwl-kernel-source

You will get an error:

Error! Bad return status for module build on kernel: ...
Consult the make.log in the build directory ... for more information.
dpkg: error processing bcmwl-kernel-source (--configure):
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
 bcmwl-kernel-source
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now verify:

$ grep error /var/lib/dkms/bcmwl/*/build/make.log
/var/lib/dkms/bcmwl/5.60.48.36+bdcom/build/src/include/linuxver.h:23:28: error: linux/autoconf.h: No such file or directory

ORIGINAL BUG REPORT:

On 10.10 this error occurs when installing the 2.6.34-2 kernel

ProblemType: Package
DistroRelease: Ubuntu 10.10
Package: bcmwl-kernel-source 5.60.48.36+bdcom-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: wl
Architecture: amd64
Date: Fri May 14 17:39:32 2010
ErrorMessage: bcmwl kernel module failed to build
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
PackageVersion: 5.60.48.36+bdcom-0ubuntu3
SourcePackage: bcmwl
Title: package bcmwl-kernel-source 5.60.48.36+bdcom-0ubuntu3 failed to install/upgrade: bcmwl kernel module failed to build

Related branches

Revision history for this message
David Stansby (dstansby-deactivatedaccount) wrote :
Anders Kaseorg (andersk)
Changed in bcmwl (Ubuntu):
status: New → Confirmed
Anders Kaseorg (andersk)
summary: - bcmwl kernel module failed to build
+ bcmwl kernel module failed to build (error: linux/autoconf.h: No such
+ file or directory)
Revision history for this message
Anders Kaseorg (andersk) wrote :

This patch fixes building on kernel ≥ 2.6.33. I’ve uploaded the patched package to my PPA <https://launchpad.net/~anders-kaseorg/+archive/ppa>.

Revision history for this message
Benjamin Drung (bdrung) wrote :

uploaded, thanks. Please forward the patch to upstream.

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

This bug was fixed in the package bcmwl - 5.60.48.36+bdcom-0ubuntu4

---------------
bcmwl (5.60.48.36+bdcom-0ubuntu4) maverick; urgency=low

  * debian/patches/0003-autoconf.h.patch:
    - Do not #include <linux/autoconf.h> in kernels that include it
      automatically (2.6.15 or higher). This fixes building on 2.6.33
      which moved that file to <generated/autoconf.h>. (LP: #580594)
 -- Anders Kaseorg <email address hidden> Fri, 14 May 2010 21:23:45 -0400

Changed in bcmwl (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Anders Kaseorg (andersk) wrote :

Thanks. I forwarded the patch to <email address hidden>.

Revision history for this message
Thomas (t.c) wrote :

hi.. where I get the package for lucid?

On the follow site, I can only see the 0ubuntu4 on karmic:

http://packages.ubuntu.com/search?keywords=bcmwl&searchon=names&suite=all&section=all

Revision history for this message
Thomas (t.c) wrote :

hmm.. ok, the 0ubuntu4 in karmic is a older version....

But where we can the new version :-/

Revision history for this message
Jordan Bradley (jordan-w-bradley) wrote :

In Lucid there should be two driver packages, one is proprietary, one is free. Install the free one. You won't have a problem.

Revision history for this message
David Stansby (dstansby-deactivatedaccount) wrote :

This bug shouldn't be a problem in earlier versions of ubuntu that have earlier kernels that haven't moved linux/autoconf.h

Revision history for this message
Thomas (t.c) wrote :

yes true, but I want to test 2.6.34 mainline kernel.

Is there somewhere a finish source package which I can put in my ppa?

Revision history for this message
mrl586 (mrl586) wrote :

Reply to #8: There are few Broadcom cards which require proprietary driver.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Please do not use Launchpad bugs as a support forum. This bug tracker is for development work. If you have future questions, take them to https://answers.launchpad.net/ubuntu or http://ubuntuforums.org/ .

As you can see from comment #4, 5.60.48.36+bdcom-0ubuntu4 was uploaded to Maverick, not Lucid. If you need a fix for Lucid, see https://help.ubuntu.com/community/UbuntuBackports#request-new-packages .

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

This patch doesn't seem to have been applied to the source shipped in the bcmwl-kernel-source package, but only in the built sources, which are shipped as binary. I'm using version 5.60.48.36+bdcom-0ubuntu5
 and I had to apply the patch manually to build the source from /usr/src/5.60.48.36+bdcom. (Same problem as with bug 590924.)

Changed in bcmwl (Ubuntu):
importance: Undecided → Medium
status: Fix Released → Triaged
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Ah, now I see the patches are present, but not applied when you run 'make'. How are we supposed to build the package so that the patches are applied? Could we get a short README file in the source dir or in /usr/share/doc just to list the few commands we should run? :-p

Or are we suposed to use module-assistant and to build broadcom-sta? I don't understand why there are two packages for the same driver.

tags: added: patch
Revision history for this message
Anders Kaseorg (andersk) wrote :

Milan Bouchet-Valat: bcmwl-kernel-source is intended to be used with DKMS. The patch is shipped in /usr/src/bcmwl-5.60.48.36+bdcom/patches/0004-mclist.patch and applied at DKMS build time according to the instructions in /usr/src/bcmwl-5.60.48.36+bdcom/dkms.conf.

The module should be automatically built and installed for you via DKMS when you install the bcmwl-kernel-source package, or when you upgrade your kernel. Just make sure that you have the linux-headers-generic metapackage installed (assuming you’re running the generic kernel).

To rerun the DKMS installation process manually, run ‘sudo /usr/lib/dkms/dkms_autoinstaller start’.

Changed in bcmwl (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Yes, I understood I'm doing this is in a non-standard way, but I needed it to get the driver installed with a custom kernel from the kernel-mainline PPA, and I couldn't find instructions about how to do so. Maybe that's silly, but don't you think it would help to have a README file with your above comment in /usr/src/bcmwl-5.60.48.36+bdcom or /usr/share/bcmwl/? That's usually what happens for source packages.

Revision history for this message
Anders Kaseorg (andersk) wrote :

If you’re installing the kernel from the mainline PPA, you also need to install the kernel headers from the mainline PPA (linux-headers-VER_REL.all.deb and linux-headers-VER-generic_REL.ARCH.deb). Once you do that, DKMS will build and install the drivers for you. This should happen completely automatically (via a hook in /etc/kernel/header_postinst.d).

I don’t think it’s the bcmwl package’s job to document how to use DKMS (Ubuntu includes many module packages that use DKMS), but if you think the documentation for DKMS could be improved, feel free to open a separate bug against the dkms package.

Let’s try to keep the spam on this bug report to a minimum. If you need more help with your mainline PPA kernel, please try the Ubuntu forums <http://ubuntuforums.org/> or use Launchpad Answers <https://answers.launchpad.net/> instead. Thanks.

description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Still getting dozens of duplicates of this bug, as duplicates of bug 695191. Almost entirely from lucid users who have updated their kernels.

Somebody please nominate lucid to get the missing fix(es) from lp:ubuntu/maverick/bcmwl

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Users of natty/oneiric who are seeing this bug because you have manually installed an old bcmwl 5.60.*, your workaround should be to try the latest maverick version where this bug is fixed:
https://launchpad.net/ubuntu/maverick/+package/bcmwl-kernel-source

tags: added: testcase
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
lucid-dream (lucid-dream) wrote :

this was only tested on ubuntu 10.04 lucid amd64!

1. download this driver from http://packages.ubuntu.com/oneiric/bcmwl-kernel-source amd64/i386
2. sudo apt-get install linux-image-3.0.0-15-generic linux-headers-3.0.0-15
3. sudo dpkg -i /where/the /driver/is/*.deb
4. echo -e "blacklist bcma\nblacklist brcmsmac\nblacklist mac80211" | sudo tee -a /etc/modprobe.d/blacklist-bcm.conf
5. reboot and boot the new kernel 3.0.0-15
if the wl module will not load on boot
6. sudo modprobe wl
after installing the driver and successful builded for the new kernel 3.0.0-15
7. sudo apt-get purge linux-image-2.6.32-33-generic linux-headers-2.6.32-33

Revision history for this message
freakalad (freakalad) wrote :

Had to upgrade my 10.04 32-bit to kernel 3.0.x to resolve a power-management issue, but that broke wireless.

linux-headers* are not available on this platform (only up to 2.6.32-38 atm), so stock installation/compilation fails.

HP Mini 110-1052TU
Ubuntu 10.04.4 LTS
3.0.0-15-generic #26~lucid1-Ubuntu

The above hack (#20) seems to have done the trick - downloaded bcmwl-kernel-source_5.100.82.38+bdcom-0ubuntu4_i386.deb from the oneiric packages repo & installed manually.

All seems good now (not sure what the long-term stability, etc will be like)

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.