nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA FreeBSD (http://www.nvnews.net/vbulletin/forumdisplay.php?f=47)
-   -   x11/nvidia-driver does not compile on current (http://www.nvnews.net/vbulletin/showthread.php?t=127292)

rhurlin 02-01-09 06:49 AM

x11/nvidia-driver does not compile on current
 
I asked this before on ports@freebsd.org but got no answer. Perhaps here someone could help.

On newest FreeBSD 8.0-CURRENT with up to date Xorg I am not able to compile x11/nvidia-driver on different machines any more. This is what I get:

-------------------------------------------------------------
/usr/ports/x11/nvidia-driver#make
===> Vulnerability check disabled, database not found
===> Found saved configuration for nvidia-driver-177.80
===> Extracting for nvidia-driver-177.80
=> MD5 Checksum OK for NVIDIA-FreeBSD-x86-177.80.tar.gz.
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86-177.80.tar.gz.
===> Patching for nvidia-driver-177.80
===> Applying FreeBSD patches for nvidia-driver-177.80
===> nvidia-driver-177.80 depends on shared library: X11.6 - found
===> nvidia-driver-177.80 depends on shared library: m.3 - found
===> nvidia-driver-177.80 depends on shared library: GL.1 - found
===> Configuring for nvidia-driver-177.80
===> Building for nvidia-driver-177.80
===> src (all)
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"177.80\" -D__KERNEL__ -DNVRM -UDEBUG -U_DEBUG -DNDEBUG -O -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 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -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 -c nvidia_ctl.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"177.80\" -D__KERNEL__ -DNVRM -UDEBUG -U_DEBUG -DNDEBUG -O -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 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -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 -c nvidia_dev.c
nvidia_dev.c: In function 'nvidia_dev_open':
nvidia_dev.c:43: error: invalid operands to binary &
nvidia_dev.c: In function 'nvidia_dev_close':
nvidia_dev.c:68: error: invalid operands to binary &
nvidia_dev.c: In function 'nvidia_dev_ioctl':
nvidia_dev.c:91: error: invalid operands to binary &
nvidia_dev.c: In function 'nvidia_dev_poll':
nvidia_dev.c:115: error: invalid operands to binary &
nvidia_dev.c: In function 'nvidia_dev_mmap':
nvidia_dev.c:149: error: invalid operands to binary &
*** Error code 1
Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-177.80/src.
*** Error code 1
Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-177.80.
*** Error code 1
Stop in /usr/ports/x11/nvidia-driver.
*** Error code 1
Stop in /usr/ports/x11/nvidia-driver.
-------------------------------------------------------------

Obviously there is something wrong with nvidia_dev.c, perhaps a header file has to adapt on newest current or xorg?

Let me know, if I can send more information or test something.
Any help is appreciated.

Many thanks,
Rainer Hurling

arundel 02-01-09 01:22 PM

Re: x11/nvidia-driver does not compile on current
 
same problem here.

zander 02-01-09 10:23 PM

Re: x11/nvidia-driver does not compile on current
 
I took a quick look at recent kernel changes. From what I could see, replacing the minor() calls in the NVIDIA FreeBSD graphics driver's kernel interface layer with dev2unit() calls should fix the problem. I'll take a closer look as time permits.

rhurlin 02-02-09 11:43 AM

Re: x11/nvidia-driver does not compile on current
 
Quote:

Originally Posted by zander (Post 1920326)
I took a quick look at recent kernel changes. From what I could see, replacing the minor() calls in the NVIDIA FreeBSD graphics driver's kernel interface layer with dev2unit() calls should fix the problem. I'll take a closer look as time permits.

Thank you for the hint, zander@. I tried it and changed all places from minor() to dev2unit() in the files src/nvidia_dev.c and src/nvidia_subr.c. It compiled and installed fine!

After that I had to change back the link /usr/local/lib/xorg/modules/libwfb.so from libnvidia-wfb.so.1 to XXX-libwfb.so.%%.xorg-server-1.5.3_2,1. Now I can run nvidia-driver again with newest xorg-server. I also tested some 3D apps like astro/celestia.

Is it possible to incorporate changes for FreeBSD CURRENT in the next driver version?

Thank you again,
Rainer

zander 02-02-09 03:00 PM

Re: x11/nvidia-driver does not compile on current
 
I'll make changes for inclusion in a future release, but I can't promise that it'll be the next one (I don't even have an 8.0-CURRENT system at this point).

zander 02-05-09 10:45 PM

Re: x11/nvidia-driver does not compile on current
 
For those of you interested: I made all outstanding updates I could find for FreeBSD 8.0-CURRENT and tested them on a system built this week. The changes will not be included in the next driver release, but they should make it into the one after. I can provide a patch against the upcoming release, if there's interest.

rhurlin 02-08-09 11:55 AM

Re: x11/nvidia-driver does not compile on current
 
Quote:

Originally Posted by zander (Post 1924402)
...SNIP... I can provide a patch against the upcoming release, if there's interest.

That would be nice. With a patch I could test the next release under CURRENT.

zander 02-09-09 04:40 PM

Re: x11/nvidia-driver does not compile on current
 
1 Attachment(s)
Please see the attached patch for today's 180.29 NVIDIA FreeBSD graphics driver release. The following steps illustrate how to apply the patch to the official tarball:
# tar zxf /path/to/NVIDIA-FreeBSD-x86-180.29.tar.gz
# cd NVIDIA-FreeBSD-x86-180.29/
# patch < /path/to/NVIDIA-FreeBSD-x86-180.29-3459799.diff.txt
# make clean install
If you're installing on FreeBSD 8.x-CURRENT, you will need to manually remove the sanity check from src/nv-freebsd.h.

rhurlin 02-11-09 12:15 PM

Re: x11/nvidia-driver does not compile on current
 
Quote:

Originally Posted by zander (Post 1927404)
Please see the attached patch for today's 180.29 NVIDIA FreeBSD graphics driver release. ...SNIP...

I tried the patch with version 180.29 on FreeBSD 8.0-CURRENT and it seems that all works fine.


All times are GMT -5. The time now is 02:51 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.