Comment 0 for bug 2011551

Revision history for this message
Roxana Nicolescu (roxanan) wrote : oss4-dkms fails to build when CONFIG_USB is disabled

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:

...
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 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.