From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Mar 15 03:50:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3289F151 for ; Fri, 15 Mar 2013 03:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 163CEDF1 for ; Fri, 15 Mar 2013 03:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2F3o0BB032054 for ; Fri, 15 Mar 2013 03:50:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2F3o0TM032053; Fri, 15 Mar 2013 03:50:00 GMT (envelope-from gnats) Resent-Date: Fri, 15 Mar 2013 03:50:00 GMT Resent-Message-Id: <201303150350.r2F3o0TM032053@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Wolfskill Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6331FFD4; Fri, 15 Mar 2013 03:43:17 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB06DAC; Fri, 15 Mar 2013 03:43:16 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.6/8.14.6) with ESMTP id r2F3h9dN063044; Thu, 14 Mar 2013 20:43:09 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.6/8.14.6/Submit) id r2F3h9tN063043; Thu, 14 Mar 2013 20:43:09 -0700 (PDT) (envelope-from david) Message-Id: <201303150343.r2F3h9tN063043@albert.catwhisker.org> Date: Thu, 14 Mar 2013 20:43:09 -0700 (PDT) From: David Wolfskill To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/176980: x11/nvidia-driver build fails on head @r248084 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: David Wolfskill List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 03:50:01 -0000 >Number: 176980 >Category: ports >Synopsis: x11/nvidia-driver build fails on head @r248084 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 15 03:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: David Wolfskill >Release: FreeBSD 10.0-CURRENT i386 >Organization: Wolfskill & Dowling Residence >Environment: System: FreeBSD g1-235.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #832 r248033M/248035: Fri Mar 8 07:36:04 PST 2013 root@localhost:/usr/obj/usr/src/sys/CANARY i386 >Description: r248084 made some changes in src/sys/vm/vm_pager that break the build of ports/x11/nvidia-driver (as of r312359). >How-To-Repeat: Update ports to at least r312359 and src to at least r248084; while running head (10.0-CURRENT) built from those sources, attempt to build ports/x11/nvidia-driver (e.g., "portmaster x11/nvidia-driver"). I originally wrote this as seen in . >Fix: The below patch allows the port to build under both head and stable/9. It is, however, possible that I've failed to get the OSVERSION quite right. Index: x11/nvidia-driver/Makefile --- x11/nvidia-driver/Makefile 2013-03-09 07:11:03.000000000 -0800 +++ x11/nvidia-driver/Makefile 2013-03-09 06:48:18.000000000 -0800 @@ -86,6 +86,10 @@ PLIST_SUB+= LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \ MODULESDIR=${MODULESDIR} +. if ${OSVERSION} > 1000028 +EXTRA_PATCHES+= ${FILESDIR}/r248084-patch-src-nv-freebsd.h +EXTRA_PATCHES+= ${FILESDIR}/r248084-patch-src-nvidia_subr.c +. endif .if ${PORT_OPTIONS:MLINUX} CONFLICTS= linux[-_]dri-[0-9]* linux-f10-dri-[0-9]* Index: x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h --- x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h 1969-12-31 16:00:00.000000000 -0800 +++ x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h 2013-03-09 06:39:54.000000000 -0800 @@ -0,0 +1,10 @@ +--- src/nv-freebsd.h.orig 2013-01-14 14:38:44.000000000 -0800 ++++ src/nv-freebsd.h 2013-03-09 06:36:23.000000000 -0800 +@@ -77,6 +77,7 @@ + #include + #include + #include ++#include + #include + #include + Index: x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c --- x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c 1969-12-31 16:00:00.000000000 -0800 +++ x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c 2013-03-09 06:48:53.000000000 -0800 @@ -0,0 +1,56 @@ +--- src/nvidia_subr.c.orig 2013-01-14 14:38:44.000000000 -0800 ++++ src/nvidia_subr.c 2013-03-09 06:47:05.000000000 -0800 +@@ -83,7 +83,7 @@ + if (!sc->BAR_objects[i]) + goto failed; + +- VM_OBJECT_LOCK(sc->BAR_objects[i]); ++ VM_OBJECT_WLOCK(sc->BAR_objects[i]); + switch (i) { + case NV_GPU_BAR_INDEX_FB: + vm_object_set_memattr(sc->BAR_objects[i], +@@ -95,7 +95,7 @@ + VM_MEMATTR_UNCACHEABLE); + break; + } +- VM_OBJECT_UNLOCK(sc->BAR_objects[i]); ++ VM_OBJECT_WUNLOCK(sc->BAR_objects[i]); + } + } + +@@ -541,9 +541,9 @@ + goto failed; + } + +- VM_OBJECT_LOCK(sc->UD_object); ++ VM_OBJECT_WLOCK(sc->UD_object); + vm_object_set_memattr(sc->UD_object, VM_MEMATTR_UNCACHEABLE); +- VM_OBJECT_UNLOCK(sc->UD_object); ++ VM_OBJECT_WUNLOCK(sc->UD_object); + } + + nv->flags |= NV_FLAG_OPEN; +@@ -965,9 +965,9 @@ + goto failed; + } + +- VM_OBJECT_LOCK(at->object); ++ VM_OBJECT_WLOCK(at->object); + vm_object_set_memattr(at->object, attr); +- VM_OBJECT_UNLOCK(at->object); ++ VM_OBJECT_WUNLOCK(at->object); + + *private = at; + SLIST_INSERT_HEAD(&sc->alloc_list, at, list); +@@ -1108,9 +1108,9 @@ + goto failed; + } + +- VM_OBJECT_LOCK(at->object); ++ VM_OBJECT_WLOCK(at->object); + vm_object_set_memattr(at->object, attr); +- VM_OBJECT_UNLOCK(at->object); ++ VM_OBJECT_WUNLOCK(at->object); + + *private = at; + SLIST_INSERT_HEAD(&sc->alloc_list, at, list); >Release-Note: >Audit-Trail: >Unformatted: