VirtualBox

Opened 3 months ago

Last modified 3 months ago

#22040 new defect

error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]

Reported by: sander44 Owned by:
Component: guest additions Version: VirtualBox-7.0.14
Keywords: 6.8.5 kernel, debian 13 testing Cc:
Guest type: other Host type: Linux

Description

Hello VirtualBox Team,

I notice this today when using CDROM file - VBox_GAs_7.0.14 to install drivers in Guest VM Linux. But i notice error when trying to install additional guest drivers.

Snip errors:

/tmp/vbox.0/VBoxGuest-linux.c: In function ‘vgdrvLinuxParamLogGrpSet’:
/tmp/vbox.0/VBoxGuest-linux.c:1364:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]
 1364 |         strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
      |         ^~~~~~~
      |         strscpy

Host OS: OpenSUSE Tw, virtuabox version: virtualbox-7.0.14-7.1 Guest VM OS: Debian 13 Trixie Testing, 6.8.5-lowlatency kernel version

Attachments (1)

vboxadd-setup.log (29.4 KB ) - added by sander44 3 months ago.
vboxadd-setup.log - 6.8.5 kernel - debian guest os

Download all attachments as: .zip

Change History (2)

by sander44, 3 months ago

Attachment: vboxadd-setup.log added

vboxadd-setup.log - 6.8.5 kernel - debian guest os

comment:1 by peterge-misoft, 3 months ago

Hey, I guess I am facing a similar issue after installing the latest kernel on Proxmox Backup Server; Debian 12.5; kernel 6.8.4-2-pve; after running

root@pbsbn:/mnt/cdrom# sudo sh ./VBoxLinuxAdditions.run

cat /var/log/vboxadd-setup.log
Building the main Guest Additions 7.0.14 module for kernel 6.8.4-2-pve.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/6.8.4-2-pve/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j6 modules
make[1]: warning: -j6 forced in submake: resetting jobserver mode.
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 need-builtin=1 need-modorder=1
# cmd_mod /tmp/vbox.0/vboxguest.mod
  printf '%s
'   VBoxGuest-linux.o VBoxGuest-common.o common/string/strformatrt.o combined-agnostic.o combined-os-specific.o | awk '!x[$0]++ { print("/tmp/vbox.0/"$0) }' > /tmp/vbox.0/vboxguest.mod
# CC [M]  /tmp/vbox.0/VBoxGuest-linux.o
  gcc -Wp,-MMD,/tmp/vbox.0/.VBoxGuest-linux.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compil>
# CC [M]  /tmp/vbox.0/VBoxGuest-common.o
  gcc -Wp,-MMD,/tmp/vbox.0/.VBoxGuest-common.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compi>
# CC [M]  /tmp/vbox.0/common/string/strformatrt.o
  gcc -Wp,-MMD,/tmp/vbox.0/common/string/.strformatrt.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/li>
# CC [M]  /tmp/vbox.0/combined-agnostic.o
  gcc -Wp,-MMD,/tmp/vbox.0/.combined-agnostic.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/comp>
# CC [M]  /tmp/vbox.0/combined-os-specific.o
  gcc -Wp,-MMD,/tmp/vbox.0/.combined-os-specific.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/c>
/tmp/vbox.0/VBoxGuest-linux.c: In function ‘vgdrvLinuxParamLogGrpSet’:
/tmp/vbox.0/VBoxGuest-linux.c:1364:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]
 1364 |         strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
      |         ^~~~~~~
      |         strscpy
# cmd_gen_objtooldep /tmp/vbox.0/common/string/strformatrt.o
   { echo ; echo '/tmp/vbox.0/common/string/strformatrt.o: $(wildcard ./tools/objtool/objtool)' ; } >> /tmp/vbox.0/common/string/.strformatrt.o.cmd
# cmd_gen_symversions_c /tmp/vbox.0/common/string/strformatrt.o
  if nm /tmp/vbox.0/common/string/strformatrt.o 2>/dev/null | grep -q ' __export_symbol_'; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/tmp/vbox.0/common/string/.strformatrt.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/in>
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
# cmd_gen_objtooldep /tmp/vbox.0/VBoxGuest-common.o
   { echo ; echo '/tmp/vbox.0/VBoxGuest-common.o: $(wildcard ./tools/objtool/objtool)' ; } >> /tmp/vbox.0/.VBoxGuest-common.o.cmd
# cmd_gen_symversions_c /tmp/vbox.0/VBoxGuest-common.o
  if nm /tmp/vbox.0/VBoxGuest-common.o 2>/dev/null | grep -q ' __export_symbol_'; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/tmp/vbox.0/.VBoxGuest-common.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arc>
/tmp/vbox.0/combined-os-specific.o: warning: objtool: VBoxGuest_RTR0MemKernelCopyFrom+0x13: redundant CLD
/tmp/vbox.0/combined-os-specific.o: warning: objtool: VBoxGuest_RTR0MemKernelCopyTo+0x13: redundant CLD
# cmd_gen_objtooldep /tmp/vbox.0/combined-os-specific.o
   { echo ; echo '/tmp/vbox.0/combined-os-specific.o: $(wildcard ./tools/objtool/objtool)' ; } >> /tmp/vbox.0/.combined-os-specific.o.cmd
# cmd_gen_symversions_c /tmp/vbox.0/combined-os-specific.o
  if nm /tmp/vbox.0/combined-os-specific.o 2>/dev/null | grep -q ' __export_symbol_'; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/tmp/vbox.0/.combined-os-specific.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi>
# cmd_gen_objtooldep /tmp/vbox.0/combined-agnostic.o
   { echo ; echo '/tmp/vbox.0/combined-agnostic.o: $(wildcard ./tools/objtool/objtool)' ; } >> /tmp/vbox.0/.combined-agnostic.o.cmd
# cmd_gen_symversions_c /tmp/vbox.0/combined-agnostic.o
  if nm /tmp/vbox.0/combined-agnostic.o 2>/dev/null | grep -q ' __export_symbol_'; then gcc -E -D__GENKSYMS__ -Wp,-MMD,/tmp/vbox.0/.combined-agnostic.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./a>
make[1]: *** [Makefile:1926: /tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:133: vboxguest] Error 2
Could not find the X.Org or XFree86 Window System, skipping.
kernel modules and services were not reloaded
root@pbsbn:/mnt/cdrom# apt search strlcpy
Sorting... Done
Full Text Search... Done
libbsd-dev/stable,now 0.11.7-2 amd64 [installed]
  utility functions from BSD systems - development files

libbsd0/stable,now 0.11.7-2 amd64 [installed]
  utility functions from BSD systems - shared library

libite-dev/stable 2.5.1-1+b1 amd64
  static library, header files, and docs for libite

libite5/stable 2.5.1-1+b1 amd64
  That missing frog DNA you've been looking for
Last edited 3 months ago by peterge-misoft (previous) (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use