From nobody@FreeBSD.org  Fri Feb 10 03:34:36 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2A35E1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Feb 2012 03:34:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 18E308FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Feb 2012 03:34:36 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q1A3YZjv073601
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 Feb 2012 03:34:35 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q1A3YZpn073600;
	Fri, 10 Feb 2012 03:34:35 GMT
	(envelope-from nobody)
Message-Id: <201202100334.q1A3YZpn073600@red.freebsd.org>
Date: Fri, 10 Feb 2012 03:34:35 GMT
From: bob frazier <bobf@mrp3.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: devel/libgtop fails to build with latest 8.2-STABLE kernel
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         164946
>Category:       ports
>Synopsis:       devel/libgtop fails to build with latest 8.2-STABLE kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 10 03:40:07 UTC 2012
>Closed-Date:    Sat Feb 11 16:05:39 UTC 2012
>Last-Modified:  Sat Feb 11 16:05:39 UTC 2012
>Originator:     bob frazier
>Release:        8.2-STABLE amd64
>Organization:
S.F.T. Inc.
>Environment:
FreeBSD BSDSilver.SFT.local 8.2-STABLE FreeBSD 8.2-STABLE #0: Mon Feb  6 18:42:35 PST 2012     root@BSDSilver.SFT.local:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
attempting to rebuild ports using a ports tree that built properly with a kernel from about a month ago.  libgtop failed to build due to lack of definition of the #define __FreeBSD_kernel_version .  some research revealed that this is not an issue at ALL in the previous kernel, though at least one application dependent on libgtop didn't function properly (crash on entry) which may indicate that it never really DID build correctly.

Workaround:  added the following to Makefile
CPPFLAGS+=	-D__FreeBSD_kernel_version=${OSVERSION}

this way __FreeBSD_kernel_version is defined using the OSVERSION string.  I have no idea whether or not this is really the right way to do it, but it seems like it's the most logical way to at least get it to build.



>How-To-Repeat:
fetch latest kernel/world source for 8-STABLE, install, and attempt to build devel/libgtop .


>Fix:
Workaround:  added the following to Makefile
CPPFLAGS+=	-D__FreeBSD_kernel_version=${OSVERSION}

attached patch file


Patch attached with submission follows:

--- devel/libgtop/Makefile.orig	2011-10-17 18:13:45.000000000 -0700
+++ devel/libgtop/Makefile	2012-02-09 19:22:52.000000000 -0800
@@ -29,10 +29,13 @@
 CONFIGURE_ARGS=	--disable-gtk-doc \
 		--with-html-dir=${PREFIX}/share/doc
 CPPFLAGS+=	-I${LOCALBASE}/include -DHAVE_NET_IF_VAR_H
 LDFLAGS+=	-L${LOCALBASE}/lib
 
+# added by me
+CPPFLAGS+=	-D__FreeBSD_kernel_version=${OSVERSION}
+
 INFO=		libgtop2
 
 PKGMESSAGE=	${FILESDIR}/pkg-message
 
 .include <bsd.port.pre.mk>


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: maintainer-update->change-request 
Class-Changed-By: edwin 
Class-Changed-When: Fri Feb 10 03:40:16 UTC 2012 
Class-Changed-Why:  
Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164946 
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Feb 10 03:40:21 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164946 
State-Changed-From-To: open->feedback 
State-Changed-By: marcus 
State-Changed-When: Fri Feb 10 19:24:35 UTC 2012 
State-Changed-Why:  
I strongly suspect you have an old ports tree.  The __FreeBSD_kernel_version 
macro was pulled from the port a few weeks ago. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164946 
State-Changed-From-To: feedback->closed 
State-Changed-By: marcus 
State-Changed-When: Sat Feb 11 16:05:15 UTC 2012 
State-Changed-Why:  
This was due to an out-of-date ports tree.  Libgtop is buildable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164946 
>Unformatted:
