About Bug 246121 - [bhyve][PATCH] Append Keyboard Layout specified option for using VNC : it doesn't work in my case reddit / freebsd ---------------------------------------------------------------------- loziomario · 2021-07-26 15:27 Hello. I tried a lot of different settings but I haven.t been able to change the default and the wide and terminal / keyboard language in the xfce4 DM installed by default on Xubuntu 21.04 that I have emulated with vm.bhyve. I.m sure that it should be defined inside the configuration file of vm.bhyve,but I haven.t understood where. There is nothing inside the config.sample file that could be related to this setting. Below I have copied and pasted the content of that file on Ubuntu paste bin. ​ [https://pastebin.ubuntu.com/p/tCp2gWkv9W/](https://pastebin.ubuntu.co m/p/tCp2gWkv9W/) ​ Needless to say, to change it within Xfce I have tried everything,including this : ​ [https://unix.stackexchange.com/questions/167794/how-might-one-change- language-interface-in- xfce](https://unix.stackexchange.com/questions/167794/how-might-one- change-language-interface-in-xfce) ​ Until I reached this bug : ​ [https://bugs.freebsd.org/bugzilla/show\_bug.cgi?id=246121](https://bu gs.freebsd.org/bugzilla/show_bug.cgi?id=246121) ​ and I've understood that...it's not my fault if the language inside xfce4 / Xubuntu does not change after all the efforts. So,I tried to patch the relevant files,but I haven't been able to make the patched files,as u can see below. I followed two roads : ​ 1. I've got the patch file here : [https://osdn.net/users/koinec/pf/bh...bdlayout\_option/bhyve\_kbdlayo ut\_fbsd13c.patch](https://osdn.net/users/koinec/pf/bhyve_keyboard_lay out_patch/scm/blobs/b0817c73acee1ed5a2b3621590fa6fc1cca89425/kbdlayout _option/bhyve_kbdlayout_fbsd13c.patch) ​ and then : ​ root@marietto:/usr/src/usr.sbin # patch -u < bhyve_kbdlayout_fbsd13c.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -upN bhyve_orig/Makefile bhyve/Makefile |--- bhyve_orig/Makefile 2020-04-23 09:06:39.000000000 +0900 |+++ bhyve/Makefile 2020-05-02 13:09:01.382770000 +0900 -------------------------- Patching file Makefile using Plan A... Hunk #1 failed at 99. 1 out of 1 hunks failed--saving rejects to Makefile.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -upN bhyve_orig/bhyve.8 bhyve/bhyve.8 |--- bhyve_orig/bhyve.8 2020-04-23 09:06:39.000000000 +0900 |+++ bhyve/bhyve.8 2020-05-02 13:11:28.198679000 +0900 -------------------------- Patching file bhyve/bhyve.8 using Plan A... Hunk #1 failed at 47. Hunk #2 succeeded at 150 (offset -12 lines). 1 out of 2 hunks failed--saving rejects to bhyve/bhyve.8.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -upN bhyve_orig/bhyverun.c bhyve/bhyverun.c |--- bhyve_orig/bhyverun.c 2020-04-23 09:06:39.000000000 +0900 |+++ bhyve/bhyverun.c 2020-05-02 13:09:01.437624000 +0900 -------------------------- Patching file bhyve/bhyverun.c using Plan A... Hunk #1 succeeded at 188 (offset 20 lines). Hunk #2 failed at 239. Hunk #3 succeeded at 230 with fuzz 1 (offset 1 line). Hunk #4 failed at 1024. Hunk #5 succeeded at 1146 (offset 85 lines). 2 out of 5 hunks failed--saving rejects to bhyve/bhyverun.c.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -upN bhyve_orig/bhyverun.h bhyve/bhyverun.h |--- bhyve_orig/bhyverun.h 2020-04-23 09:06:39.000000000 +0900 |+++ bhyve/bhyverun.h 2020-05-02 13:09:01.444814000 +0900 -------------------------- Patching file bhyve/bhyverun.h using Plan A... Hunk #1 failed at 39. 1 out of 1 hunks failed--saving rejects to bhyve/bhyverun.h.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |Common subdirectories: bhyve_orig/kbdlayout and bhyve/kbdlayout |diff -upN bhyve_orig/ps2kbd.c bhyve/ps2kbd.c |--- bhyve_orig/ps2kbd.c 2020-04-23 09:06:39.000000000 +0900 |+++ bhyve/ps2kbd.c 2020-05-02 13:09:01.462761000 +0900 -------------------------- Patching file bhyve/ps2kbd.c using Plan A... Hunk #1 failed at 31. Hunk #2 succeeded at 67 (offset 3 lines). Hunk #3 succeeded at 97 (offset 3 lines). Hunk #4 succeeded at 169 (offset 3 lines). Hunk #5 succeeded at 327 (offset 3 lines). Hunk #6 succeeded at 377 (offset 3 lines). 1 out of 6 hunks failed--saving rejects to bhyve/ps2kbd.c.rej done root@marietto:/usr/src/usr.sbin # sh bhyve_kbdlayout.shar sh: cannot open bhyve_kbdlayout.shar: No such file or directory root@marietto:/usr/src/usr.sbin # cd /usr/src/usr.sbin/bhyve root@marietto:/usr/src/usr.sbin/bhyve # make [Creating objdir /usr/obj/usr/src/amd64.amd64/usr.sbin/bhyve...] echo bhyve.full: /usr/lib/libc.a /usr/lib/libvmmapi.a /usr/lib/libmd.a /usr/lib/libpthread.a /usr/lib/libz.a /usr/lib/libutil.a /usr/lib/libsbuf.a /usr/lib/libcam.a /usr/lib/lib9p.a /usr/lib/libnetgraph.a /usr/lib/libcrypto.a >> .depend ...... cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -g -MD -MF.depend.ps2kbd.o -MTps2kbd.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/ps2kbd.c -o ps2kbd.o /usr/src/usr.sbin/bhyve/ps2kbd.c:407:14: error: variable has incomplete type 'struct stat' struct stat sb; ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:407:9: note: forward declaration of 'struct stat' struct stat sb; ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:413:16: error: use of undeclared identifier 'kbdlayout_name' strncat(path, kbdlayout_name, (sizeof(path) - strlen(PS2KBD_LAYOUT_BASEDIR) - 1)); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:415:8: error: implicit declaration of function 'stat' is invalid in C99 [-Werror,-Wimplicit- function-declaration] err = stat(path, &sb); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:423:7: error: implicit declaration of function 'open' is invalid in C99 [-Werror,-Wimplicit- function-declaration] fd = open(path, O_RDONLY); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:423:18: error: use of undeclared identifier 'O_RDONLY' fd = open(path, O_RDONLY); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:427:7: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit- function-declaration] sz = read(fd, buf, sb.st_size ); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:427:7: note: did you mean 'fread'? /usr/include/stdio.h:263:9: note: 'fread' declared here size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:429:2: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit- function-declaration] close(fd); ^ /usr/src/usr.sbin/bhyve/ps2kbd.c:458:6: error: use of undeclared identifier 'kbdlayout_name' if (kbdlayout_name != NULL) ^ 8 errors generated. *** Error code 1 Stop. make: stopped in /usr/src/usr.sbin/bhyve ​ 2) I have applied these patches here : ​ [https://cgit.freebsd.org/src/commit/?id=b563ff5d4f812df198ade69918347 82a5d35af08](https://cgit.freebsd.org/src/commit/?id=b563ff5d4f812df19 8ade6991834782a5d35af08) ​ and this is what happened : ​ root@marietto:~ # cd /usr/src/usr.sbin/bhyve root@marietto:/usr/src/usr.sbin/bhyve # make rm -f .depend echo bhyve.full: /usr/lib/libc.a /usr/lib/libvmmapi.a /usr/lib/libmd.a /usr/lib/libpthread.a /usr/lib/libz.a /usr/lib/libutil.a /usr/lib/libsbuf.a /usr/lib/libcam.a /usr/lib/lib9p.a /usr/lib/libnetgraph.a /usr/lib/libcrypto.a >> .depend cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -g -MD -MF.depend.console.o -MTconsole.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/console.c -o console.o In file included from /usr/src/usr.sbin/bhyve/console.c:35: /usr/src/usr.sbin/bhyve/console.h:51:1: error: '/*' within block comment [-Werror,-Wcomment] /*void console_key_event(int down, uint32_t keysym); ^ /usr/src/usr.sbin/bhyve/console.h:57:8: error: '/*' within block comment [-Werror,-Wcomment] #endif /* _CONSOLE_H_ */ ^ /usr/src/usr.sbin/bhyve/console.h:31:2: error: unterminated conditional directive #ifndef _CONSOLE_H_ ^ /usr/src/usr.sbin/bhyve/console.c:43:2: error: unknown type name 'kbd_event_func_t' kbd_event_func_t kbd_event_cb; ^ /usr/src/usr.sbin/bhyve/console.c:47:2: error: unknown type name 'ptr_event_func_t' ptr_event_func_t ptr_event_cb; ^ /usr/src/usr.sbin/bhyve/console.c:89:22: error: unknown type name 'kbd_event_func_t' console_kbd_register(kbd_event_func_t event_cb, void *arg, int pri) ^ /usr/src/usr.sbin/bhyve/console.c:99:22: error: unknown type name 'ptr_event_func_t' console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri) ^ /usr/src/usr.sbin/bhyve/console.c:113:1: error: '/*' within block comment [-Werror,-Wcomment] /* (*console.kbd_event_cb)(down, keysym, console.kbd_arg); ^ /usr/src/usr.sbin/bhyve/console.c:109:1: error: unterminated /* comment /*console_key_event(int down, uint32_t keysym) ^ /usr/src/usr.sbin/bhyve/console.c:122:2: error: expected identifier or '(' } ^ 10 errors generated. *** Error code 1 ​ 3. I've got all the files included in this zipped file : ​ [https://cgit.freebsd.org/src/snapshot/src- b563ff5d4f812df198ade6991834782a5d35af08.tar.gz](https://cgit.freebsd. org/src/snapshot/src-b563ff5d4f812df198ade6991834782a5d35af08.tar.gz) ​ and I have extracted everything inside /usr/src and then from within the folder : /usr/src/usr.sbin/bhyve,I did : ​ root@marietto:/usr/src/usr.sbin/bhyve # make cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.atkbdc.o -MTatkbdc.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/atkbdc.c -o atkbdc.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.acpi.o -MTacpi.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/acpi.c -o acpi.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.audio.o -MTaudio.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/audio.c -o audio.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.bhyvegc.o -MTbhyvegc.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/bhyvegc.c -o bhyvegc.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.bhyverun.o -MTbhyverun.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/bhyverun.c -o bhyverun.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.block_if.o -MTblock_if.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/block_if.c -o block_if.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.bootrom.o -MTbootrom.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/bootrom.c -o bootrom.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.config.o -MTconfig.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/config.c -o config.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.console.o -MTconsole.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/console.c -o console.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.ctl_util.o -MTctl_util.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/sys/cam/ctl/ctl_util.c -o ctl_util.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.ctl_scsi_all.o -MTctl_scsi_all.o -std=gnu99 -Wno-format- zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological- compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused- function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address- of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted- parameter -Qunused-arguments -c /usr/src/sys/cam/ctl/ctl_scsi_all.c -o ctl_scsi_all.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.fwctl.o -MTfwctl.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/fwctl.c -o fwctl.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.gdb.o -MTgdb.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/gdb.c -o gdb.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.hda_codec.o -MThda_codec.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/hda_codec.c -o hda_codec.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.inout.o -MTinout.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/inout.c -o inout.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.ioapic.o -MTioapic.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/ioapic.c -o ioapic.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.kernemu_dev.o -MTkernemu_dev.o -std=gnu99 -Wno-format-zero- length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno- format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno- string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno- enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed- member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -I/usr/src/sys/amd64 -c /usr/src/usr.sbin/bhyve/kernemu_dev.c -o kernemu_dev.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.mem.o -MTmem.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/mem.c -o mem.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.mevent.o -MTmevent.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/mevent.c -o mevent.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.mptbl.o -MTmptbl.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused- const-variable -Wno-tautological-compare -Wno-unused-value -Wno- parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno- unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno- switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/mptbl.c -o mptbl.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.net_backends.o -MTnet_backends.o -std=gnu99 -Wno-format- zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological- compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused- function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address- of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted- parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/net_backends.c -o net_backends.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.net_utils.o -MTnet_utils.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/net_utils.c -o net_utils.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.pci_ahci.o -MTpci_ahci.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/pci_ahci.c -o pci_ahci.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.pci_e82545.o -MTpci_e82545.o -std=gnu99 -Wno-format-zero- length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno- format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno- string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno- enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed- member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/pci_e82545.c -o pci_e82545.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.pci_emul.o -MTpci_emul.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/pci_emul.c -o pci_emul.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.pci_hda.o -MTpci_hda.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/pci_hda.c -o pci_hda.o cc -O2 -pipe -fno-common -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD -MF.depend.pci_fbuf.o -MTpci_fbuf.o -std=gnu99 -Wno-format-zero-length -fstack-protector- strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno- uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/usr.sbin/bhyve/pci_fbuf.c -o pci_fbuf.o /usr/src/usr.sbin/bhyve/pci_fbuf.c:231:7: error: implicit declaration of function 'vm_munmap_memseg' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (vm_munmap_memseg(ctx, sc->fbaddr, FB_SIZE) != 0) ^ /usr/src/usr.sbin/bhyve/pci_fbuf.c:231:7: note: did you mean 'vm_mmap_memseg'? /usr/include/vmmapi.h:111:5: note: 'vm_mmap_memseg' declared here int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, ^ 1 error generated. *** Error code 1 ​ Do u want to give me some help ? ​ ---------------------------------------------------------------------- CremeBrulee01 · 2023-02-04 09:16 Hello LozioMario i have the same issue have you solved your problem ? thank you very much ---------------------------------------------------------------------- John-Land · 2023-02-04 13:06 The procedure when confirmed is shown below, so please try it. 1) Download latest-patch. [https://osdn.net/downloads/users/30/30328/bhyve\_keyboard\_layout\_pa tch\_20210505.tgz](https://osdn.net/downloads/users/30/30328/bhyve_key board_layout_patch_20210505.tgz) 2) Extract archive   \# tar xvfz bhyve\_keyboard\_layout\_patch\_20210505.tgz     \* Below, it is assumed that it is expanded to / root. 3) Backup bhyve original src-tree   \# cd /usr/src/usr.sbin   \# cp -r bhyve bhyve\_orig 4) Apply patch1 - Support for QEMU Extended Key Event Messages.   \# cd /usr/src/usr.sbin   \# patch -u < /root/bhyve\_keyboard\_layout\_patch/qemu\_ext\_keyev ent\_msg/bhyve\_qemu\_ext\_key\_event\_msg\_fbsd130r.patch 5) Apply patch2 - Support for Keyboard Layout specified option.   \# cd /usr/src/usr.sbin   \# patch -u < /root/bhyve\_keyboard\_layout\_patch/kbdlayout\_optio n/bhyve\_kbdlayout\_option\_fbsd130r.patch   \# sh /root/bhyve\_keyboard\_layout\_patch/kbdlayout\_option/bhyve\ _kbdlayout\_layoutfile.shar 6) Build & Install   \# cd /usr/src/usr.sbin/bhyve   \# make   \# make install