From nobody@FreeBSD.org  Mon Apr 28 10:55:21 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 93E61DBF
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Apr 2014 10:55:21 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 7F92A1927
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Apr 2014 10:55:21 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SAtKJd089026
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Apr 2014 10:55:20 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3SAtKhT089017;
	Mon, 28 Apr 2014 10:55:20 GMT
	(envelope-from nobody)
Message-Id: <201404281055.s3SAtKhT089017@cgiserv.freebsd.org>
Date: Mon, 28 Apr 2014 10:55:20 GMT
From: Dmitry Afanasiev <KOT@MATPOCKuH.Ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: emulators/virtualbox-ose-kmod fails to build on freebsd10/i386
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         189068
>Category:       ports
>Synopsis:       emulators/virtualbox-ose-kmod fails to build on freebsd10/i386
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vbox
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 28 11:00:00 UTC 2014
>Closed-Date:    Mon Apr 28 15:02:00 UTC 2014
>Last-Modified:  Mon Apr 28 15:10:01 UTC 2014
>Originator:     Dmitry Afanasiev
>Release:        10.0-STABLE
>Organization:
>Environment:
FreeBSD meow 10.0-STABLE FreeBSD 10.0-STABLE #5 r264761: Wed Apr 23 21:55:28 MSK 2014     root@meow:/usr/obj/usr/src/sys/meow  i386
>Description:
The problem, reported by me in ports/183739, was not fully fixed.
Building virtualbox-ose-kmod-4.3.10 now fails with:
--- SUPDrv.o ---
In file included from SUPDrv.c:57:
include/iprt/x86.h:967:1: error: "MSR_IA32_FEATURE_CONTROL" redefined
In file included from ./machine/specialreg.h:6,
                 from ./machine/atomic.h:37,
                 from @/sys/systm.h:41,
                 from @/sys/libkern.h:39,
                 from include/iprt/string.h:67,
                 from SUPDrvInternal.h:43,
                 from SUPDrv.c:32:
./x86/specialreg.h:354:1: error: this is the location of the previous definition

As I know, problem affects only FreeBSD10 on i386.
>How-To-Repeat:

>Fix:
Correct emulators/virtualbox-ose/files/patch-include-iprt-x86.h attached

Patch attached with submission follows:

--- include/iprt/x86.h.orig	2014-02-25 11:59:50.000000000 -0500
+++ include/iprt/x86.h	2014-03-11 16:46:08.000000000 -0400
@@ -35,6 +35,16 @@
 # pragma D depends_on library vbox-types.d
 #endif
 
+/* Workaround for FreeBSD machine/specialreg.h defining MSRs */
+#ifdef RT_OS_FREEBSD
+# undef MSR_P5_MC_ADDR
+# undef MSR_P5_MC_TYPE
+# undef MSR_IA32_PLATFORM_ID
+# undef MSR_BBL_CR_CTL3
+# undef MSR_IA32_MISC_ENABLE
+# undef MSR_IA32_FEATURE_CONTROL
+#endif
+
 /* Workaround for Solaris sys/regset.h defining CS, DS */
 #ifdef RT_OS_SOLARIS
 # undef CS


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->vbox 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Apr 28 11:00:08 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=189068 
State-Changed-From-To: open->closed 
State-Changed-By: decke 
State-Changed-When: Mon Apr 28 15:01:59 UTC 2014 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=189068 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/189068: commit references a PR
Date: Mon, 28 Apr 2014 15:01:36 +0000 (UTC)

 Author: decke
 Date: Mon Apr 28 15:01:33 2014
 New Revision: 352508
 URL: http://svnweb.freebsd.org/changeset/ports/352508
 QAT: https://qat.redports.org/buildarchive/r352508/
 
 Log:
   - Add undef MSR_IA32_FEATURE_CONTROL for FreeBSD 10.0/i386
   
   PR:		ports/189068
   Submitted by:	Dmitry Afanasiev <KOT@MATPOCKuH.Ru>
 
 Modified:
   head/emulators/virtualbox-ose/files/patch-include-iprt-x86.h
 
 Modified: head/emulators/virtualbox-ose/files/patch-include-iprt-x86.h
 ==============================================================================
 --- head/emulators/virtualbox-ose/files/patch-include-iprt-x86.h	Mon Apr 28 14:38:51 2014	(r352507)
 +++ head/emulators/virtualbox-ose/files/patch-include-iprt-x86.h	Mon Apr 28 15:01:33 2014	(r352508)
 @@ -1,6 +1,6 @@
  --- include/iprt/x86.h.orig	2014-02-25 11:59:50.000000000 -0500
  +++ include/iprt/x86.h	2014-03-11 16:46:08.000000000 -0400
 -@@ -35,6 +35,15 @@
 +@@ -35,6 +35,16 @@
   # pragma D depends_on library vbox-types.d
   #endif
   
 @@ -11,6 +11,7 @@
  +# undef MSR_IA32_PLATFORM_ID
  +# undef MSR_BBL_CR_CTL3
  +# undef MSR_IA32_MISC_ENABLE
 ++# undef MSR_IA32_FEATURE_CONTROL
  +#endif
  +
   /* Workaround for Solaris sys/regset.h defining CS, DS */
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
