[Bug 294096] graphics/nvidia-drm-66-kmod unbuildable ISO C99 and later do not support implicit function declarations

[email protected]
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294096

            Bug ID: 294096
           Summary: graphics/nvidia-drm-66-kmod unbuildable ISO C99 and
                    later do not support implicit function declarations
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: [email protected]
          Reporter: [email protected]
          Assignee: [email protected]
             Flags: maintainer-feedback?([email protected])

nvidia-drm-drv.c:2086:9: error: call to undeclared function
'pm_vt_switch_required'; ISO C99 and later do not support implicit function
declarations [-Werror,-Wimplicit-function-declaration]
 2086 |         pm_vt_switch_required(dev->dev, true);

build just dies here, so stuck unable to reboot without loosing X11. thought it
was issue I was still using C7 for 32 bit support, but swtiched to rl9 and
error persists


cc  -O2 -pipe -march=native -fno-strict-aliasing -g -Wno-visibility
-Wno-error=unused-but-set-variable -Wno-error=missing-prototypes
-Wno-error=pointer-arith -DNVTYPES_USE_STDINT=1
-DNV_VERSION_STRING=\"595.58.03\" -Werror=undef -D_KERNEL -DKLD_MODULE
-DKBUILD_MODNAME='"nvidia-drm"' -DLINUXKPI_PARAM_PREFIX=nvidia_drm_
-Wno-error=redundant-decls -Werror=incompatible-pointer-types
-DLINUXKPI_VERSION=60600 -DCONFIG_DRM_AMDGPU_CIK -DCONFIG_DRM_AMDGPU_SI
-DCONFIG_DRM_AMD_DC -DCONFIG_DRM_AMD_DC_SI -DCONFIG_AMD_PMC -DCONFIG_DRM_EXEC
-DCONFIG_DRM_I915_FORCE_PROBE='"*"' -DCONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-DCONFIG_DRM_I915_CAPTURE_ERROR -DCONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-DCONFIG_DRM_I915_STOP_TIMEOUT=100 -DCONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-DCONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
-DCONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-DCONFIG_DRM_I915_TIMESLICE_DURATION=1
-DCONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-DCONFIG_DRM_I915_FENCE_TIMEOUT=10000 -DCONFIG_DRM_MIPI_DSI
-DCONFIG_DRM_PANEL_ORIENTATION_QUIRKS -DCONFIG_APERTURE_HELPERS
-DCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG -DCONFIG_BACKLIGHT_CLASS_DEVICE
-DCONFIG_DEBUG_FS -DCONFIG_DMI -DCONFIG_FB -DCONFIG_MTRR -DCONFIG_PCI
-DCONFIG_PM -DCONFIG_PM_SLEEP -DCONFIG_SMP -DCONFIG_SUSPEND
-DCONFIG_VIDEO_CMDLINE -DCONFIG_ACPI -DCONFIG_ACPI_SLEEP -DCONFIG_X86
-DCONFIG_X86_PAT -DCONFIG_64BIT -DCONFIG_AS_MOVNTDQA -DCONFIG_COMPAT
-DCONFIG_X86_64 -DCONFIG_DRM_AMD_DC_FP -Wno-cast-qual
-Wno-incompatible-pointer-types-discards-qualifiers -DLINUXKPI_VERSION=60600 
-Werror -D_KERNEL -DKLD_MODULE -nostdinc  -Imachine -I/usr/src/sys/sys
-I../common/inc
-I/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//linuxkpi/bsd/include
-I/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//linuxkpi/gplv2/include/
-I/usr/src/sys/compat/linuxkpi/common/include/
-I/usr/src/sys/compat/linuxkpi/dummy/include/
-I/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//include/
-I/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//include/uapi/
-I/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//drivers/gpu/
-I/usr/src/sys/contrib/ck/include -I. -I/usr/src/sys -I/usr/src/include
-I/usr/src/sys/contrib/ck/include -I../nvidia/ -include
/usr/ports/graphics/nvidia-drm-66-kmod/work/NVIDIA-FreeBSD-x86_64-595.58.03/src/nvidia-drm/opt_global.h
-I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-ffile-prefix-map=/usr/src/sys=/usr/src/sys
-ffile-prefix-map=/usr/ports/graphics/nvidia-drm-66-kmod/work/NVIDIA-FreeBSD-x86_64-595.58.03/src/nvidia-drm=/usr/obj/usr/src/amd64.amd64/sys/modules/nvidia-drm
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include
-fdebug-prefix-map=./i386=/usr/src/sys/i386/include    -MD 
-MF.depend.nvidia-drm-drv.o -MTnvidia-drm-drv.o -mcmodel=kernel -mno-red-zone
-mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding
-fwrapv -fstack-protector  -gdwarf-4 -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas -Wswitch
-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
-Wno-address-of-packed-member -Wno-format-zero-length   -mno-aes -mno-avx 
-std=gnu17 -c nvidia-drm-drv.c -o nvidia-drm-drv.o
In file included from nvidia-drm-drv.c:31:
In file included from ./nvidia-drm-gem.h:43:
In file included from
/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//linuxkpi/gplv2/include/linux/dma-buf.h:28:
/usr/src/sys/compat/linuxkpi/common/include/linux/iosys-map.h:31:20: warning:
arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
   31 |                 ism->vaddr_iomem += n;
      |                 ~~~~~~~~~~~~~~~~ ^
/usr/src/sys/compat/linuxkpi/common/include/linux/iosys-map.h:33:14: warning:
arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
   33 |                 ism->vaddr += n;
      |                 ~~~~~~~~~~ ^
/usr/src/sys/compat/linuxkpi/common/include/linux/iosys-map.h:41:32: warning:
arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
   41 |                 memcpy_toio(ism->vaddr_iomem + off, src, len);
      |                             ~~~~~~~~~~~~~~~~ ^
/usr/src/sys/compat/linuxkpi/common/include/linux/io.h:446:38: note: expanded
from macro 'memcpy_toio'
  446 | #define memcpy_toio(a, b, c)    memcpy((a), (b), (c))
      |                                         ^
/usr/src/sys/sys/systm.h:283:49: note: expanded from macro 'memcpy'
  283 | #define memcpy(to, from, len)   __builtin_memcpy((to), (from), (len))
      |                                                   ^~
In file included from nvidia-drm-drv.c:31:
In file included from ./nvidia-drm-gem.h:43:
In file included from
/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//linuxkpi/gplv2/include/linux/dma-buf.h:28:
/usr/src/sys/compat/linuxkpi/common/include/linux/iosys-map.h:43:21: warning:
arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
   43 |                 memcpy(ism->vaddr + off, src, len);
      |                        ~~~~~~~~~~ ^
/usr/src/sys/sys/systm.h:283:49: note: expanded from macro 'memcpy'
  283 | #define memcpy(to, from, len)   __builtin_memcpy((to), (from), (len))
      |                                                   ^~
In file included from nvidia-drm-drv.c:31:
In file included from ./nvidia-drm-gem.h:43:
In file included from
/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//linuxkpi/gplv2/include/linux/dma-buf.h:28:
/usr/src/sys/compat/linuxkpi/common/include/linux/iosys-map.h:106:30: warning:
arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
  106 |                 memset_io(ism->vaddr_iomem + off, value, len);
      |                           ~~~~~~~~~~~~~~~~ ^
/usr/src/sys/compat/linuxkpi/common/include/linux/io.h:444:36: note: expanded
from macro 'memset_io'
  444 | #define memset_io(a, b, c)      memset((a), (b), (c))
      |                                         ^
/usr/src/sys/sys/systm.h:282:47: note: expanded from macro 'memset'
  282 | #define memset(buf, c, len)     __builtin_memset((buf), (c), (len))
      |                                                   ^~~
In file included from nvidia-drm-drv.c:31:
In file included from ./nvidia-drm-gem.h:43:
In file included from
/usr/ports/graphics/nvidia-drm-66-kmod/work/drm-kmod-drm_v6.6.25_9//linuxkpi/gplv2/include/linux/dma-buf.h:28:
/usr/src/sys/compat/linuxkpi/common/include/linux/iosys-map.h:108:21: warning:
arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
  108 |                 memset(ism->vaddr + off, value, len);
      |                        ~~~~~~~~~~ ^
/usr/src/sys/sys/systm.h:282:47: note: expanded from macro 'memset'
  282 | #define memset(buf, c, len)     __builtin_memset((buf), (c), (len))
      |                                                   ^~~
nvidia-drm-drv.c:2086:9: error: call to undeclared function
'pm_vt_switch_required'; ISO C99 and later do not support implicit function
declarations [-Werror,-Wimplicit-function-declaration]
 2086 |         pm_vt_switch_required(dev->dev, true);
      |         ^
6 warnings and 1 error generated.
*** Error code 1

Stop.
make: stopped making "all" in
/usr/ports/graphics/nvidia-drm-66-kmod/work/NVIDIA-FreeBSD-x86_64-595.58.03/src/nvidia-drm
*** Error code 1

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.