x11/nvidia-driver: cc1: error: /src: No such file or directory
Pan Tsu
inyaoo at gmail.com
Tue May 10 09:40:18 UTC 2011
"Hartmann, O." <ohartman at mail.zedat.fu-berlin.de> writes:
[...]
> cc -O2 -pipe -march=native -DNV_VERSION_STRING=\"256.53\" -D__KERNEL__
> -DNVRM -O -mcmodel=kernel -mno-red-zone -UDEBUG -U_DEBUG -DNDEBUG
> -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/src
> -I. -I@ -I@/contrib/altq -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000 -fno-common
> -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387
> -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls
> -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
> -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
> -fformat-extensions -Wmissing-include-dirs -c nvidia_ctl.c
> cc1: error: /src: No such file or directory
> *** Error code 1
FYI, warnings can be ignored via WERROR= (kernel) or NO_WERROR= (world).
On /head at r221320 for kernel sources -Wmissing-include-dirs was added to
force people to provide valid include directories.
# list of Makefiles that don't define NVIDIA_ROOT before using
$ grep -L 'NVIDIA_ROOT\s*=' **/Makefile | xargs fgrep -H NVIDIA_ROOT
src/Makefile:CFLAGS+= -I${NVIDIA_ROOT}/src -DNV_VERSION_STRING=\"270.41.06\"
It can be fixed by either providing default definition in port's Makefile
MAKE_ENV+= NVIDIA_ROOT=${WRKSRC}
or removing NVIDIA_ROOT from there
# expand undefined NVIDIA_ROOT
${REINPLACE_CMD} -e 's|$${NVIDIA_ROOT}|${WRKSRC}|' ${WRKSRC}/src/Makefile
Either way I think the following patch should be sent to the vendor.
%%
--- src/Makefile~
+++ src/Makefile
@@ -3,6 +3,8 @@
# Generated on 'swio-display-x86-rhel47-06.nvidia.com' on Mon Apr 18 14:48:43 PDT 2011.
#
+NVIDIA_ROOT= ${.CURDIR}/..
+
OSOBJ= nv-freebsd.o
KMOD= nvidia
RMOBJ= nv-kernel.o
%%
More information about the freebsd-ports
mailing list