When upgrading from FreeBSD 11.3 to FreeBDS 12.2 yesterday, I encountered this error when doing "make installkernel" make[2]: "/usr/src/sys/conf/kern.pre.mk" line 135: amd64/arm64/i386 kernel requires linker ifunc support To avoid the issue, I first updated to 12.1, then went to 12.2 This problem does not occur on 11.4
The check is: .if (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" || ${MACHINE} == "powerpc") && \ defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == "" .error amd64/arm64/i386/ppc* kernel requires linker ifunc support .endif I think adding `&& !make(install)` would solve this issue.
(In reply to Dan Langille from comment #0) I claimed: "This problem does not occur on 11.4" This is false. The problem also occurs on FreeBSD 11.4
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=581ade97d561e136dbb7cf7a413128c343a23199 commit 581ade97d561e136dbb7cf7a413128c343a23199 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2020-12-27 00:34:24 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2020-12-27 17:46:51 +0000 Perform kernel linker ifunc test only for builds dvl reported that "make installkernel" failed with "amd64/arm64/i386 kernel requires linker ifunc support." This test should apply to builds only; the linker is not used at install time. I think the same (ifunc-supporting) linker used to build the kernel should be detected at install time in usual cases (and so not trigger this error). However, there is no reason to disallow the install, if for some reason the expected linker isn't the one tested at install time. PR: 251580 Reported by: dvl MFC after: 2 weeks Sponsored by: The FreeBSD Foundation sys/conf/kern.pre.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
We applied that patch to our local copy of the 12.2 code (which exists on an NFS mount; that's how we upgrade). For those hitting this problem: you don't have to rebuild. Just patch that file and try the "make installkernel" again - that was just tested and it worked here.
Thank you for testing - MFC'd now
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=df592782db906594c7f7ee0bdb9ed502401cd532 commit df592782db906594c7f7ee0bdb9ed502401cd532 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2020-12-27 00:34:24 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2021-01-05 19:44:31 +0000 Perform kernel linker ifunc test only for builds dvl reported that "make installkernel" failed with "amd64/arm64/i386 kernel requires linker ifunc support." This test should apply to builds only; the linker is not used at install time. I think the same (ifunc-supporting) linker used to build the kernel should be detected at install time in usual cases (and so not trigger this error). However, there is no reason to disallow the install, if for some reason the expected linker isn't the one tested at install time. PR: 251580 Reported by: dvl Sponsored by: The FreeBSD Foundation (cherry picked from commit 581ade97d561e136dbb7cf7a413128c343a23199) sys/conf/kern.pre.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)