Bug 124407 - x11/nvidia-driver build broken on 6-STABLE
Summary: x11/nvidia-driver build broken on 6-STABLE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-09 06:50 UTC by Barbara
Modified: 2008-06-18 20:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara 2008-06-09 06:50:00 UTC
Trying to upgrade to the last nvidia-driver version from ports I'm
getting an error.
I think that it's related to the changes on pmap merged on RELENG_6
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/include/pmap.h#rev1.117.2.3
Sorry but at the moment I can't investigate further.
The following is my kern.osreldate but probably it can apply to earlier versions too.

# sysctl -n kern.
osreldate
603103

This is the output:

# cd /usr/ports/x11/nvidia-driver &&
make
===>  Found saved configuration for nvidia-driver-173.14.05
===> 
Extracting for nvidia-driver-173.14.05
=> MD5 Checksum OK for NVIDIA-FreeBSD-
x86-173.14.05.tar.gz.
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86-173.14.05.
tar.gz.
===>  Patching for nvidia-driver-173.14.05
===>  Applying FreeBSD
patches for nvidia-driver-173.14.05
===>   nvidia-driver-173.14.05 depends on
shared library: X11.6 - found
===>   nvidia-driver-173.14.05 depends on shared
library: m.3 - found
===>   nvidia-driver-173.14.05 depends on shared library:
GL.1 - found
===>  Configuring for nvidia-driver-173.14.05
===>  Building for
nvidia-driver-173.14.05
===> 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 -march=athlon-mp -
DNV_VERSION_STRING=\"173.14.05\" -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_ctl.c
In file included from nvidia_ctl.c:14:
./nv-freebsd.h:
289: warning: static declaration of 'pmap_mapdev_attr' follows non-static
declaration
./machine/pmap.h:370: warning: previous declaration of
'pmap_mapdev_attr' was here
*** Error code 1

Stop in /usr/ports/x11/nvidia-
driver/work/NVIDIA-FreeBSD-x86-173.14.05/src.
*** Error code 1

Stop in
/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-173.14.05.
*** Error code
1

Stop in /usr/ports/x11/nvidia-driver.
*** Error code 1

Stop in
/usr/ports/x11/nvidia-driver.

How-To-Repeat: on a recent 6-STABLE
# cd /usr/ports/x11/nvidia-driver && make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-06-09 06:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->danfe

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Barbara 2008-06-09 23:31:04 UTC
Sorry but the output of the make command I've posted is not correct: this is 
what I've got trying to create a patch but I was in hurry...

This is the 
relevant part of the correct one:
# make clean
...
cc -O2 -pipe -fno-strict-
aliasing -march=athlon-mp -DNV_VERSION_STRING=\"173.14.05\" -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_ctl.c
In file 
included from nvidia_ctl.c:14:
./nv-freebsd.h:273: warning: static declaration 
of 'pmap_change_attr' follows non-static declaration
./machine/pmap.h:362: 
warning: previous declaration of 'pmap_change_attr' was here
./nv-freebsd.h:
289: warning: static declaration of 'pmap_mapdev_attr' follows non-static 
declaration
./machine/pmap.h:370: warning: previous declaration of 
'pmap_mapdev_attr' was here
*** Error code 1


So I had a successful build 
after applying the following patch (I hope that the kern.osreldate is 
correct.):
# cat /usr/ports/x11/nvidia-driver/files/patch-src::nv-freebsd.h 

--- src/nv-freebsd.h.orig       2008-05-19 09:30:01.000000000 +0200
+++ src/nv-
freebsd.h    2008-06-09 23:17:42.000000000 +0200
@@ -271,7 +271,7 @@
 #define 
PAT_WRITE_BACK          0x06
 #endif
 
-#if __FreeBSD_version < 700055
+#if 
__FreeBSD_version < 603103 || __FreeBSD_version >= 700000 && __FreeBSD_version 
< 700055
 static inline int pmap_change_attr(vm_offset_t va, vm_size_t size, 
int mode)
 {
     vm_offset_t tmp;
@@ -310,7 +310,7 @@
 
 static inline void 
pmap_unmapdev_attr(vm_offset_t va, vm_size_t size)
 {
-#if __FreeBSD_version < 
700055
+#if __FreeBSD_version < 603103 || __FreeBSD_version >= 700000 && 
__FreeBSD_version < 700055
     vm_offset_t tmp;
 
     if (va != 0) {
Comment 3 edwin 2008-06-12 01:57:16 UTC
Found this on #bsdports:

--- Makefile.orig       2008-06-07 07:32:27.000000000 +1100
+++ Makefile    2008-06-12 11:43:54.000000000 +1100
@@ -88,7 +88,7 @@
 .endif
 # Correct prototypes to fix the build with FreeBSD AGP support
 .if ${NVVERSION} >= 1690700
-       ${REINPLACE_CMD} -e '337,338s/(/(nv_stack_t *, /' \
+       ${REINPLACE_CMD} -e '406,407s/(/(nv_stack_t *, /' \
                ${WRKSRC}/src/nv-freebsd.h
 .endif
 .if defined(WITH_FREEBSD_AGP)

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-06-12 11:18:26 UTC
danfe       2008-06-12 10:18:21 UTC

  FreeBSD ports repository

  Modified files:
    x11/nvidia-driver    Makefile 
  Log:
  - Fix the build on recent 6-STABLE [1]
  - Fix the build with FreeBSD AGP [2]
  
  PR:     ports/124407 [1], ports/124497 [2]
  Also submitted by:      ale [1]
  
  Revision  Changes    Path
  1.78      +6 -1      ports/x11/nvidia-driver/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2008-06-18 20:49:58 UTC
State Changed
From-To: open->closed

Fixed with rev. 1.78 of Makefile.