[Bug 260318] x11/nvidia-driver: error: use of undeclared identifier 'MAXPATHLEN'

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 10 Dec 2021 14:59:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260318

            Bug ID: 260318
           Summary: x11/nvidia-driver: error: use of undeclared identifier
                    'MAXPATHLEN'
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: danfe@FreeBSD.org
          Reporter: ohartmann@walstatt.org
             Flags: maintainer-feedback?(danfe@FreeBSD.org)
          Assignee: danfe@FreeBSD.org

On recent 14-CURRENT (FreeBSD 14.0-CURRENT #34 main-n251260-156fbc648579: Thu
Dec  2 15:31:48 CET 2021 amd64) the compilation of x11/nvidia-driver fails due
to the error shown below:

[...]
===> src/nvidia-modeset (all)
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
touch opt_global.h
cc  -O2 -pipe -march=native -fno-strict-aliasing -DNV_VERSION_STRING=\"470.86\"
-DNV_SPECTRE_V2=1 -Werror=undef -march=native  -Werror -D_KERNEL -DKLD_MODULE
-nostdinc  -Imachine -I/usr/src/sys/sys -I../common/inc -incl
ude
/usr/obj/usr/src/amd64.amd64/sys/THOR/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-470.86/src/nvidia-modeset/opt_global.h
-I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common 
-fno-omit-frame-p
ointer -mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include     -MD 
-MF.depend.nvidia-modeset-freebsd.o -MTnvidia-modeset-freebsd.o -mcm
odel=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
-Wpoin
ter-arith -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=par
entheses-equality -Wno-error=unused-function -Wno-error=pointer-sign
-Wno-error=shift-negative-value -Wno-address-of-packed-member
-Wno-error=unused-but-set-variable -Wno-format-zero-length   -mno-aes -mno-avx 
-std=iso
9899:1999 -c nvidia-modeset-freebsd.c -o nvidia-modeset-freebsd.o
In file included from nvidia-modeset-freebsd.c:12:
/usr/src/sys/sys/module.h:262:13: error: use of undeclared identifier
'MAXPATHLEN'
        char            name[MAXMODNAME];
                             ^
/usr/src/sys/sys/module.h:258:20: note: expanded from macro 'MAXMODNAME'
#define MAXMODNAME      MAXMODNAMEV3
                        ^
/usr/src/sys/sys/module.h:257:22: note: expanded from macro 'MAXMODNAMEV3'
#define MAXMODNAMEV3    MAXPATHLEN
                        ^
1 error generated.
*** Error code 1

-- 
You are receiving this mail because:
You are the assignee for the bug.