From nobody@FreeBSD.org  Mon Jun  9 05:42:53 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0719E106567D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  9 Jun 2008 05:42:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DC3A78FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  9 Jun 2008 05:42:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m595gqKP009530
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 9 Jun 2008 05:42:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m595gq27009529;
	Mon, 9 Jun 2008 05:42:52 GMT
	(envelope-from nobody)
Message-Id: <200806090542.m595gq27009529@www.freebsd.org>
Date: Mon, 9 Jun 2008 05:42:52 GMT
From: barbara <barbara.xxx1975@libero.it>
To: freebsd-gnats-submit@FreeBSD.org
Subject: x11/nvidia-driver build broken on 6-STABLE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         124407
>Category:       ports
>Synopsis:       x11/nvidia-driver build broken on 6-STABLE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    danfe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 09 05:50:00 UTC 2008
>Closed-Date:    Wed Jun 18 19:51:17 UTC 2008
>Last-Modified:  Wed Jun 18 19:51:17 UTC 2008
>Originator:     barbara
>Release:        6-STABLE
>Organization:
>Environment:
FreeBSD satanasso.local.net 6.3-STABLE FreeBSD 6.3-STABLE #0: Fri Jun  6 23:51:16 CEST 2008     root@satanasso.local.net:/usr/obj/usr/src/sys/REGULUS  i386
>Description:
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
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->danfe 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Jun 9 05:50:08 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124407 

From: "barbara.xxx1975@libero.it" <barbara.xxx1975@libero.it>
To: bug-followup@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc: danfe@FreeBSD.org
Subject: Re: ports/124407: x11/nvidia-driver build broken on 6-STABLE
Date: Tue, 10 Jun 2008 00:31:04 +0200 (CEST)

 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) {
 
 

From: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: ports/124407: x11/nvidia-driver build broken on 6-STABLE
Date: Thu, 12 Jun 2008 10:57:16 +1000

 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/

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/124407: commit references a PR
Date: Thu, 12 Jun 2008 10:18:26 +0000 (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"
 
State-Changed-From-To: open->closed 
State-Changed-By: danfe 
State-Changed-When: Wed Jun 18 19:49:58 UTC 2008 
State-Changed-Why:  
Fixed with rev. 1.78 of Makefile. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=124407 
>Unformatted:
