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

Bug #2011551 reported by Roxana Nicolescu
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oss4 (Ubuntu)
New
Undecided
Unassigned
Jammy
Fix Committed
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-dkms when CONFIG_USB=y/m

[Test Plan]
Install a new version of jammy:linux-kvm (1029 for example).
apt install oss4 will fail as described above.
After the fix, it will not built at all.

Once the package is in proposed, a new adt is triggered against proposed for 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.

because CONFIG_USB=n.

[Fix]
Add a rule to build oss4 when CONFIG_USB=y/m

[Test Plan]
Install a new version of jammy:linux-kvm (1029 for example).
apt install oss4 will fail as described above.
After the fix, it will not built at all.

Once the package is in proposed, a new adt is triggered against proposed for 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.

Revision history for this message
Roxana Nicolescu (roxanan) wrote (last edit ):

Attached the debdiff

Test results:
dpkg -i oss4-dkms_4.2-build2010-5ubuntu9.2_amd64.deb
Selecting previously unselected package oss4-dkms.
(Reading database ... 141776 files and directories currently installed.)
Preparing to unpack oss4-dkms_4.2-build2010-5ubuntu9.2_amd64.deb ...
Unpacking oss4-dkms (4.2-build2010-5ubuntu9.2) ...
Setting up oss4-dkms (4.2-build2010-5ubuntu9.2) ...
Loading new oss4-4.2-build2010 DKMS files...
Building for 5.15.0-1029-kvm
Building initial module for 5.15.0-1029-kvm
Error! The /var/lib/dkms/oss4/4.2-build2010/5.15.0-1029-kvm/x86_64/dkms.conf for module oss4 includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.
Skipped.

tags: added: sru-20230227
description: updated
summary: - oss4-dkms fails to build when CONFIG_USB is disabled
+ oss4-dkms fails to build when CONFIG_USB/CFG80211 is disabled
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

Debdiff

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Roxana, or anyone else affected,

Accepted oss4 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/oss4/4.2-build2010-5ubuntu9.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in oss4 (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

tested locally with jammy-kvm: 5.15.0-1033-kvm

ubuntu@jammy-kvm:~$ sudo apt install oss4-dkms/jammy-proposed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '4.2-build2010-5ubuntu9.2' (Ubuntu:22.04/jammy-proposed [amd64]) for 'oss4-dkms'
The following NEW packages will be installed:
  oss4-dkms
0 upgraded, 1 newly installed, 0 to remove and 119 not upgraded.
Need to get 708 kB of archives.
After this operation, 4920 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 oss4-dkms amd64 4.2-build2010-5ubuntu9.2 [708 kB]
Fetched 708 kB in 0s (2481 kB/s)
Selecting previously unselected package oss4-dkms.
(Reading database ... 222921 files and directories currently installed.)
Preparing to unpack .../oss4-dkms_4.2-build2010-5ubuntu9.2_amd64.deb ...
Unpacking oss4-dkms (4.2-build2010-5ubuntu9.2) ...
Setting up oss4-dkms (4.2-build2010-5ubuntu9.2) ...
Loading new oss4-4.2-build2010 DKMS files...
Building for 5.15.0-1033-kvm
Building initial module for 5.15.0-1033-kvm
Error! The /var/lib/dkms/oss4/4.2-build2010/5.15.0-1033-kvm/x86_64/dkms.conf for module oss4 includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
The /var/lib/dkms/oss4/4.2-build2010/5.15.0-1033-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.

And neutral result for autopkgtest
https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/amd64/o/oss4/20230511_085135_094f3@/log.gz

tags: added: verification-done-jammy
removed: verification-needed-jammy
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

Hi Roxana,

I don't see this fix in kinetic nor lunar, and the main task of this bug is still in the "new" state, hinting that indeed later ubuntu releases did not get the fix.

If that's the case, could you please also upload a fix for kinetic and lunar, or elaborate on why those releases are not affected?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hi Roxana, any update on the requested info from my previous comment?

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

Hi. Apologize for my late reply. Indeed, this should have been done for kinetic and lunar as well.
Kinetic is reaching EOL so no need for that, I will upload a fix for lunar and mantic.
In the meantime, I also realized this rule is not 100% correct even though the result is what I want, and I should have used the BUILD_EXCLUSIVE_CONFIG rule instead. I think it makes sense to create another ticket for this.

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

New bug https://bugs.launchpad.net/ubuntu/+source/oss4/+bug/2026347.
I will try to work on it early next week.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

> In the meantime, I also realized this rule is not 100% correct even though the result is what I want, and
> I should have used the BUILD_EXCLUSIVE_CONFIG rule instead. I think it makes sense to create another
> ticket for this.

Should this bug here be abandoned then in favor of https://bugs.launchpad.net/ubuntu/+source/oss4/+bug/2026347 ?

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

Yes, debdiffs are included in #2026347

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

Not sure which status I should use here to explicitly say this is dropped

Revision history for this message
Robie Basak (racb) wrote :

verification-failed-jammy is probably the closest and will stop this looking like it is ready.

tags: added: verification-failed verification-failed-jammy
removed: verification-done-jammy verification-needed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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