Bug 262336

Summary: kernel linking error after adding device smbios
Product: Base System Reporter: jakub_lach
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: dab, mi, rpokala, vivek
Priority: ---    
Version: 13.0-STABLE   
Hardware: Any   
OS: Any   

Description jakub_lach 2022-03-04 10:22:19 UTC
After adding device          smbios to kernel (which I believe is mandatory for now for noUEFI system (?) I get 

--- kernel ---
linking kernel
ld: error: undefined symbol: efi_get_table
>>> referenced by smbios.c
>>>               smbios.o:(smbios_identify)
*** [kernel] Error code 1
Comment 1 jakub_lach 2022-03-04 15:33:02 UTC
That is, option is dependent on

options         EFIRT                   # EFI Runtime Services support
Comment 2 Mikhail Teterin freebsd_committer freebsd_triage 2022-03-21 02:36:22 UTC
The ipmi(4) is broken by this too :( The problem is due to the commit 4cfd4d54822bae9794558c988bb59ca9039e9feb (cherry-picked from commit a29bff7a5216bd5f4a76228788e7eacf235004de).

The simplest temporary work-around is to remove the line `#define ARCH_MAY_USE_EFI` in `sys/amd64/include/efi.h` (or `sys/arm64/include/efi.h` -- the i386 is not affected for some reason). Or -- change the `#define` to `#undef`...