From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 19 11:20:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 594861065674 for ; Thu, 19 Feb 2009 11:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3306D8FC17 for ; Thu, 19 Feb 2009 11:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1JBK0Z2053531 for ; Thu, 19 Feb 2009 11:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1JBK0tn053530; Thu, 19 Feb 2009 11:20:00 GMT (envelope-from gnats) Resent-Date: Thu, 19 Feb 2009 11:20:00 GMT Resent-Message-Id: <200902191120.n1JBK0tn053530@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, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23E95106566B; Thu, 19 Feb 2009 11:13:03 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [217.170.79.85]) by mx1.freebsd.org (Postfix) with ESMTP id A6FC68FC1D; Thu, 19 Feb 2009 11:13:01 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1La6py-0008Ti-Nk; Thu, 19 Feb 2009 14:13:02 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id ABD22117F2; Thu, 19 Feb 2009 14:12:21 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id C0B30108839; Thu, 19 Feb 2009 14:12:35 +0300 (MSK) Message-Id: <20090219111235.C0B30108839@hades.panopticon> Date: Thu, 19 Feb 2009 14:12:35 +0300 (MSK) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: danfe@FreeBSD.org Subject: ports/131873: [PATCH] x11/nvidia-driver: fix build on current and fix with recent xorg X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2009 11:20:01 -0000 >Number: 131873 >Category: ports >Synopsis: [PATCH] x11/nvidia-driver: fix build on current and fix with recent xorg >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 19 11:20:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD hades.panopticon 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Feb 10 23:56:47 MSK 2009 >Description: 1) Due to removeal of minor() on FreeBSD >= 800062 nvidia-driver won't compile any more. Changing minor() to dev2unit() fixes the problem 2) After the latest Xorg update, X server won't start any more with following errors: (II) Loading /usr/local/lib/xorg/modules//libwfb.so dlopen: /usr/local/lib/xorg/modules//libwfb.so: Undefined symbol "miZeroLineScreenIndex" (EE) Failed to load /usr/local/lib/xorg/modules//libwfb.so (II) UnloadModule: "wfb" (EE) Failed to load module "wfb" (loader failed, 7) This is caused by driver replacing xorg-server's /usr/local/lib/xorg/modules//libwfb.so with it's own. The fix suggested on nvidia forums is to use xorg-server's libwfb, so make the port not replace the library. This was tested on CURRENT 800062 with NVidia GeForce 9800 GT. Port maintainer (danfe@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- nvidia-driver-177.80.patch begins here --- Index: Makefile =================================================================== RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/x11/nvidia-driver/Makefile,v retrieving revision 1.86 diff -u -u -r1.86 Makefile --- Makefile 5 Jan 2009 19:42:28 -0000 1.86 +++ Makefile 19 Feb 2009 11:03:47 -0000 @@ -88,6 +88,11 @@ 's/suser(CURTHREAD)/priv_check(CURTHREAD, PRIV_DRIVER)/' \ ${WRKSRC}/src/nvidia_os.c .endif +# Removeal of minor() +.if ${OSVERSION} >= 800062 + ${REINPLACE_CMD} -e 's,minor(,dev2unit(,' \ + ${WRKSRC}/src/nvidia_dev.c ${WRKSRC}/src/nvidia_subr.c +.endif .if defined(WITH_FREEBSD_AGP) ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ ${WRKSRC}/src/nv-freebsd.h @@ -119,10 +124,10 @@ @${MKDIR} ${PREFIX}/${MODULESDIR}/drivers # xorg-server-1.4 installs its own ${LOCALBASE}/lib/xorg/modules/libwfb.so, # so back it up so it can be later restored similarly to what NVidia does: -.if ${NVVERSION} >= 974600 - @${MV} -f ${PREFIX}/${MODULESDIR}/libwfb.so \ - ${PREFIX}/${MODULESDIR}/XXX-libwfb.so.%%.${XSERVVERSION} -.endif +#.if ${NVVERSION} >= 974600 +# @${MV} -f ${PREFIX}/${MODULESDIR}/libwfb.so \ +# ${PREFIX}/${MODULESDIR}/XXX-libwfb.so.%%.${XSERVVERSION} +#.endif post-install: # pkg-plist is already overbloated, so use this hack instead of PLIST_SUB's Index: pkg-plist =================================================================== RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/x11/nvidia-driver/pkg-plist,v retrieving revision 1.22 diff -u -u -r1.22 pkg-plist --- pkg-plist 21 Oct 2008 01:57:21 -0000 1.22 +++ pkg-plist 19 Feb 2009 11:02:54 -0000 @@ -35,8 +35,8 @@ @unexec rm -f %D/lib/libnvidia-tls.so lib/libXvMCNVIDIA.a %%MODULESDIR%%/libnvidia-wfb.so.1 -@exec mv -f %D/%%MODULESDIR%%/libwfb.so %D/%%MODULESDIR%%/XXX-libwfb.so.%%%%.%%XSERVVERSION%% && ln -sf libnvidia-wfb.so.1 %D/%%MODULESDIR%%/libwfb.so -@unexec mv -f %D/%%MODULESDIR%%/XXX-libwfb.so.%%%%.%%XSERVVERSION%% %D/%%MODULESDIR%%/libwfb.so +@comment @exec mv -f %D/%%MODULESDIR%%/libwfb.so %D/%%MODULESDIR%%/XXX-libwfb.so.%%%%.%%XSERVVERSION%% && ln -sf libnvidia-wfb.so.1 %D/%%MODULESDIR%%/libwfb.so +@comment @unexec mv -f %D/%%MODULESDIR%%/XXX-libwfb.so.%%%%.%%XSERVVERSION%% %D/%%MODULESDIR%%/libwfb.so %%MODULESDIR%%/drivers/nvidia_drv.o %%MODULESDIR%%/drivers/nvidia_drv.so %%MODULESDIR%%/extensions/libglx.so.1 --- nvidia-driver-177.80.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: