Date: Thu, 2 Sep 2010 18:23:08 -0400 (EDT) From: Garrett Wollman <wollman@hergotha.csail.mit.edu> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/150235: smartmontools build system bug Message-ID: <201009022223.o82MN8vc064199@hergotha.csail.mit.edu> Resent-Message-ID: <201009022300.o82N08mX063280@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009022223.o82MN8vc064199>