digimend-dkms fails to build when CONFIG_USB is not enabled

Bug #2011546 reported by Roxana Nicolescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
digimend-dkms (Ubuntu)
New
Undecided
Unassigned
Jammy
New
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:

DKMS make.log for digimend-10 for kernel 5.15.0-1029-kvm (x86_64)
Tue Mar 14 09:00:31 UTC 2023
make -C /lib/modules/5.15.0-1029-kvm/build M=/var/lib/dkms/digimend/10/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-1029-kvm'
  CC [M] /var/lib/dkms/digimend/10/build/hid-kye.o
  CC [M] /var/lib/dkms/digimend/10/build/hid-uclogic-core.o
  CC [M] /var/lib/dkms/digimend/10/build/hid-uclogic-rdesc.o
  CC [M] /var/lib/dkms/digimend/10/build/hid-uclogic-params.o
/var/lib/dkms/digimend/10/build/hid-uclogic-params.c: In function ‘uclogic_params_init’:
/var/lib/dkms/digimend/10/build/hid-uclogic-params.c:1147:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1147 | if (bNumInterfaces != 3) {
      | ^
/var/lib/dkms/digimend/10/build/hid-uclogic-params.c:1165:9: note: here
 1165 | case VID_PID(USB_VENDOR_ID_HUION,
      | ^~~~
  LD [M] /var/lib/dkms/digimend/10/build/hid-uclogic.o
  CC [M] /var/lib/dkms/digimend/10/build/hid-polostar.o
  CC [M] /var/lib/dkms/digimend/10/build/hid-viewsonic.o
  MODPOST /var/lib/dkms/digimend/10/build/Module.symvers
ERROR: modpost: "usb_string" [/var/lib/dkms/digimend/10/build/hid-uclogic.ko] undefined!
ERROR: modpost: "usb_control_msg" [/var/lib/dkms/digimend/10/build/hid-uclogic.ko] undefined!
ERROR: modpost: "usb_hid_driver" [/var/lib/dkms/digimend/10/build/hid-uclogic.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:133: /var/lib/dkms/digimend/10/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/digimend/10/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:25: modules] Error 2

because CONFIG_USB=n.

[Fix]
Add a rule to build digimend-dkms when CONFIG_USB=y/m

[Test Plan]
Install a new version of jammy:linux-kvm (1029 for example).
apt install digimend-dkms 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.

Tags: sru-20230227
tags: added: sru-20230227
Revision history for this message
Roxana Nicolescu (roxanan) wrote (last edit ):

Attached the debdiff. Not sure about the version, I am happy to adjust it accordingly.

Test results:
dpkg -i digimend-dkms_10-4ubuntu1_all.deb

Building initial module for 5.15.0-1029-kvm
Error! The /var/lib/dkms/digimend/10/5.15.0-1029-kvm/x86_64/dkms.conf for module digimend includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.
Skipped.

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.