From owner-freebsd-ports@FreeBSD.ORG Sat Aug 27 12:01:59 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D43271065678 for ; Sat, 27 Aug 2011 12:01:59 +0000 (UTC) (envelope-from ttsestt@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id AA2C78FC18 for ; Sat, 27 Aug 2011 12:01:59 +0000 (UTC) Received: by pzk33 with SMTP id 33so13321160pzk.18 for ; Sat, 27 Aug 2011 05:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=uQc8v/dOKmtiK/QFIYe6i/iqPsqvVO8NPfDiGpyLrVI=; b=YINWWFwPcTIGVXKDULV72K0vhAsnsy1Cs2lfBWiuUc0IQtE13r3D+Xog73aC87Sa6t /iYPqWMdYC2te48Ofs0nKyr+vxIvxD4bzf7zi8fZIZ8oeKPRKHTiOjhNUBEPDQKaURUe akgyCqY3tiD/omPeVfOeHyDTyarTUHYaBzSX4= Received: by 10.143.79.8 with SMTP id g8mr1184501wfl.365.1314446105480; Sat, 27 Aug 2011 04:55:05 -0700 (PDT) Received: from localhost (tor-exit-router35-readme.formlessnetworking.net. [199.48.147.35]) by mx.google.com with ESMTPS id m1sm6709699pbf.3.2011.08.27.04.55.02 (version=SSLv3 cipher=OTHER); Sat, 27 Aug 2011 04:55:04 -0700 (PDT) From: Test Rat To: freebsd-ports@freebsd.org References: <20110826172328.67f707d7@cox.net> <1314402348.13483.6.camel@xenon> Date: Sat, 27 Aug 2011 15:54:58 +0400 In-Reply-To: (Carmel's message of "Sat, 27 Aug 2011 06:52:44 -0400") Message-ID: <867h5zt6gd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: Problem with nvidia-driver and "X" after upgrade X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2011 12:02:00 -0000 Carmel writes: > On Sat, 27 Aug 2011 01:45:48 +0200 > Michal Varga articulated: >> > So, after rebuild World/Kernel and installing same and then >> > rebuilding the nvidia-driver, all is well again. >> > >> > Now, in my not so humble opinion, there should be some sort of >> > warning in the driver dialog, or at least in the port description >> > that warns of this behavior. It could have save3d me several hours >> > of needless searching. Hours that I will never get back. :) >> > >> >> Nvdia-driver is a driver, a kernel module so to say. You built the >> driver against kernel sources that are different from your live >> kernel. You got a driver that will work with kernel corresponding to >> those sources. What kind of "warning" would you be expecting there >> and what purpose would it serve? > > This is the first time I have seen this phenomena occur. A warning when > the drive starts, or should I say tries to start, that there is a > mismatch would have been nice. I was not aware that the driver had been > rebuild and therefore wasted valuable time tracking down the problem. > Even the warning that I received when manually attempting to load the > driver was not displayed when booting up, unless it flew past the > screen faster than I could view it, nor was it listed in the system > log. The Xorg log simply stated it couldn't load the module, which is > in itself a start. I am assuming that if the module cannot give a proper > reason for its failure to load then the Xorg log really has nothing to > log. That is just an unproven assumption though. Try any module under /usr/share/examples/kld. According to they'd only load if __FreeBSD_version in /usr/src/sys/sys/param.h is less or equal to kern.osreldate. How this is specific to nvidia-driver? Well, you can cache version and set IGNORE if sources do not match, e.g. %% Index: Mk/bsd.port.mk =================================================================== RCS file: /a/.csup/ports/Mk/bsd.port.mk,v retrieving revision 1.692 diff -u -p -r1.692 bsd.port.mk --- Mk/bsd.port.mk 12 Aug 2011 16:39:23 -0000 1.692 +++ Mk/bsd.port.mk 27 Aug 2011 11:53:59 -0000 @@ -1188,10 +1188,19 @@ OSREL!= ${UNAME} -r | ${SED} -e 's/[-(]. # Get __FreeBSD_version .if !defined(OSVERSION) .if exists(/usr/include/sys/param.h) -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h -.elif exists(${SRC_BASE}/sys/sys/param.h) -OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h -.else +OSVERSION_INC!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h +OSVERSION?= ${OSVERSION_INC} +.endif +.if exists(${SRC_BASE}/sys/sys/param.h) +OSVERSION_SRC!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h +OSVERSION?= ${OSVERSION_SRC} +.endif +.if (defined(OSVERSION_INC) && defined(OSVERSION_SRC)) && \ + ${OSVERSION_INC} != ${OSVERSION_SRC} +IGNORE= world/kernel sources do not match installed system +.endif +# allow building for different version inside jail/chroot +.if !defined(OSVERSION) OSVERSION!= ${SYSCTL} -n kern.osreldate .endif .endif %%