Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2011 13:40:00 +0400
From:      Pan Tsu <inyaoo@gmail.com>
To:        "Hartmann\, O." <ohartman@mail.zedat.fu-berlin.de>
Cc:        Alexey Dokuchaev <danfe@FreeBSD.org>, freebsd-ports@freebsd.org
Subject:   Re: x11/nvidia-driver: cc1: error: /src: No such file or directory
Message-ID:  <86bozahp1r.fsf@gmail.com>
In-Reply-To: <4DC83DFC.5020801@mail.zedat.fu-berlin.de> (O. Hartmann's message of "Mon, 09 May 2011 21:18:20 %2B0200")
References:  <4DC83DFC.5020801@mail.zedat.fu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
"Hartmann, O." <ohartman@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@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
%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86bozahp1r.fsf>