Public bug reported:

broadcom-sta fails to compile for 6.7.0-14-generic.

Environment info:

```
$ hostnamectl
Operating System: Ubuntu 24.04.4 LTS              
          Kernel: Linux 6.14.0-37-generic
    Architecture: x86-64
 Hardware Vendor: Apple Inc.
  Hardware Model: MacBookPro11,2
```

The command that fails:

```
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up linux-image-6.17.0-14-generic (6.17.0-14.14~24.04.1) ...
Setting up linux-headers-6.17.0-14-generic (6.17.0-14.14~24.04.1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.17.0-14-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
make -j8 KERNELRELEASE=6.17.0-14-generic KVER=6.17.0-14-generic...(bad exit 
status: 2)
ERROR: Cannot create report: [Errno 17] File exists: 
'/var/crash/broadcom-sta-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more 
information.
dkms autoinstall on 6.17.0-14-generic/x86_64 failed for broadcom-sta(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.17.0-14-generic
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.17.0-14-generic (--configure):
 installed linux-headers-6.17.0-14-generic package post-installation script 
subprocess returned error exit status 11
dpkg: dependency problems prevent configuration of 
linux-headers-generic-hwe-24.04:
 linux-headers-generic-hwe-24.04 depends on linux-headers-6.17.0-14-generic; 
however:
  Package linux-headers-6.17.0-14-generic is not configured yet.

dpkg: error processing package linux-headers-generic-hwe-24.04 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-24.04:
 linux-generic-hwe-24.04 depends on linux-headers-generic-hwe-24.04 (= 
6.17.0-14.14~24.04.1); however:
  Package linux-headers-generic-hwe-24.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-24.04 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup 
error from a previous failure.
                                                                                
                          No apport report written becau
se the error message indicates its a followup error from a previous failure.
                                                                            
Processing triggers for linux-image-6.17.0-14-generic (6.17.
0-14.14~24.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.17.0-14-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
make -j8 KERNELRELEASE=6.17.0-14-generic KVER=6.17.0-14-generic...(bad exit 
status: 2)
ERROR: Cannot create report: [Errno 17] File exists: 
'/var/crash/broadcom-sta-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more 
information.
dkms autoinstall on 6.17.0-14-generic/x86_64 failed for broadcom-sta(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.17.0-14-generic
   ...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.17.0-14-generic (--configure):
 installed linux-image-6.17.0-14-generic package post-installation script 
subprocess returned error exit status 11
No apport report written because MaxReports is reached already
                                                              Errors were 
encountered while processing:
 linux-headers-6.17.0-14-generic
 linux-headers-generic-hwe-24.04
 linux-generic-hwe-24.04
 linux-image-6.17.0-14-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

make.log says:

```
/var/lib/dkms/broadcom-sta/6.30.223.271/build$ cat make.log 
DKMS make.log for broadcom-sta-6.30.223.271 for kernel 6.17.0-14-generic 
(x86_64)
Sun Feb 15 10:09:06 PM EST 2026
CFG80211 API is prefered for this kernel version
Makefile:91: Neither CFG80211 nor Wireless Extension is enabled in kernel
KBUILD_NOPEDANTIC=1 make -C /lib/modules/6.17.0-14-generic/build M=`pwd`
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make 
rule.
make[1]: Entering directory '/usr/src/linux-headers-6.17.0-14-generic'
make[2]: Entering directory '/var/lib/dkms/broadcom-sta/6.30.223.271/build'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 
13.3.0-6ubuntu2~24.04) 13.3.0
  You are using:           gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
  CC [M]  src/shared/linux_osl.o
src/shared/linux_osl.c:23:10: fatal error: typedefs.h: No such file or directory
   23 | #include <typedefs.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[4]: *** 
[/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: 
src/shared/linux_osl.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:2016: .] Error 2
make[2]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:248: 
__sub-make] Error 2
make[2]: Leaving directory '/var/lib/dkms/broadcom-sta/6.30.223.271/build'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.17.0-14-generic'
make: *** [Makefile:183: all] Error 2
```

... but typedefs.h is there:

```
$ pwd
/var/lib/dkms/broadcom-sta/6.30.223.271/build
$ ls -l src/include/typedefs.h 
-rw-r--r-- 1 root root 3955 Oct  4  2015 src/include/typedefs.h
```

If I try to build it, make fails:

```
/var/lib/dkms/broadcom-sta/6.30.223.271/build# KBUILD_NOPEDANTIC=1 make -C 
/lib/modules/6.17.0-14-generic/build M=`pwd` V=1
make: Entering directory '/usr/src/linux-headers-6.17.0-14-generic'
make  -C /var/lib/dkms/broadcom-sta/6.30.223.271/build \
-f /usr/src/linux-headers-6.17.0-14-generic/Makefile 
make[1]: Entering directory '/var/lib/dkms/broadcom-sta/6.30.223.271/build'
make --no-print-directory -C /var/lib/dkms/broadcom-sta/6.30.223.271/build \
-f /usr/src/linux-headers-6.17.0-14-generic/Makefile 
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 
13.3.0-6ubuntu2~24.04) 13.3.0
  You are using:           gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
make -f /usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build obj=. 
need-builtin=1 need-modorder=1 
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
# CC [M]  src/shared/linux_osl.o
  gcc-13 -Wp,-MMD,src/shared/.linux_osl.o.d -nostdinc 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include/generated 
-I/usr/src/linux-headers-6.17.0-14-generic/include 
-I/usr/src/linux-headers-6.17.0-14-generic/include 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include/uapi 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include/generated/uapi 
-I/usr/src/linux-headers-6.17.0-14-generic/include/uapi 
-I/usr/src/linux-headers-6.17.0-14-generic/include/generated/uapi -include 
/usr/src/linux-headers-6.17.0-14-generic/include/linux/compiler-version.h 
-include /usr/src/linux-headers-6.17.0-14-generic/include/linux/kconfig.h 
-I/usr/src/linux-headers-6.17.0-14-generic/ubuntu/include -include 
/usr/src/linux-headers-6.17.0-14-generic/include/linux/compiler_types.h 
-D__KERNEL__ -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE 
-fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a 
-fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 
-mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=x86-64 
-mtune=generic -mno-red-zone -mcmodel=kernel -mstack-protector-guard-reg=gs 
-mstack-protector-guard-symbol=__ref_stack_chk_guard -Wno-sign-compare 
-fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern 
-mindirect-branch-register -mindirect-branch-cs-prefix 
-mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all 
-fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 
-fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -ftrivial-auto-var-init=zero 
-fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -mrecord-mcount 
-mfentry -DCC_USING_FENTRY -falign-functions=16 -fstrict-flex-arrays=3 
-fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen 
-Wall -Wextra -Wundef -Werror=implicit-function-declaration 
-Werror=implicit-int -Werror=return-type -Werror=strict-prototypes 
-Wno-format-security -Wno-trigraphs -Wno-frame-address 
-Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes 
-Wframe-larger-than=1024 -Wno-main -Wno-dangling-pointer -Wvla-larger-than=1 
-Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-stringop-overflow 
-Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time 
-Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion 
-Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable 
-Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation 
-Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers 
-Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized 
-Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5  -fsanitize=bounds-strict 
-fsanitize=shift -fsanitize=bool -fsanitize=enum    -DMODULE  
-DKBUILD_BASENAME='"linux_osl"' -DKBUILD_MODNAME='"wl"' 
-D__KBUILD_MODNAME=kmod_wl -c -o src/shared/linux_osl.o src/shared/linux_osl.c  
 ; /usr/src/linux-headers-6.17.0-14-generic/tools/objtool/objtool 
--hacks=jump_label --hacks=noinstr --hacks=skylake --retpoline --rethunk --sls 
--stackval --static-call --uaccess --prefix=16 --Werror   --module 
src/shared/linux_osl.o
src/shared/linux_osl.c:23:10: fatal error: typedefs.h: No such file or directory
   23 | #include <typedefs.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** 
[/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: 
src/shared/linux_osl.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:2016: .] Error 2
make[1]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:248: 
__sub-make] Error 2
make[1]: Leaving directory '/var/lib/dkms/broadcom-sta/6.30.223.271/build'
make: *** [Makefile:248: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.17.0-14-generic'
```

If I add "-I./src/include" to the gcc command line, the module compiles.

```
# gcc-13 -Wp,-MMD,src/shared/.linux_osl.o.d -nostdinc 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include/generated 
-I/usr/src/linux-headers-6.17.0-14-generic/include 
-I/usr/src/linux-headers-6.17.0-14-generic/include 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include/uapi 
-I/usr/src/linux-headers-6.17.0-14-generic/arch/x86/include/generated/uapi 
-I/usr/src/linux-headers-6.17.0-14-generic/include/uapi 
-I/usr/src/linux-headers-6.17.0-14-generic/include/generated/uapi -include 
/usr/src/linux-headers-6.17.0-14-generic/include/linux/compiler-version.h 
-include /usr/src/linux-headers-6.17.0-14-generic/include/linux/kconfig.h 
-I/usr/src/linux-headers-6.17.0-14-generic/ubuntu/include -include 
/usr/src/linux-headers-6.17.0-14-generic/include/linux/compiler_types.h 
-I./src/include -D__KERNEL__ -std=gnu11 -fshort-wchar -funsigned-char 
-fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 
-mno-3dnow -mno-avx -mno-sse4a -fcf-protection=none -m64 -falign-jumps=1 
-falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 
-mskip-rax-setup -march=x86-64 -mtune=generic -mno-red-zone -mcmodel=kernel 
-mstack-protector-guard-reg=gs 
-mstack-protector-guard-symbol=__ref_stack_chk_guard -Wno-sign-compare 
-fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern 
-mindirect-branch-register -mindirect-branch-cs-prefix 
-mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all 
-fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 
-fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -ftrivial-auto-var-init=zero 
-fno-stack-clash-protection -fzero-call-used-regs=used-gpr -pg -mrecord-mcount 
-mfentry -DCC_USING_FENTRY -falign-functions=16 -fstrict-flex-arrays=3 
-fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen 
-Wall -Wextra -Wundef -Werror=implicit-function-declaration 
-Werror=implicit-int -Werror=return-type -Werror=strict-prototypes 
-Wno-format-security -Wno-trigraphs -Wno-frame-address 
-Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes 
-Wframe-larger-than=1024 -Wno-main -Wno-dangling-pointer -Wvla-larger-than=1 
-Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -Wno-stringop-overflow 
-Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time 
-Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion 
-Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable 
-Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation 
-Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers 
-Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized 
-Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5  -fsanitize=bounds-strict 
-fsanitize=shift -fsanitize=bool -fsanitize=enum    -DMODULE  
-DKBUILD_BASENAME='"linux_osl"' -DKBUILD_MODNAME='"wl"' 
-D__KBUILD_MODNAME=kmod_wl -c -o src/shared/linux_osl.o src/shared/linux_osl.c  
 ; /usr/src/linux-headers-6.17.0-14-generic/tools/objtool/objtool 
--hacks=jump_label --hacks=noinstr --hacks=skylake --retpoline --rethunk --sls 
--stackval --static-call --uaccess --prefix=16 --Werror   --module 
src/shared/linux_osl.o

# echo $?
0
```

I see the following line in Makefile:

```
EXTRA_CFLAGS       += -I$(src)/src/include -I$(src)/src/common/include
```

But the EXTRA_CFLAGS don't seem to make it to the compiler command line
options:

I hope this helps.

Thank you,

Cat.

ProblemType: Package
DistroRelease: Ubuntu 24.04
Package: broadcom-sta-dkms 6.30.223.271-23ubuntu1.1
ProcVersionSignature: Ubuntu 6.14.0-37.37~24.04.1-generic 6.14.11
Uname: Linux 6.14.0-37-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.28.1-0ubuntu3.8
Architecture: amd64
CasperMD5CheckResult: pass
DKMSKernelVersion: 6.17.0-14-generic
Date: Sun Feb 15 21:07:07 2026
InstallationDate: Installed on 2025-10-28 (110 days ago)
InstallationMedia: Ubuntu 24.04.3 LTS "Noble Numbat" - Release amd64 
(20250805.1)
PackageArchitecture: all
PackageVersion: 6.30.223.271-23ubuntu1.1
Python3Details: /usr/bin/python3.12, Python 3.12.3, python3-minimal, 
3.12.3-0ubuntu2.1
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.22.6ubuntu6.5
 apt  2.8.3
SourcePackage: broadcom-sta
Title: broadcom-sta-dkms 6.30.223.271-23ubuntu1.1: broadcom-sta kernel module 
failed to build
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: broadcom-sta (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-package noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2141901

Title:
  broadcom-sta-dkms 6.30.223.271-23ubuntu1.1: broadcom-sta kernel module
  failed to build

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/broadcom-sta/+bug/2141901/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to