Bug 274910 - graphics/nvidia-drm-515-kmod depends on linuxkpi_gplv2, which was removed in drm-515-kmod-5.15.118
Summary: graphics/nvidia-drm-515-kmod depends on linuxkpi_gplv2, which was removed in ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-04 15:17 UTC by Trenton Schulz
Modified: 2023-11-07 09:06 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (ashafer)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trenton Schulz 2023-11-04 15:17:43 UTC
On FreeBSD 14-RC4, graphics/nvidia-drm-515-kmod builds, but it fails to load with the error message:

KLD nvidia-drm.ko: depends on linuxkpi_gplv2 - not available or version mismatch
linker_load_file: /boot/modules/nvidia-drm.ko - unsupported file type

linuxkpi_gplv2 was removed from the drm-515-kmod package with change 46b49a44fb98c4aa96b6cc259b13d54eb1a9a036

So, there probably needs some logic to use correct includes when building for drm-515.
Comment 1 Trenton Schulz 2023-11-04 16:45:31 UTC
Seems that if one removes the MODULE_DEPEND for linuxkpi_gplv2, things seem to load. So, it might be enough with version checking since gplv2 exits for 510 kmod.
Comment 2 iron.udjin 2023-11-05 16:08:02 UTC
I have the same issue with nvidia-drm-515-kmod on FreeBSD 14-STABLE. Is there any workaround for it?

I tried use linuxkpi_gplv2.ko from drm-510-kmod together with nvidia-drm-515-kmod but got kernel panic.
Comment 3 Austin Shafer 2023-11-06 20:00:52 UTC
Fix here, sorry for the breakage: https://reviews.freebsd.org/D42484
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-11-07 08:35:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a0e141da5b584e00c498947e596b957bd40db94

commit 0a0e141da5b584e00c498947e596b957bd40db94
Author:     Austin Shafer <ashafer@badland.io>
AuthorDate: 2023-11-07 08:26:48 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-11-07 08:35:19 +0000

    graphics/nvidia-drm-515-kmod: Remove dependency on linuxkpi_gplv2.ko

    This fixes a failure on module load for nvidia-drm.ko as a result of
    linuxkpi_gplv2.ko being removed from drm-kmod in 5.15. For now we just
    remove the dependency in the nvidia-drm 515 port to unbreak things, I'll
    create a longer-term upstream fix.

    PR: 274910

    Reviewed by: arrowd

    Differential Revision: https://reviews.freebsd.org/D42484

 graphics/nvidia-drm-515-kmod/Makefile                          |  2 +-
 .../files/patch-nvidia-drm-freebsd-lkpi.c (new)                | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)