Building -CURRENT (2023-07-17 be4c7f273508) without system compiler (with 
LLVM16 from ports) results in unbootable system:Preloaded elf kernel 
"/boot/kernel/kernel" at 0xffffffff82328000.
Preloaded elf obj module "/boot/kernel/zfs.ko" at 0xffffffff82329090.
Preloaded boot_entropy_cache "/boot/entropy" at 0xffffffff823298f8.
Preloaded elf obj module "/boot/kernel/cryptodev.ko" at 0xffffffff82329950.
Preloaded hostuuid "/etc/hostid" at 0xffffffff8232a140.
kldload: unexpected relocation type 42, symbol index 8662
link_elf_obj: symbol __stack_chk_guard undefined
KLD file zfs.ko - could not finalize loading

Patching and rebuilding LLVM16 with this patch results in bootable system:

Patch was taken from:
https://cgit.freebsd.org/src/commit/?h=stable/13&id=e8e5d75e6a9676e76c3bfd6d1d52561ffbb40846

Few months ago it was possible to use LLVM from ports to build kernel and 
world, but I don't remember the details.
This patch was tested in bhyve VM and on real hardware.

On real hardware it was possible to boot system without patched compiler when 
zfs.ko (options ZFS and GEOM_ELI with devices crypto and cryptodev) is built 
into the kernel.
But then other modules (acpi_ibm, iic, drm, i915kms, acpi_video, ... pf, 
various ng_* and so on) will fail to load with same reason.
Didn't try including zfs.ko into the kernel in the VM.

Bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272740



Reply via email to