Bug 193817 - ATKBD_DFLT_KEYMAP causes buildkernel failure
Summary: ATKBD_DFLT_KEYMAP causes buildkernel failure
Status: Closed DUPLICATE of bug 193865
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Ed Maste
URL:
Keywords: regression
Depends on:
Blocks: 203349
  Show dependency treegraph
 
Reported: 2014-09-21 17:42 UTC by Thierry Thomas
Modified: 2016-03-15 18:52 UTC (History)
4 users (show)

See Also:
op: mfc-stable10?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer 2014-09-21 17:42:36 UTC
My Kernel contains the following lines:

device		atkbdc			# AT keyboard controller
device		atkbd			# AT keyboard
device		psm			# PS/2 mouse
options 	ATKBD_DFLT_KEYMAP	# specify the built-in keymap
makeoptions	ATKBD_DFLT_KEYMAP=fr.acc

With them, `make buildkernel' fails with these messages:

/usr/local/libexec/ccache/world/cc --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing -march=corei7 -std=c99 -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function   -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  /usr/src/sys/dev/atkbdc/atkbd.c
/usr/src/sys/dev/atkbdc/atkbd.c:372:26: error: use of undeclared identifier 'key_map'; did you mean 'keymap'?
                keymap = malloc(sizeof(key_map), M_DEVBUF, M_NOWAIT);
                                       ^~~~~~~
                                       keymap
/usr/src/sys/dev/atkbdc/atkbd.c:348:12: note: 'keymap' declared here
        keymap_t *keymap;
                  ^
/usr/src/sys/dev/atkbdc/atkbd.c:373:26: error: use of undeclared identifier 'accent_map'; did you mean 'accentmap_t'?
                accmap = malloc(sizeof(accent_map), M_DEVBUF, M_NOWAIT);
                                       ^
/usr/src/sys/sys/kbio.h:210:26: note: 'accentmap_t' declared here
typedef struct accentmap accentmap_t;
                         ^
/usr/src/sys/dev/atkbdc/atkbd.c:403:10: error: use of undeclared identifier 'key_map'; did you mean 'keymap'?
                bcopy(&key_map, keymap, sizeof(key_map));
                       ^~~~~~~
                       keymap
/usr/src/sys/dev/atkbdc/atkbd.c:348:12: note: 'keymap' declared here
        keymap_t *keymap;
                  ^
/usr/src/sys/dev/atkbdc/atkbd.c:403:34: error: use of undeclared identifier 'key_map'; did you mean 'keymap'?
                bcopy(&key_map, keymap, sizeof(key_map));
                                               ^~~~~~~
                                               keymap
/usr/src/sys/dev/atkbdc/atkbd.c:348:12: note: 'keymap' declared here
        keymap_t *keymap;
                  ^
/usr/src/sys/dev/atkbdc/atkbd.c:404:10: error: use of undeclared identifier 'accent_map'
                bcopy(&accent_map, accmap, sizeof(accent_map));
                       ^
5 errors generated.
*** Error code 1

If I comment out

#options 	ATKBD_DFLT_KEYMAP	# specify the built-in keymap
#makeoptions	ATKBD_DFLT_KEYMAP=fr.acc

then it compiles fine.
Comment 1 Oliver Pinter freebsd_committer 2014-11-01 20:32:19 UTC
this is just a workaround and not a correct fix: https://github.com/HardenedBSD/hardenedBSD/commit/81c1aff1b26f0855a58523a52e7284cbfe4c43c1

The referred bug report that you already has probably the correct one.
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2015-02-18 11:54:20 UTC
Updated 10.1-BETA and 10.1-RC versioned bugs to 10.1-STABLE.
Comment 3 Oliver Pinter freebsd_committer 2015-02-28 21:31:32 UTC
Updated to 11-CURRENT the affected version.
Comment 4 Ed Maste freebsd_committer 2016-03-15 18:52:26 UTC

*** This bug has been marked as a duplicate of bug 193865 ***