Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 May 2011 09:26:53 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Pan Tsu <inyaoo@gmail.com>
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:  <4DD2233D.8060508@zedat.fu-berlin.de>
In-Reply-To: <86bozahp1r.fsf@gmail.com>
References:  <4DC83DFC.5020801@mail.zedat.fu-berlin.de> <86bozahp1r.fsf@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/10/11 11:40, Pan Tsu wrote:
> "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
> %%

I used your suggestions and patch and it works great with 270.41.06.

Hope the new driver will find its way into the ports. I use it on both 
desktop (GTX570, GTX560Ti) and Laptop (NVS 3100M).

Thanks,

Oliver




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DD2233D.8060508>