oss4-dkms fails to build when CONFIG_USB/CFG80211 is disabled

Bug #2026347 reported by Roxana Nicolescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oss4 (Ubuntu)
In Progress
Undecided
Unassigned
Jammy
In Progress
Undecided
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
Mantic
In Progress
Undecided
Unassigned

Bug Description

SRU justification:

[Impact]

This is encountered on linux kernel derivatives with fewer configuration options enabled.
First time saw on jammy:linux-kvm-1029.

During build, it fails with the following error:

...
ERROR: modpost: "wiphy_free" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "cfg80211_unlink_bss" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "cfg80211_connect_done" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "usb_kill_urb" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "cfg80211_mgmt_tx_status" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "cfg80211_vendor_cmd_reply" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "ieee80211_freq_khz_to_channel" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "cfg80211_get_bss" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "usb_deregister" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
ERROR: modpost: "wiphy_unregister" [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/8812au.ko] undefined!
WARNING: modpost: suppressed 29 unresolved symbol warnings because there were too many)
make[2]: *** [scripts/Makefile.modpost:133: /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/Module.symvers'
make[1]: *** [Makefile:1821: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1029-kvm'
make: *** [Makefile:1457: modules] Error 2

because CONFIG_USB=n, CONFIG_CFG80211=n

[Fix]
Add a rule to build oss4 when CONFIG_USB=y/m and CONFIG_CFG80211=y/m.
BUILD_EXCLUSIVE_CONFIG should be used.

[Test Plan]
1.For lunar and mantic:
 Install a new version of linux-kvm
apt install oss4 will fail as described above.
After the fix, it will not be built at all.
2. In #2011551 the bug was solved for jammy, but BUILD_EXCLUISVE_KERNEL instead of BUILD_EXCLUSIVE_CONFIG was used instead.
For jammy it should not be built with both previous version and this version. Try with linux-kvm as well.

Once packages are in proposed, a new adt is triggered against proposed for mantic/lunar/jammy:linux-kvm.

[Where problems could occur]
Low possibility of new issues.

[Note]
This fix is not scalable in the sense that if configuration name changes, the module has to be changed as well.

Tags: patch
Revision history for this message
Roxana Nicolescu (roxanan) wrote :
Revision history for this message
Roxana Nicolescu (roxanan) wrote :
Revision history for this message
Roxana Nicolescu (roxanan) wrote :
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

Mantic, lunar and jammy fixes are attached.
Tested locally on kvm instances when possible (for jammy and lunar only) because kvm does not have these config options enabled.

Results:
1. lunar:linux-kvm-6.2.0-1029

$ dpkg -i oss4-dkms_4.2-build2020-1ubuntu2_amd64.deb
(Reading database ... 133994 files and directories currently installed.)
Preparing to unpack oss4-dkms_4.2-build2020-1ubuntu2_amd64.deb ...
Deleting module oss4-4.2-build2020 completely from the DKMS tree.
Unpacking oss4-dkms (4.2-build2020-1ubuntu2) over (4.2-build2020-1ubuntu2) ...
Setting up oss4-dkms (4.2-build2020-1ubuntu2) ...
Loading new oss4-4.2-build2020 DKMS files...
Building for 6.2.0-1009-kvm
Building initial module for 6.2.0-1009-kvm
Error! The /var/lib/dkms/oss4/4.2-build2020/6.2.0-1009-kvm/x86_64/dkms.conf for module oss4 includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Skipped.

2. jammy:linux-kvm-5.15.0-1038
$ dpkg -i oss4-dkms_4.2-build2010-5ubuntu9.3_amd64.deb
...
make -j1 KERNELRELEASE=5.15.0-1038-kvm -C /lib/modules/5.15.0-1038-kvm/build M=/var/lib/dkms/oss4/4.2-build2010/build/core modules && make -C /var/lib/dkms/oss4/4.2-build2010/build/drivers osscore_symbols.inc && make -C /lib/modules/5.15.0-1038-kvm/build M=/var/lib/dkms/oss4/4.2-build2010/build/drivers modules..............(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.0-1038-kvm (x86_64)
Consult /var/lib/dkms/oss4/4.2-build2010/build/make.log for more information.
Error! The /var/lib/dkms/rtl8821ce/5.5.2.1/5.15.0-1038-kvm/x86_64/dkms.conf for module rtl8821ce includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.

3. mantic:linux latest 6.4 kernel
Kvm is no longer a derivative for mantic, but tested this patch on the main linux to make sure it does not have a negative impact
dkms autoinstall on 6.4.0-1-generic/x86_64 succeeded for oss4
   ...done.

Changed in oss4 (Ubuntu Jammy):
status: New → In Progress
Changed in oss4 (Ubuntu Lunar):
status: New → In Progress
Changed in oss4 (Ubuntu Mantic):
status: New → In Progress
tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 23.04 (Lunar Lobster) has reached end of life, so this bug will not be fixed for that specific release.

Changed in oss4 (Ubuntu Lunar):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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