Bug 249378

Summary: [nfs] linker_load_file: /boot/kernel/nfslockd.ko - unsupported file type
Product: Base System Reporter: Thomas Zander <riggs>
Component: kernAssignee: Konstantin Belousov <kib>
Status: Closed FIXED    
Severity: Affects Many People CC: KOT, alex, kib, markj
Priority: ---    
Version: 12.1-STABLE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250921
Attachments:
Description Flags
Add missing module dependency
none
Add missing module dependency none

Description Thomas Zander freebsd_committer freebsd_triage 2020-09-16 22:24:57 UTC
Created attachment 218011 [details]
Add missing module dependency

In an up-to-date stable/12 kernel the nfslockd.ko can't be loaded due to a missing dependency on xdr:
Sep 16 23:32:18 marvin kernel: link_elf_obj: symbol xdr_free undefined
Sep 16 23:32:18 marvin kernel: linker_load_file: /boot/kernel/nfslockd.ko - unsupported file type
Sep 16 23:32:18 marvin kernel: KLD nfsd.ko: depends on nfslockd - not available or version mismatch
Sep 16 23:32:18 marvin kernel: linker_load_file: /boot/kernel/nfsd.ko - unsupported file type


The attached patch (found on the freebsd-current mailing list back in April) fixes the problem.
Comment 1 Dmitry Afanasiev 2020-09-17 09:33:42 UTC
After upgrade from 12-STABLE r363189 to r365632 I got same problem with module kgssapi too:
Sep 17 11:40:05 sunspot kernel: link_elf_obj: symbol xdr_free undefined
Sep 17 11:40:05 sunspot kernel: linker_load_file: /boot/kernel/kgssapi.ko - unsupported file type
Comment 2 Dmitry Afanasiev 2020-09-17 09:35:38 UTC
Created attachment 218020 [details]
Add missing module dependency

Added xdr dependency to sys/kgssapi/gss_impl.c and sys/nlm/nlm_prot_impl.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-09-17 22:27:52 UTC
A commit references this bug:

Author: kib
Date: Thu Sep 17 22:27:08 UTC 2020
New revision: 365862
URL: https://svnweb.freebsd.org/changeset/base/365862

Log:
  MFC r360219:
  Make nfslockd depend on xdr.

  PR:	249378

Changes:
_U  stable/12/
  stable/12/sys/nlm/nlm_prot_impl.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-09-17 22:29:56 UTC
A commit references this bug:

Author: kib
Date: Thu Sep 17 22:29:39 UTC 2020
New revision: 365863
URL: https://svnweb.freebsd.org/changeset/base/365863

Log:
  State kgssapi dependency on xdr.

  Submitted by:	Dmitry Afanasiev
  PR:	249378
  MFC after:	3 days

Changes:
  head/sys/kgssapi/gss_impl.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-09-20 09:48:02 UTC
A commit references this bug:

Author: kib
Date: Sun Sep 20 09:47:29 UTC 2020
New revision: 365924
URL: https://svnweb.freebsd.org/changeset/base/365924

Log:
  MFC r365863:
  State kgssapi dependency on xdr.

  PR:	249378

Changes:
_U  stable/12/
  stable/12/sys/kgssapi/gss_impl.c
Comment 6 Mark Johnston freebsd_committer freebsd_triage 2020-11-12 20:10:21 UTC
*** Bug 250921 has been marked as a duplicate of this bug. ***