Problem re-compiling nvidia-driver

Henrik Friedrichsen henrik at cheat-project.com
Sat Dec 1 15:48:57 PST 2007


On Sat, Dec 01, 2007 at 04:16:31PM -0500, Frank wrote:
> I am trying to rebuild nvidia-driver using portupgrade to match a newer 
> kernel and in the Makefile is the statement:
> 
> # Building with -Werror requires prototype for suser()
>         ${REINPLACE_CMD} -e '15s,^,#include <sys/priv.h>,' \
>                 ${WRKSRC}/src/nvidia_os.c
> 
> The error I get during build is:
> 
> cc -O2 -fno-strict-aliasing -pipe -DNV_VERSION_STRING=\"100.14.19\" 
> -D__KERNEL__ -DNVRM -UDEBUG -U_DEBUG -DNDEBUG -O -Werror -D_KERNEL 
> -DKLD_MODULE -nostdinc -I-  -I/src -I. -I@ -I@/contrib/altq -I@/../include 
> -I/usr/include -finline-limit=8000 -fno-common  -mno-align-long-strings 
> -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 
> -ffreestanding -Wall -Wredundant-decls -Wnested-externs 
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
> -Wcast-qual  -fformat-extensions -std=c99 -c nvidia_os.c
> nvidia_os.c:15:22: sys/priv.h: No such file or directory
> *** Error code 1
> 
> Stop in 
> /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-100.14.19/src.
> *** Error code 1
> 
> Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-100.14.19.
> *** Error code 1
> 
> Stop in /usr/ports/x11/nvidia-driver.
> *** Error code 1
> 
> Stop in /usr/ports/x11/nvidia-driver.
>         ! x11/nvidia-driver (nvidia-driver-100.14.19)   (missing header)
> --->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
> 
> Yup, that's right, portupgrade!  I don't have it.  When I try with priv.h 
> copied from another system that has it, I get:
> 
> cc -O2 -fno-strict-aliasing -pipe -DNV_VERSION_STRING=\"100.14.19\" 
> -D__KERNEL__ -DNVRM -UDEBUG -U_DEBUG -DNDEBUG -O -Werror -D_KERNEL 
> -DKLD_MODULE -nostdinc -I-  -I/src -I. -I@ -I@/contrib/altq -I@/../include 
> -I/usr/include -finline-limit=8000 -fno-common  -mno-align-long-strings 
> -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 
> -ffreestanding -Wall -Wredundant-decls -Wnested-externs 
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline 
> -Wcast-qual  -fformat-extensions -std=c99 -c nvidia_os.c
> In file included from nvidia_os.c:15:
> @/sys/priv.h:473: warning: redundant redeclaration of 'suser'
> @/sys/systm.h:227: warning: previous declaration of 'suser' was here
> @/sys/priv.h:474: warning: redundant redeclaration of 'suser_cred'
> @/sys/systm.h:228: warning: previous declaration of 'suser_cred' was here
> *** Error code 1
> 
> Stop in 
> /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-100.14.19/src.
> *** Error code 1
> 
> Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-100.14.19.
> *** Error code 1
> 
> Stop in /usr/ports/x11/nvidia-driver.
> *** Error code 1
> 
> Stop in /usr/ports/x11/nvidia-driver.
>         ! x11/nvidia-driver (nvidia-driver-100.14.19)   (unknown build 
> error)
> --->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
> 
> Makefile revision:
> # $FreeBSD: ports/x11/nvidia-driver/Makefile,v 1.68 2007/11/24 21:55:46 
> danfe Exp $
> 
> uname -a:
> FreeBSD Ace 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #3: Sat Nov 10 11:55:05 
> EST 2007     frank_s at Ace:/usr/obj/usr/src/sys/Ace  i386
> 
> What can I do to fix this?
> 
> Thanks,
> --
> Frank
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"

I had the same problem, but instead I inserted an empty priv.h. Works like a charm!


More information about the freebsd-ports mailing list