ukbd.c: error: use of undeclared identifier 'key_map'

From: Brendan Sechter <sgeos_at_hotmail.com>
Date: Thu, 10 Mar 2016 07:04:29 +0900
Hello-

My kernel fails to build when I specify a default keymap.  The problem appears to
exist in both atkbd(4) and ukbd(4).  My last build appears to have succeeded in
September of last year.  That may have been when I added the option.

My kernel config and the failing build output for ukbd are below.  The VIRTUALBOX
kernel config below built without issue.

Regards,
-Brendan

root_at_mirage:/usr/src # cat sys/amd64/conf/MIRAGE_KERNEL 
#include GENERIC
include VIRTUALBOX
ident MIRAGE

# AT Keyboard
device          atkbdc
device          atkbd
options         ATKBD_DFLT_KEYMAP
makeoptions     ATKBD_DFLT_KEYMAP=jp.106

# USB Keyboard
device          ukbd
options         UKBD_DFLT_KEYMAP
makeoptions     UKBD_DFLT_KEYMAP=jp.106

# ALTQ for pf
options         ALTQ
options         ALTQ_PRIQ               # Priority Queuing (PRIQ)

# cat sys/amd64/conf/VIRTUALBOX 
cpu             HAMMER
ident           VIRTUALBOX

options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         INET6                   # IPv6 communications protocols
options         IPSEC                   # IP (v4/v6) security
options         TCP_OFFLOAD             # TCP offload
options         SCTP                    # Stream Control Transmission Protocol
options         FFS                     # Berkeley Fast Filesystem
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                 # Support for access control lists
options         UFS_DIRHASH             # Improve performance on big directories
options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
options         QUOTA                   # Enable disk quotas for UFS
options         NFSCL                   # Network Filesystem Client
options         NFSD                    # Network Filesystem Server
options         NFSLOCKD                # Network Lock Manager
options         NFS_ROOT                # NFS usable as /, requires NFSCL
options         CD9660                  # ISO 9660 Filesystem
options         PROCFS                  # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         GEOM_PART_GPT           # GUID Partition Tables.
options         GEOM_LABEL              # Provides labelization
options         COMPAT_FREEBSD32        # Compatible with i386 binaries
options         SYSVSHM                 # SYSV-style shared memory
options         SYSVMSG                 # SYSV-style message queues
options         SYSVSEM                 # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options         PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         HWPMC_HOOKS             # Necessary kernel hooks for hwpmc(4)
options         AUDIT                   # Security event auditing
options         CAPABILITY_MODE         # Capsicum capability mode
options         CAPABILITIES            # Capsicum capabilities
options         MAC                     # TrustedBSD MAC Framework
options         INCLUDE_CONFIG_FILE     # Include this file in kernel
options         RACCT                   # Resource accounting framework
options         RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options         RCTL                    # Resource limits

# Make an SMP-capable kernel by default
options         SMP                     # Symmetric MultiProcessor Kernel

# CPU frequency control
device          cpufreq

# Bus support.
device          acpi
options         ACPI_DMAR
device          pci
options         PCI_IOV                 # PCI SR-IOV support

# ATA controllers
device          ahci                    # AHCI-compatible SATA controllers
device          ata                     # Legacy ATA/SATA controllers
options         ATA_STATIC_ID           # Static device numbering

# ATA/SCSI peripherals
device          scbus                   # SCSI bus (required for ATA/SCSI)
device          da                      # Direct Access (disks)
device          cd                      # CD
device          pass                    # Passthrough device (direct ATA/SCSI access)
device          ses                     # Enclosure Services (SES and SAF-TE)
#device         ctl                     # CAM Target Layer

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc                  # AT keyboard controller
device          atkbd                   # AT keyboard
device          psm                     # PS/2 mouse

device          kbdmux                  # keyboard multiplexer

device          vga                     # VGA video card driver
options         VESA                    # Add support for VESA BIOS Extensions (VBE)

device          splash                  # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device          sc
options         SC_PIXEL_MODE           # add support for the raster text mode
# vt is the new video console driver
device          vt
device          vt_vga
device          vt_efifb

device          agp                     # support several AGP chipsets

# PCI Ethernet NICs.
device          em                      # Intel PRO/1000 Gigabit Ethernet Family

# Pseudo devices.
device          loop                    # Network loopback
device          random                  # Entropy device
device          rdrand_rng              # Intel Bull Mountain RNG
device          ether                   # Ethernet support
device          vlan                    # 802.1Q VLAN support

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device          bpf                     # Berkeley packet filter

# USB support
device          uhci                    # UHCI PCI->USB interface
device          ohci                    # OHCI PCI->USB interface
device          ehci                    # EHCI PCI->USB interface (USB 2.0)
device          xhci                    # XHCI PCI->USB interface (USB 3.0)
device          usb                     # USB Bus (required)
device          ukbd                    # Keyboard
device          umass                   # Disks/Mass storage - Requires scbus and da
# VirtIO support
device          virtio                  # Generic VirtIO bus (required)
device          virtio_pci              # VirtIO PCI device
device          vtnet                   # VirtIO Ethernet device
device          virtio_blk              # VirtIO Block device
device          virtio_scsi             # VirtIO SCSI device
device          virtio_balloon          # VirtIO Memory Balloon device

# Netmap provides direct access to TX/RX rings on supported NICs
device          netmap                  # netmap(4) support

# The crypto framework is required by IPSEC
device          crypto                  # Required by IPSEC

root_at_mirage:/usr/src # make buildkernel KERNCONF=MIRAGE_KERNEL

* snip most of build output *

cc  -c -O2 -pipe -fno-strict-aliasing   -nostdinc  -I. -I/usr/src/sys -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 -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-unknown-pragmas  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function  -Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  -std=iso9899:1999 -Werror  /usr/src/sys/dev/usb/input/ukbd.c
/usr/src/sys/dev/usb/input/ukbd.c:1213:18: error: use of undeclared identifier 'key_map'; did you mean 'fkey_tab'?
        sc->sc_keymap = key_map;
                        ^~~~~~~
                        fkey_tab
/usr/src/sys/dev/kbd/kbdtables.h:213:18: note: 'fkey_tab' declared here
static fkeytab_t fkey_tab[96] = {
                 ^
/usr/src/sys/dev/usb/input/ukbd.c:1213:16: error: assigning to 'keymap_t' (aka 'struct keymap') from incompatible type
      'fkeytab_t [96]'
        sc->sc_keymap = key_map;
                      ^ ~~~~~~~
/usr/src/sys/dev/usb/input/ukbd.c:1214:18: error: use of undeclared identifier 'accent_map'
        sc->sc_accmap = accent_map;
                        ^
3 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/sys/MIRAGE_KERNEL
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

 		 	   		  
Received on Wed Mar 09 2016 - 21:05:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC