| Summary: | Buildworld fails caused by kbdcontrol | ||
|---|---|---|---|
| Product: | Base System | Reporter: | epopen |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | New --- | ||
| Severity: | Affects Only Me | CC: | evgenii, vsasjason |
| Priority: | --- | ||
| Version: | 13.2-RELEASE | ||
| Hardware: | amd64 | ||
| OS: | Any | ||
|
Description
epopen
2023-04-13 05:48:39 UTC
I'm hacked to build kbdcontrol force as follows
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index 725d62a7bfe6..1aad23c637fe 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -38,7 +38,8 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
-#include <sys/kbio.h>
+#include "kbio.h"
#include <sys/consio.h>
#include <sys/queue.h>
#include <sys/sysctl.h>
And
# ln -s /usr/src/sys/sys/kbio.h /usr/src/usr.sbin/kbdcontrol
Result: Build pass, installworld and new system work fine.
Same issue here: $ time make -C /usr/src/ -sj2 buildworld buildkernel make[1] warning: /usr/src/: Permission denied. make[1]: "/usr/src/Makefile.inc1" line 340: SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. make[1]: "/usr/src/Makefile.inc1" line 345: SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. -------------------------------------------------------------- >>> World build started on Sun May 21 13:07:33 EEST 2023 -------------------------------------------------------------- -------------------------------------------------------------- >>> Rebuilding the temporary build tree -------------------------------------------------------------- Linking host tools into /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin -------------------------------------------------------------- >>> stage 1.1: legacy release compatibility shims -------------------------------------------------------------- ===> tools/build (obj,includes,all,install) -------------------------------------------------------------- >>> stage 1.2: bootstrap tools -------------------------------------------------------------- ===> lib/clang/libllvmminimal (obj,all,install) ===> usr.bin/dtc (obj,all,install) make[3]: "/usr/src/lib/clang/llvm.pre.mk" line 8: warning: "which llvm-tblgen" returned non-zero status ===> usr.sbin/kbdcontrol (obj,all,install) /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:822:37: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? to_old_accentmap(accentmap_t *from, oaccentmap_t *to) ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:841:2: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? oaccentmap_t oaccentmap; ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:902:16: error: use of undeclared identifier 'OPIO_DEADKEYMAP' if (ioctl(0, OPIO_DEADKEYMAP, &oaccentmap) < 0) { ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:911:18: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? to_new_accentmap(oaccentmap_t *from, accentmap_t *to) ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:930:2: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? oaccentmap_t oaccentmap; ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:936:16: error: use of undeclared identifier 'OGIO_DEADKEYMAP' if (ioctl(0, OGIO_DEADKEYMAP, &oaccentmap) == 0) ^ 6 errors generated. --- kbdcontrol.o --- *** [kbdcontrol.o] Error code 1 make[3]: stopped in /usr/src/usr.sbin/kbdcontrol 1 error make[3]: stopped in /usr/src/usr.sbin/kbdcontrol --- _bootstrap-tools-usr.sbin/kbdcontrol --- make[2]: stopped in /usr/src --- _bootstrap-tools-lib/clang/libllvmminimal --- make[2]: stopped in /usr/src --- _bootstrap-tools --- make[1]: stopped in /usr/src --- buildworld --- make: stopped in /usr/src/ 10.189u 4.423s 0:07.68 190.1% 26395+411k 127+251io 156pf+0w jason@freebsdvm:~$ rm -rf /usr/obj/ rm: /usr/obj/: Operation not permitted jason@freebsdvm:~$ jason@freebsdvm:~$ time make -C /usr/src/ -s buildworld buildkernel make[1] warning: /usr/src/: Permission denied. make[1]: "/usr/src/Makefile.inc1" line 340: SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. make[1]: "/usr/src/Makefile.inc1" line 345: SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. -------------------------------------------------------------- >>> World build started on Sun May 21 13:07:48 EEST 2023 -------------------------------------------------------------- -------------------------------------------------------------- >>> Rebuilding the temporary build tree -------------------------------------------------------------- Linking host tools into /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin -------------------------------------------------------------- >>> stage 1.1: legacy release compatibility shims -------------------------------------------------------------- ===> tools/build (obj,includes,all,install) -------------------------------------------------------------- >>> stage 1.2: bootstrap tools -------------------------------------------------------------- ===> lib/clang/libllvmminimal (obj,all,install) make[3]: "/usr/src/lib/clang/llvm.pre.mk" line 8: warning: "which llvm-tblgen" returned non-zero status make[3]: "/usr/src/lib/clang/llvm.pre.mk" line 8: warning: "which llvm-tblgen" returned non-zero status ===> usr.bin/clang/llvm-tblgen (obj,all,install) make[3]: "/usr/src/lib/clang/llvm.pre.mk" line 8: warning: "which llvm-tblgen" returned non-zero status make[3]: "/usr/src/lib/clang/llvm.pre.mk" line 8: warning: "which llvm-tblgen" returned non-zero status ===> usr.bin/clang/clang-tblgen (obj,all,install) ===> usr.bin/dtc (obj,all,install) ===> usr.sbin/kbdcontrol (obj,all,install) /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:822:37: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? to_old_accentmap(accentmap_t *from, oaccentmap_t *to) ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:841:2: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? oaccentmap_t oaccentmap; ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:902:16: error: use of undeclared identifier 'OPIO_DEADKEYMAP' if (ioctl(0, OPIO_DEADKEYMAP, &oaccentmap) < 0) { ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:911:18: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? to_new_accentmap(oaccentmap_t *from, accentmap_t *to) ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:930:2: error: unknown type name 'oaccentmap_t'; did you mean 'accentmap_t'? oaccentmap_t oaccentmap; ^~~~~~~~~~~~ accentmap_t /usr/include/sys/kbio.h:210:26: note: 'accentmap_t' declared here typedef struct accentmap accentmap_t; ^ /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c:936:16: error: use of undeclared identifier 'OGIO_DEADKEYMAP' if (ioctl(0, OGIO_DEADKEYMAP, &oaccentmap) == 0) ^ 6 errors generated. *** Error code 1 Stop. make[3]: stopped in /usr/src/usr.sbin/kbdcontrol *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src/ 379.516u 33.563s 6:54.53 99.6% 59866+719k 571+2560io 137pf+0w I've been using WITHOUT_LEGACY_CONSOLE= for ages and it always worked. releng/12.1 -> releng/12.2 -> releng/12.3 -> releng/12.4 -> releng/13.1 -> <IT BREAKS HERE> -> releng/13.2 Ok, so exact failure reason is: /usr/src/usr.sbin/kbdcontrol/kbdcontrol.c includes /usr/include/sys/kbio.h instead of /usr/src/sys/sys/kbio.h That one in /usr/include obviously doesn't define oaccentmap_t since it introduced here: https://reviews.freebsd.org/D38381, and this happened after releng/13.2. I thought buildworld target shouldn't use anything outside of /usr/src, especially on bootstrap stage... Am I wrong? |