ivsc-driver module should not try to build when CONFIG_GPIOLIB_IRQCHIP is disabled

Bug #2012410 reported by Roxana Nicolescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ivsc-driver (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned
Kinetic
Won't Fix
Undecided
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
Mantic
Fix Released
Undecided
Unassigned

Bug Description

SRU justification:

[Impact]

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

During build, it fails with the following error:
...
Building module:
cleaning build area...
make -j1 KERNELRELEASE=5.15.0-1030-kvm KERNELRELEASE=5.15.0-1030-kvm KERNEL_SRC=/lib/modules/5.15.0-1030-kvm/build......(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.0-1030-kvm (x86_64)
Consult /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/make.log for more information.
E: ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1 failed to build for 5.15.0-1030-kvm
========== /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/make.log ==========
DKMS make.log for ivsc-driver-0~git202211241536.70d95269-0ubuntu0.22.04.1 for kernel 5.15.0-1030-kvm (x86_64)
Wed Mar 8 23:41:46 UTC 2023
make -C /lib/modules/5.15.0-1030-kvm/build M=/var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-1030-kvm'
  CC [M] /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/mfd/ljca.o
  LD [M] /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/ljca.o
  CC [M] /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/spi/spi-ljca.o
  LD [M] /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/spi-ljca.o
  CC [M] /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/gpio/gpio-ljca.o
/var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/gpio/gpio-ljca.c: In function ‘ljca_gpio_event_cb’:
/var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/gpio/gpio-ljca.c:268:53: error: ‘struct gpio_chip’ has no member named ‘irq’
  268 | irq = irq_find_mapping(ljca_gpio->gc.irq.domain,
      | ^
/var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/gpio/gpio-ljca.c: In function ‘ljca_gpio_probe’:
/var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/gpio/gpio-ljca.c:441:30: error: ‘struct gpio_chip’ has no member named ‘irq’
  441 | girq = &ljca_gpio->gc.irq;
      | ^
make[2]: *** [scripts/Makefile.build:297: /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/drivers/gpio/gpio-ljca.o] Error 1
make[1]: *** [Makefile:1906: /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1030-kvm'
make: *** [Makefile:43: all] Error 2
====================
./ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.1/build/make.log
autopkgtest [23:42:00]: test dkms-autopkgtest: -----------------------]
autopkgtest [23:42:00]: test dkms-autopkgtest: - - - - - - - - - - results - - - - - - - - - -
dkms-autopkgtest FAIL non-zero exit status 1
autopkgtest [23:42:00]: @@@@@@@@@@@@@@@@@@@@ summary
dkms-autopkgtest FAIL non-zero exit status 1
====================
./ipu6-drivers/0~git202211220708.278b7e3d-0ubuntu0.22.04.1/build/make.log
autopkgtest [23:42:45]: test dkms-autopkgtest: -----------------------]
autopkgtest [23:42:46]: test dkms-autopkgtest: - - - - - - - - - - results - - - - - - - - - -
dkms-autopkgtest FAIL non-zero exit status 1
autopkgtest [23:42:46]: @@@@@@@@@@@@@@@@@@@@ summary

because CONFIG_GPIOLIB_IRQCHIP=n

[Fix]
Add a rule to avoid building ivsc-driver when CONFIG_GPIOLIB_IRQCHIP=n

[Test Plan]
Install a new version of jammy:linux-kvm (1029 for example).
apt install ivsc-driver will fail as described above.
After the fix, it will not be 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: added: sru-20230227
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

Proposed fix is attached

Tested on linux-kvm-1029
ubuntu@jammy-kvm:~/ivsc-driver$ sudo dpkg -i intel-vsc-dkms_0~git202211241536.70d95269-0ubuntu0.22.04.2_amd64.deb
Selecting previously unselected package intel-vsc-dkms.
(Reading database ... 142281 files and directories currently installed.)
Preparing to unpack intel-vsc-dkms_0~git202211241536.70d95269-0ubuntu0.22.04.2_amd64.deb ...
Unpacking intel-vsc-dkms (0~git202211241536.70d95269-0ubuntu0.22.04.2) ...
Setting up intel-vsc-dkms (0~git202211241536.70d95269-0ubuntu0.22.04.2) ...
Loading new ivsc-driver-0~git202211241536.70d95269-0ubuntu0.22.04.2 DKMS files...
Building for 5.15.0-1029-kvm
Building initial module for 5.15.0-1029-kvm
Error! The /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.04.2/5.15.0-1029-kvm/x86_64/dkms.conf for module ivsc-driver includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch.
This indicates that it should not be built.
Skipped.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ivsc.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

YAAAAAS!

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

This is needed for kinetic too. Debdiff is attached.
Tested on a local VM:
ubuntu@kinetic:~/ivsc-drivers$ sudo dpkg -i intel-vsc-dkms_0~git202211241536.70d95269-0ubuntu0.22.10.2_amd64.deb
Selecting previously unselected package intel-vsc-dkms.
(Reading database ... 136024 files and directories currently installed.)
Preparing to unpack intel-vsc-dkms_0~git202211241536.70d95269-0ubuntu0.22.10.2_amd64.deb ...
Unpacking intel-vsc-dkms (0~git202211241536.70d95269-0ubuntu0.22.10.2) ...
Setting up intel-vsc-dkms (0~git202211241536.70d95269-0ubuntu0.22.10.2) ...
Loading new ivsc-driver-0~git202211241536.70d95269-0ubuntu0.22.10.2 DKMS files...
Building for 5.19.0-1021-kvm
Building initial module for 5.19.0-1021-kvm
Error! The /var/lib/dkms/ivsc-driver/0~git202211241536.70d95269-0ubuntu0.22.10.2/5.19.0-1021-kvm/x86_64/dkms.conf for module ivsc-driver includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Why do we need to install this against kvm kernel? There is never the corresponding hardware in a virtual machine.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Since this package is for a specific hardware, it's clearly that this test is not suitable to run on KVM kernels.

We should probably skip it.

Revision history for this message
You-Sheng Yang (vicamo) wrote :
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Patches in comment #1 and #4 wrongly put BUILD_EXCLUSIVE_CONFIG as BUILD_EXCLUSIVE_KERNEL. I'm marking this as WONTFIX then.

Changed in ivsc-driver (Ubuntu):
status: New → Won't Fix
Changed in ivsc-driver (Ubuntu Jammy):
status: New → Won't Fix
Changed in ivsc-driver (Ubuntu Kinetic):
status: New → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ivsc-driver - 0~git202212210258.94ecb88b-0ubuntu0.23.04.1

---------------
ivsc-driver (0~git202212210258.94ecb88b-0ubuntu0.23.04.1) mantic; urgency=low

  [ You-Sheng Yang ]
  * New upstream release 20230208_1038. (LP: #2007368)
    - drop patches applied in upstream

  [ Ye Xiang ]
  * add support for MTL board

  [ Roxana Nicolescu ]
  * Add build exclusive rule. (LP: #2012410)

 -- You-Sheng Yang <email address hidden> Mon, 01 May 2023 22:12:57 +0800

Changed in ivsc-driver (Ubuntu):
status: Won't Fix → Fix Released
Changed in ivsc-driver (Ubuntu):
status: Fix Released → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ivsc-driver - 0~git202212210258.94ecb88b-0ubuntu0.23.10.1

---------------
ivsc-driver (0~git202212210258.94ecb88b-0ubuntu0.23.10.1) mantic; urgency=low

  * Fix build exclusive rule
    (s/BUILD_EXCLUSIVE_KERNEL/BUILD_EXCLUSIVE_CONFIG/). LP: #2012410

 -- Paolo Pisati <email address hidden> Thu, 08 Jun 2023 08:38:23 +0000

Changed in ivsc-driver (Ubuntu):
status: New → Fix Released
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/2012612 is done. new dkms version is in proposed.
So Jammy is unblocked.
This is also needed for kinetic and lunar. kinetic won't be fixed because it's going to be dropped very soon, but it is necessary for lunar.
Reminder for lunar: in kernel-version, this was removed from lunar:main and it affects derivatives. When this is fixed, that can reverted.
It seems it was fixed for mantic

Changed in ivsc-driver (Ubuntu):
status: Fix Released → Confirmed
Changed in ivsc-driver (Ubuntu Mantic):
status: Confirmed → Fix Released
Changed in ivsc-driver (Ubuntu Jammy):
status: Won't Fix → Confirmed
Changed in ivsc-driver (Ubuntu Lunar):
status: New → Confirmed
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 ivsc-driver (Ubuntu Lunar):
status: Confirmed → 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.