From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 2 23:00:09 2010 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 04A461065878 for ; Thu, 2 Sep 2010 23:00:08 +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 B04D68FC18 for ; Thu, 2 Sep 2010 23:00:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o82N08Xo063295 for ; Thu, 2 Sep 2010 23:00:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o82N08mX063280; Thu, 2 Sep 2010 23:00:08 GMT (envelope-from gnats) Resent-Date: Thu, 2 Sep 2010 23:00:08 GMT Resent-Message-Id: <201009022300.o82N08mX063280@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, Garrett Wollman Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D93DB10656F2 for ; Thu, 2 Sep 2010 22:57:34 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (hergotha.csail.mit.edu [66.92.79.170]) by mx1.freebsd.org (Postfix) with ESMTP id 8E23A8FC0C for ; Thu, 2 Sep 2010 22:57:34 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.4/8.14.4) with ESMTP id o82MN8GE064200 for ; Thu, 2 Sep 2010 18:23:08 -0400 (EDT) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.4/8.14.4/Submit) id o82MN8vc064199; Thu, 2 Sep 2010 18:23:08 -0400 (EDT) (envelope-from wollman) Message-Id: <201009022223.o82MN8vc064199@hergotha.csail.mit.edu> Date: Thu, 2 Sep 2010 18:23:08 -0400 (EDT) From: Garrett Wollman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/150235: smartmontools build system bug X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Wollman List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2010 23:00:09 -0000 >Number: 150235 >Category: ports >Synopsis: smartmontools build system bug >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 02 23:00:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 8.1-RELEASE amd64 >Organization: FreeBSD >Environment: System: FreeBSD hergotha.csail.mit.edu 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Wed Aug 25 19:31:08 EDT 2010 root@new-hergotha.csail.mit.edu:/usr/obj/usr/src/sys/HERGOTHA amd64 >Description: smartmontools' configure script unconditionally includes "-I/usr/src/sys" in CPPFLAGS, with the result that smartmontools will be miscompiled if the source tree does not match the running system. All of the header files it needs are installed in /usr/include, so this is unnecessary. >How-To-Repeat: Build smartmontools on an 8.1 system where /usr/src is 7.3. Observe how smartctl doesn't work, because it has an incorrect value for the CAMIOCOMMAND, because sizeof(struct ccb) is different in 7.3 and 8.1. (It would presumably have the same problem going the other way but I haven't tested.) >Fix: Patch the configure script. I did the following, but it's obviously silly in retrospect -- the FreeBSD section of that case statement should just be deleted entirely. --- configure.orig 2010-09-02 17:26:13.952714756 -0400 +++ configure 2010-09-02 17:26:31.877736681 -0400 @@ -4475,7 +4475,7 @@ CPPFLAGS="$CPPFLAGS -idirafter ${srcdir}/posix -idirafter ${srcdir}/os_win32" ;; *-*-freebsd*) - CPPFLAGS="$CPPFLAGS -I/usr/src/sys" + CPPFLAGS="$CPPFLAGS" ;; esac >Release-Note: >Audit-Trail: >Unformatted: