Re: Help cross-building kernel from macos

From: Andrew Turner <andrew_at_fubar.geek.nz>
Date: Fri, 10 Nov 2023 11:38:27 UTC
> On 8 Nov 2023, at 19:54, Colin S. Gordon <csgordon@fastmail.com> wrote:
...
> ===> lib/clang/libllvmminimal (obj,all,install)
> ===> usr.bin/clang/llvm-tblgen <http://usr.bin/clang/llvm-tblgen> (obj,all,install)
> bmake[3]: /Users/.../freebsd-obj/Users/.../freebsd-src/riscv.riscv64/tmp/obj-tools/usr.bin/clang/llvm-tblgen/.depend <http://usr.bin/clang/llvm-tblgen/.depend>, 1: ignoring stale .depend for /Users/.../freebsd-obj//Users/.../freebsd-src/riscv.riscv64/tmp/legacy/usr/lib/libz.a
> bmake[3]: /Users/.../freebsd-obj/Users/.../freebsd-src/riscv.riscv64/tmp/obj-tools/usr.bin/clang/llvm-tblgen/.depend <http://usr.bin/clang/llvm-tblgen/.depend>, 1: ignoring stale .depend for /usr/lib/libprivatezstd.a
> ld: warning: directory not found for option '-L/Users/.../freebsd-obj/Users/.../freebsd-src/riscv.riscv64/tmp/obj-tools/lib/libthr'
> ld: warning: directory not found for option '-L/Users/.../freebsd-obj/Users/.../freebsd-src/riscv.riscv64/tmp/obj-tools/lib/libz'
> ld: warning: directory not found for option '-L/Users/.../freebsd-obj/Users/.../freebsd-src/riscv.riscv64/tmp/obj-tools/lib/libthr'
> ld: library not found for -lprivatezstd
> clang: error: linker command failed with exit code 1 (use -v to see invocation)

This should be fixed in https://cgit.freebsd.org/src/commit/?id=83771b1914e182c6324839e05ff82ee6f4a87c98. The tblgen tools don’t need to link against libzstd or libz as they don’t use anything from these libraries.

Andrew