From peter@rulingia.com  Sat Sep 28 22:22:59 2013
Return-Path: <peter@rulingia.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id ECDB8689
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Sep 2013 22:22:59 +0000 (UTC)
	(envelope-from peter@rulingia.com)
Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 6D544263B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Sep 2013 22:22:58 +0000 (UTC)
Received: from server.rulingia.com (c220-239-237-213.belrs5.nsw.optusnet.com.au [220.239.237.213])
	by vps.rulingia.com (8.14.7/8.14.5) with ESMTP id r8SMMtpw029912
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Sep 2013 08:22:55 +1000 (EST)
	(envelope-from peter@rulingia.com)
Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1])
	by server.rulingia.com (8.14.7/8.14.7) with ESMTP id r8SMMnrT090098
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
	Sun, 29 Sep 2013 08:22:49 +1000 (EST)
	(envelope-from peter@server.rulingia.com)
Received: (from peter@localhost)
	by server.rulingia.com (8.14.7/8.14.7/Submit) id r8SMMnX4090090;
	Sun, 29 Sep 2013 08:22:49 +1000 (EST)
	(envelope-from peter)
Message-Id: <201309282222.r8SMMnX4090090@server.rulingia.com>
Date: Sun, 29 Sep 2013 08:22:49 +1000 (EST)
From: Peter Jeremy <peter@rulingia.com>
Reply-To: Peter Jeremy <peter@rulingia.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose 
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         182468
>Category:       ports
>Synopsis:       [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    vbox
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 28 22:30:00 UTC 2013
>Closed-Date:    Thu Feb 27 15:00:48 UTC 2014
>Last-Modified:  Thu Feb 27 15:00:48 UTC 2014
>Originator:     Peter Jeremy
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
n/a
>Environment:
System: FreeBSD server.rulingia.com 10.0-CURRENT FreeBSD 10.0-CURRENT #21: Wed Jul 10 19:50:48 EST 2013 root@server.rulingia.com:/var/obj/usr/src/sys/server amd64

>Description:
	emulators/virtualbox-ose builds with lang/gcc (gcc46) by default.
	As a result, the VBox executables are linked with shared libraries
	in /usr/local/lib/gcc46.  Unfortunately, that path isn't part of
	RPATH in the VBox executables so rtld attempts to use
	/usr/lib/libstdc++.so.6 instead of /usr/local/lib/gcc46/libstdc++.so.6
	which fails due to a missinng symbol.

	This is a manifestation of the problem I reported in ports/142226
	(which was never really fixed).

>How-To-Repeat:

	Build emulators/virtualbox-ose and try to run it.

>Fix:
	The following is a work-around.  It's not a proper fix but is
	no worse than the kludge in Mk/bsd.gcc.mk (which doesn't actually
	work in all cases).

Index: emulators/virtualbox-ose/Makefile
===================================================================
--- emulators/virtualbox-ose/Makefile	(revision 328569)
+++ emulators/virtualbox-ose/Makefile	(working copy)
@@ -210,7 +210,7 @@
 post-patch:
 	@${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${PREFIX}/lib/virtualbox' > ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_PATH_SHARED_LIBS = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
-	@${ECHO} 'VBOX_WITH_RUNPATH = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
+	@${ECHO} 'VBOX_WITH_RUNPATH = ${_GCC_RUNTIME}:${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk
 	@${ECHO} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gerald 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Sep 28 22:30:09 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182468 
Responsible-Changed-From-To: gerald->vbox 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Sep 29 23:05:15 UTC 2013 
Responsible-Changed-Why:  
this is actually about virtualbox. 

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

From: Volodymyr Kostyrko <c.kworr@gmail.com>
To: bug-followup@FreeBSD.org, peter@rulingia.com
Cc:  
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Date: Fri, 01 Nov 2013 15:19:32 +0200

 Isn't it easier to map libstdc++.so.6 to gcc46/libstdc++.so.6 in 
 /etc/libmap.conf?
 
 -- 
 Sphinx of black quartz, judge my vow.

From: Peter Jeremy <peter@rulingia.com>
To: Volodymyr Kostyrko <c.kworr@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable
 emulators/virtualbox-ose
Date: Sun, 3 Nov 2013 21:09:07 +1100

 --jI8keyz6grp/JLjh
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On 2013-Nov-01 15:19:32 +0200, Volodymyr Kostyrko <c.kworr@gmail.com> wrote:
 >Isn't it easier to map libstdc++.so.6 to gcc46/libstdc++.so.6 in=20
 >/etc/libmap.conf?
 
 As a general solution, definitely not - that would break programs (eg
 those compiled with the base C++) that expect libstdc++.so.6 to be the
 one in /usr/lib.
 
 As a specific solution for VBox-ose, not really.  That would require
 hand-crafting a libmap.conf entry that is only valid for one version
 of gcc and is unknown to the ports/pkg system.  It would look like it
 works up until VBox gets copied onto another system or lang/gcc changed
 to a different version.
 
 Any fix has to fit into the ports/pkg system so it gets handled automatical=
 ly
 and doesn't get lost.  Ideally, lang/gcc (etc) would be fixed so they were
 usable without having to rely on hacks in Mk/bsd.gcc.mk.
 
 --=20
 Peter Jeremy
 
 --jI8keyz6grp/JLjh
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.21 (FreeBSD)
 
 iKYEARECAGYFAlJ2IMNfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl
 bnBncC5maWZ0aGhvcnNlbWFuLm5ldDBCRjc3QTcyNTg5NEVCRTY0RjREN0VFRUZF
 OEE0N0JGRjAwRkI4ODcACgkQ/opHv/APuIdMgACZAUlD2snT239g/tUE8DAuLRiX
 vTAAnihkGEfsczkKjGd+dR+XS/ZDGO52
 =2rRy
 -----END PGP SIGNATURE-----
 
 --jI8keyz6grp/JLjh--

From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@bluelife.at>
To: bug-followup@FreeBSD.org, peter@rulingia.com
Cc:  
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Date: Wed, 13 Nov 2013 13:31:49 +0100

 I think the idea and approach is correct but I went for a slighly more
 conservative
 approach if _GCC_RUNTIME was not set which is true in case base gcc is used=
 .
 
 http://redports.org/changeset/19591
 
 --=20
 Bernhard Fr=F6hlich
 http://www.bluelife.at/

From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@bluelife.at>
To: bug-followup@FreeBSD.org, peter@rulingia.com
Cc:  
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Date: Fri, 15 Nov 2013 10:57:10 +0100

 There is still a very similar error when compat8x or compat9x ports are
 installed and the patch does not seem to help in that case.
 
 VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
 VirtualBox: dlopen("/usr/local/lib/virtualbox/VBoxRT.so",) failed:
 /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.15 required
 by /usr/local/lib/virtualbox/VBoxRT.so not found
 
 --=20
 Bernhard Fr=F6hlich
 http://www.bluelife.at/

From: Eitan Adler <lists@eitanadler.com>
To: =?UTF-8?Q?Bernhard_Fr=C3=B6hlich?= <decke@bluelife.at>, 
	bug-followup <bug-followup@freebsd.org>, Peter Jeremy <peter@rulingia.com>
Cc: vbox@freebsd.org
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Date: Sun, 17 Nov 2013 16:32:46 -0500

 On Wed, Nov 13, 2013 at 7:40 AM, Bernhard Fr=C3=B6hlich <decke@bluelife.at>=
  wrote:
 > The following reply was made to PR ports/182468; it has been noted by GNA=
 TS.
 >
 > From: =3D?ISO-8859-1?Q?Bernhard_Fr=3DF6hlich?=3D <decke@bluelife.at>
 > To: bug-followup@FreeBSD.org, peter@rulingia.com
 > Cc:
 > Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable emulators/v=
 irtualbox-ose
 > Date: Wed, 13 Nov 2013 13:31:49 +0100
 >
 >  I think the idea and approach is correct but I went for a slighly more
 >  conservative
 >  approach if _GCC_RUNTIME was not set which is true in case base gcc is u=
 sed=3D
 
 This can not possibly be correct as the variable begins with a "_".
 The initial proposed patch is also incorrect for a similar reason.
 _GCC_RUNTIME is not valid for use in a ports Makefile.
 
 Perhaps it would help if USE_GCC or USES=3Dcompiler exposed a variable
 indicating the runtime?
 
 
 
 --=20
 Eitan Adler

From: Peter Jeremy <peter@rulingia.com>
To: Eitan Adler <lists@eitanadler.com>
Cc: Bernhard =?iso-8859-1?Q?Fr=F6hlich?= <decke@bluelife.at>,
        bug-followup <bug-followup@freebsd.org>, vbox@freebsd.org
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable
 emulators/virtualbox-ose
Date: Fri, 22 Nov 2013 06:01:34 +1100

 --82I3+IH0IqGh5yIs
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On 2013-Nov-17 16:32:46 -0500, Eitan Adler <lists@eitanadler.com> wrote:
 >On Wed, Nov 13, 2013 at 7:40 AM, Bernhard Fr=F6hlich <decke@bluelife.at> w=
 rote:
 >>  I think the idea and approach is correct but I went for a slighly more
 >>  conservative
 >>  approach if _GCC_RUNTIME was not set which is true in case base gcc is =
 used=3D
 >
 >This can not possibly be correct as the variable begins with a "_".
 >The initial proposed patch is also incorrect for a similar reason.
 >_GCC_RUNTIME is not valid for use in a ports Makefile.
 
 I completely agree.  As I initially stated, this is solely a work-
 around for a bug in lang/gcc*.  In fact the existing use of
 _GCC_RUNTIME in bsd.gcc.mk is equally wrong and is also just a work-
 around for lang/gcc* bugs.
 
 >Perhaps it would help if USE_GCC or USES=3Dcompiler exposed a variable
 >indicating the runtime?
 
 This is not correct either.  A port using lang/gcc should not need to
 know about the compiler internals.  If code compiled with gcc46 needs
 to be linked against non-standard libraries then using gcc46 for
 linking should be sufficient - it shouldn't be necessary to add
 magic "-Wl,-rpath=3D..." options.
 
 (IMO, the whole -L/-rpath approach is broken: The runtime searchpath
 should default to the linktime searchpath.  Unfortunately, fixing that
 isn't possible).
 
 --=20
 Peter Jeremy
 
 --82I3+IH0IqGh5yIs
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.21 (FreeBSD)
 
 iKYEARECAGYFAlKOWI1fFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl
 bnBncC5maWZ0aGhvcnNlbWFuLm5ldDBCRjc3QTcyNTg5NEVCRTY0RjREN0VFRUZF
 OEE0N0JGRjAwRkI4ODcACgkQ/opHv/APuIcR4QCguG7m2cfWIDQ7Rihzecsp53yQ
 J60An1ZMVu/0W52xOuKz6COp96SYAyfs
 =49pK
 -----END PGP SIGNATURE-----
 
 --82I3+IH0IqGh5yIs--

From: =?ISO-8859-1?Q?Bernhard_Fr=F6hlich?= <decke@bluelife.at>
To: bug-followup@FreeBSD.org, peter@rulingia.com
Cc:  
Subject: Re: ports/182468: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Date: Tue, 10 Dec 2013 21:46:01 +0100

 I know that what I have committed is not the ideal solution but I
 consider it the
 best I we have right now. So I take the full blame for it. I want to
 see now if it
 improves the situation and if yes then I will talk to gerald@ to provide us=
  a
 supported variable.
 
 --=20
 Bernhard Fr=F6hlich
 http://www.bluelife.at/

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182468: commit references a PR
Date: Tue, 10 Dec 2013 20:42:52 +0000 (UTC)

 Author: decke
 Date: Tue Dec 10 20:42:40 2013
 New Revision: 336107
 URL: http://svnweb.freebsd.org/changeset/ports/336107
 
 Log:
   - Update to 4.2.20 [1]
   - Add $_GCC_RUNTIME to vbox runpath when building with gcc from ports [2]
   - Add vboxwatchdog rc.d script
   - Fix building with gcc 4.6 from ports and remove FreeBSD specific -mno-align-long-strings
   - Remove checks for EoL FreeBSD versions
   - Support staging
   - Convert LIB_DEPENDS to new shlib format
   - Adopt OPTIONS_SUB and new OPTION_CONFIGURE_ON|OFF
   
   PR:		ports/182468 [2]
   Submitted by:	Mikhail Tsatsenko [1]
 
 Added:
   head/emulators/virtualbox-ose-additions/files/patch-Config.kmk   (contents, props changed)
   head/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk   (contents, props changed)
   head/emulators/virtualbox-ose/files/vboxwatchdog.in   (contents, props changed)
 Modified:
   head/emulators/virtualbox-ose-additions/Makefile
   head/emulators/virtualbox-ose-additions/distinfo
   head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c
   head/emulators/virtualbox-ose-additions/pkg-plist
   head/emulators/virtualbox-ose-kmod/Makefile
   head/emulators/virtualbox-ose-kmod/distinfo
   head/emulators/virtualbox-ose/Makefile
   head/emulators/virtualbox-ose/distinfo
   head/emulators/virtualbox-ose/files/patch-Config.kmk
   head/emulators/virtualbox-ose/pkg-plist
 
 Modified: head/emulators/virtualbox-ose-additions/Makefile
 ==============================================================================
 --- head/emulators/virtualbox-ose-additions/Makefile	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose-additions/Makefile	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -2,7 +2,7 @@
  # $FreeBSD$
  
  PORTNAME=	virtualbox-ose
 -DISTVERSION=	4.2.18
 +DISTVERSION=	4.2.20
  CATEGORIES=	emulators
  MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
  		http://tmp.chruetertee.ch/ \
 @@ -24,6 +24,7 @@ UNIQUENAME=	${PORTNAME}${PKGNAMESUFFIX}
  WRKSRC=		${WRKDIR}/VirtualBox-${PORTVERSION}
  USE_RC_SUBR=	vboxguest vboxservice
  USES=		iconv kmod
 +USE_GCC=	any
  ONLY_FOR_ARCHS=	i386 amd64
  FETCH_ARGS=	-pRr
  USE_BZIP2=	yes
 @@ -39,6 +40,7 @@ CONFLICTS_INSTALL=	virtualbox-ose-additi
  
  OPTIONS_DEFINE=	DEBUG X11 OPENGL
  OPTIONS_DEFAULT=	X11
 +OPTIONS_SUB=	DEBUG X11 OPENGL
  
  NO_STAGE=	yes
  .include <bsd.port.options.mk>
 @@ -58,27 +60,20 @@ MAKE_FLAGS=	SYSDIR=${SRC_BASE}/sys
  KMK_FLAGS+=	BUILD_TYPE=debug
  KMK_BUILDTYPE=	debug
  MAKE_FLAGS+=	DEBUG_FLAGS="-O1 -g"
 -PLIST_SUB+=	WITH_DEBUG=""
 -.else
 -PLIST_SUB+=	WITH_DEBUG="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MX11}
  VBOX_WITH_X11=	1
  USE_XORG=	xcursor xmu inputproto xorg-server xrandr
 -PLIST_SUB+=	X11=""
  .else
  VBOX_WITH_X11=
 -PLIST_SUB+=	X11="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MOPENGL}
  USE_XORG+=	xcomposite xdamage xext xfixes
  USE_GL=		gl
 -PLIST_SUB+=	OPENGL=""
  .else
  CONFIGURE_ARGS+=--disable-opengl
 -PLIST_SUB+=	OPENGL="@comment "
  .endif
  
  .if ${ARCH} == i386
 
 Modified: head/emulators/virtualbox-ose-additions/distinfo
 ==============================================================================
 --- head/emulators/virtualbox-ose-additions/distinfo	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose-additions/distinfo	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -1,2 +1,2 @@
 -SHA256 (VirtualBox-4.2.18.tar.bz2) = 9dbddf393b029c549249f627d12040c1d257972bc09292969b8819a31ab78d74
 -SIZE (VirtualBox-4.2.18.tar.bz2) = 76893031
 +SHA256 (VirtualBox-4.2.20.tar.bz2) = 193aa3ce7c0e700fe6a12b64bf462ce633a856f1e831ee4a337cc3439b21df61
 +SIZE (VirtualBox-4.2.20.tar.bz2) = 77050211
 
 Added: head/emulators/virtualbox-ose-additions/files/patch-Config.kmk
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/emulators/virtualbox-ose-additions/files/patch-Config.kmk	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -0,0 +1,58 @@
 +--- Config.kmk.orig	2013-10-15 13:01:31.000000000 +0200
 ++++ Config.kmk	2013-10-20 14:43:19.015746151 +0200
 +@@ -3387,16 +3387,16 @@
 + 	$(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) $(VBOX_GCC_fdiagnostics-show-option) \
 + 	-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
 + 	-Wimplicit-function-declaration -Werror-implicit-function-declaration \
 +-	-O2 -fformat-extensions -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
 ++	-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
 + 	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
 + 	-nostdinc -std=c99
 +-TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
 ++TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
 + TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
 + 	-fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \
 + 	-mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -Wundef
 + TEMPLATE_VBOXR0DRV_CXXFLAGS            = -fno-exceptions -fno-rtti \
 + 	$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
 +-	-O2 -fno-format-extensions -fno-strict-aliasing -fno-common -finline-limit=8000 \
 ++	-O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
 + 	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
 + 	-nostdinc
 + TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
 +@@ -3630,8 +3630,6 @@
 + 	/usr/X11R6/include \
 + 	/usr/local/include
 + TEMPLATE_VBOXR3EXE_LIBPATH            += \
 +-	/usr/lib \
 +-	/usr/X11R6/lib \
 + 	/usr/local/lib
 +  else ifeq ($(KBUILD_TARGET),solaris)
 + TEMPLATE_VBOXR3EXE_TOOL                = GXX3PLAIN
 +@@ -4206,8 +4204,6 @@
 + 	/usr/X11R6/include \
 + 	/usr/local/include
 + TEMPLATE_VBOXMAINEXE_LIBPATH            += \
 +-	/usr/lib \
 +-	/usr/X11R6/lib \
 + 	/usr/local/lib
 + else ifeq ($(KBUILD_TARGET),solaris)
 + TEMPLATE_VBOXMAINEXE_TOOL                = GXX3PLAIN
 +@@ -4673,8 +4669,6 @@
 + 	/usr/X11R6/include \
 + 	/usr/local/include
 +     TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
 +-	/usr/lib \
 +-	/usr/X11R6/lib \
 + 	/usr/local/lib
 +    endif
 +    ifeq ($(KBUILD_TARGET),solaris)
 +@@ -4869,8 +4863,6 @@
 + 	/usr/X11R6/include \
 + 	/usr/local/include
 + TEMPLATE_VBOXBLDPROG_LIBPATH            += \
 +-	/usr/lib \
 +-	/usr/X11R6/lib \
 + 	/usr/local/lib
 +  else ifeq ($(KBUILD_HOST),solaris)
 + TEMPLATE_VBOXBLDPROG_TOOL                = GXX3PLAIN
 
 Modified: head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c
 ==============================================================================
 --- head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Additions-common-crOpenGL-fakedri_drv.c	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -1,5 +1,5 @@
 ---- src/VBox/Additions/common/crOpenGL/fakedri_drv.c.orig	2012-12-19 13:25:04.000000000 -0500
 -+++ src/VBox/Additions/common/crOpenGL/fakedri_drv.c	2013-01-27 17:57:04.000000000 -0500
 +--- src/VBox/Additions/common/crOpenGL/fakedri_drv.c.orig	2013-11-28 19:30:42.000000000 +0100
 ++++ src/VBox/Additions/common/crOpenGL/fakedri_drv.c	2013-12-06 16:03:16.000000000 +0100
  @@ -29,6 +29,15 @@
   #include <dlfcn.h>
   #include <elf.h>
 @@ -20,12 +20,12 @@
   
   //@todo this could be different...
   #ifdef RT_ARCH_AMD64
 --# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri"
 +-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/xorg/modules/dri"
  -# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
  +# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
  +# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
   #else
 --# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri"
 +-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri:/usr/lib/xorg/modules/dri"
  -# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
  +# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
  +# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
 
 Modified: head/emulators/virtualbox-ose-additions/pkg-plist
 ==============================================================================
 --- head/emulators/virtualbox-ose-additions/pkg-plist	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose-additions/pkg-plist	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -24,6 +24,6 @@ sbin/VBoxService
  %%X11%%@dirrmtry lib
  @cwd /
  %%KMODDIR%%/vboxguest.ko
 -%%WITH_DEBUG%%%%KMODDIR%%/vboxguest.ko.symbols
 +%%DEBUG%%%%KMODDIR%%/vboxguest.ko.symbols
  %%X11%%%%KMODDIR%%/vboxvideo.ko
 -%%WITH_DEBUG%%%%X11%%%%KMODDIR%%/vboxvideo.ko
 +%%DEBUG%%%%X11%%%%KMODDIR%%/vboxvideo.ko
 
 Modified: head/emulators/virtualbox-ose-kmod/Makefile
 ==============================================================================
 --- head/emulators/virtualbox-ose-kmod/Makefile	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose-kmod/Makefile	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -2,7 +2,7 @@
  # $FreeBSD$
  
  PORTNAME=	virtualbox-ose
 -DISTVERSION=	4.2.18
 +DISTVERSION=	4.2.20
  CATEGORIES=	emulators
  MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
  		http://tmp.chruetertee.ch/ \
 @@ -71,14 +71,6 @@ KMK_ARCH=	freebsd.${ARCH}
  
  .include <bsd.port.pre.mk>
  
 -.if ${OSVERSION} < 802000
 -BROKEN=		Does not compile on FreeBSD < 8.2
 -.endif
 -
 -.if ${OSVERSION} < 800500 && !empty(PORT_OPTIONS:MVIMAGE)
 -IGNORE=		newer kernel is required to build with VIMAGE
 -.endif
 -
  post-patch:
  	@${ECHO} 'VBOX_WITH_VBOXDRV = 1' > ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_WITH_NETFLT = 1' >> ${WRKSRC}/LocalConfig.kmk
 
 Modified: head/emulators/virtualbox-ose-kmod/distinfo
 ==============================================================================
 --- head/emulators/virtualbox-ose-kmod/distinfo	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose-kmod/distinfo	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -1,2 +1,2 @@
 -SHA256 (VirtualBox-4.2.18.tar.bz2) = 9dbddf393b029c549249f627d12040c1d257972bc09292969b8819a31ab78d74
 -SIZE (VirtualBox-4.2.18.tar.bz2) = 76893031
 +SHA256 (VirtualBox-4.2.20.tar.bz2) = 193aa3ce7c0e700fe6a12b64bf462ce633a856f1e831ee4a337cc3439b21df61
 +SIZE (VirtualBox-4.2.20.tar.bz2) = 77050211
 
 Modified: head/emulators/virtualbox-ose/Makefile
 ==============================================================================
 --- head/emulators/virtualbox-ose/Makefile	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose/Makefile	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -2,8 +2,7 @@
  # $FreeBSD$
  
  PORTNAME=	virtualbox-ose
 -DISTVERSION=	4.2.18
 -PORTREVISION=	1
 +DISTVERSION=	4.2.20
  CATEGORIES=	emulators
  MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
  		http://tmp.chruetertee.ch/ \
 @@ -12,7 +11,6 @@ MASTER_SITES=	http://download.virtualbox
  DISTFILES=	VirtualBox-${DISTVERSION}${EXTRACT_SUFX} ${GADISTFILES}
  EXTRACT_ONLY=	VirtualBox-${DISTVERSION}${EXTRACT_SUFX}
  
 -#for discussion please use emulation@FreeBSD.org
  MAINTAINER=	vbox@FreeBSD.org
  COMMENT=	A general-purpose full virtualizer for x86 hardware
  
 @@ -25,9 +23,9 @@ BUILD_DEPENDS=	yasm:${PORTSDIR}/devel/ya
  		kmk:${PORTSDIR}/devel/kBuild \
  		gtar:${PORTSDIR}/archivers/gtar \
  		cdrecord:${PORTSDIR}/sysutils/cdrtools
 -LIB_DEPENDS=	png15:${PORTSDIR}/graphics/png \
 -		xslt.2:${PORTSDIR}/textproc/libxslt \
 -		curl:${PORTSDIR}/ftp/curl
 +LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png \
 +		libxslt.so:${PORTSDIR}/textproc/libxslt \
 +		libcurl.so:${PORTSDIR}/ftp/curl
  RUN_DEPENDS=	${KMODDIR}/vboxdrv.ko:${PORTSDIR}/emulators/virtualbox-ose-kmod \
  		cdrecord:${PORTSDIR}/sysutils/cdrtools
  
 @@ -61,6 +59,7 @@ VBOX_GUEST_VER=	${PORTVERSION}
  
  OPTIONS_DEFINE=	QT4 DEBUG GUESTADDITIONS DBUS PULSEAUDIO UDPTUNNEL VDE VNC WEBSERVICE NLS X11
  OPTIONS_DEFAULT=	QT4 DBUS X11 UDPTUNNEL VNC
 +OPTIONS_SUB=	X11 QT4 GUESTADDITIONS VNC NLS WEBSERVICE
  DEBUG_DESC=	Debug symbols, additional logs and assertions
  QT4_DESC=	Build with QT4 Frontend
  GUESTADDITIONS_DESC=	Build with Guest Additions
 @@ -69,6 +68,18 @@ VDE_DESC=	Build with VDE support
  VNC_DESC=	Build with VNC support
  WEBSERVICE_DESC=	Build Webservice
  
 +PULSEAUDIO_LIB_DEPENDS=	libpulse.so:${PORTSDIR}/audio/pulseaudio
 +PULSEAUDIO_CONFIGURE_OFF=	--disable-pulse
 +
 +DBUS_LIB_DEPENDS=	libdbus-1.so:${PORTSDIR}/devel/dbus
 +DBUS_CONFIGURE_OFF=	--disable-dbus
 +
 +VNC_LIB_DEPENDS=	libvncserver.so:${PORTSDIR}/net/libvncserver
 +VNC_CONFIGURE_ON=	--enable-vnc
 +
 +VDE_RUN_DEPENDS=	vde_switch:${PORTSDIR}/net/vde2
 +VDE_CONFIGURE_ON=	--enable-vde
 +
  # bmake doesn't know about unsetenv=true
  .if defined(.PARSEDIR)
  ENV=
 @@ -86,8 +97,9 @@ PLIST_SUB+=	PYTHON_VER=${PYTHON_VER} \
  		PYTHON_VERU=${PYTHON_VER:S/./_/} \
  		GUEST_VER=${VBOX_GUEST_VER}
  
 -SUB_LIST+=	VBOXUSER=${VBOXUSER}
 -USE_RC_SUBR+=	vboxheadless
 +SUB_LIST+=	VBOXUSER=${VBOXUSER} \
 +		VBOXWSUSER=${VBOXWSUSER}
 +USE_RC_SUBR+=	vboxheadless vboxwatchdog
  
  KMK_BUILDTYPE=	release
  KMK_CONFIG=	VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys
 @@ -105,10 +117,8 @@ BROKEN=		QT4 frontend requires X11 suppo
  USE_SDL=	sdl
  USE_XORG=	xcursor xmu inputproto xinerama
  VBOX_FRONTENDS+=VBoxBFE VBoxSDL
 -PLIST_SUB+=	X11=""
  .else
  CONFIGURE_ARGS+=--build-headless
 -PLIST_SUB+=	X11="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MQT4}
 @@ -116,10 +126,8 @@ QT_NONSTANDARD=	yes
  USE_QT4=	gui network moc_build uic_build rcc_build linguist
  INSTALLS_ICONS=	yes
  VBOX_FRONTENDS+=VirtualBox VBoxTestOGL
 -PLIST_SUB+=	QT4=""
  .else
  CONFIGURE_ARGS+=--disable-qt4
 -PLIST_SUB+=	QT4="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MGUESTADDITIONS}
 @@ -127,9 +135,6 @@ GUESTADDITIONS=	VBoxGuestAdditions_${VBO
  GADISTFILES=	${GUESTADDITIONS}:guestadditions
  RESTRICTED=	for personal use only
  RESTRICTED_FILES=	${GUESTADDITIONS}
 -PLIST_SUB+=	GUESTADDITIONS=""
 -.else
 -PLIST_SUB+=	GUESTADDITIONS="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MDEBUG}
 @@ -137,45 +142,10 @@ KMK_BUILDTYPE=	debug
  KMK_FLAGS+=	BUILD_TYPE=debug
  .endif
  
 -.if ${PORT_OPTIONS:MDBUS}
 -LIB_DEPENDS+=	dbus-1.3:${PORTSDIR}/devel/dbus
 -.else
 -CONFIGURE_ARGS+=--disable-dbus
 -.endif
 -
 -.if ${PORT_OPTIONS:MPULSEAUDIO}
 -LIB_DEPENDS+=	pulse.0:${PORTSDIR}/audio/pulseaudio
 -.else
 -CONFIGURE_ARGS+=--disable-pulse
 -.endif
 -
 -.if ${PORT_OPTIONS:MVNC}
 -LIB_DEPENDS+=	vncserver.0:${PORTSDIR}/net/libvncserver
 -CONFIGURE_ARGS+=--enable-vnc
 -PLIST_SUB+=	VNC=""
 -.else
 -PLIST_SUB+=	VNC="@comment "
 -.endif
 -
 -.if ${PORT_OPTIONS:MNLS}
 -PLIST_SUB+=	NLS=""
 -.else
 -PLIST_SUB+=	NLS="@comment "
 -.endif
 -
 -.if ${PORT_OPTIONS:MVDE}
 -RUN_DEPENDS+=	vde_switch:${PORTSDIR}/net/vde2
 -CONFIGURE_ARGS+=--enable-vde
 -.endif
 -
  .if ${PORT_OPTIONS:MWEBSERVICE}
  BUILD_DEPENDS+=	soapcpp2:${PORTSDIR}/devel/gsoap
  VBOX_WEB=	vboxwebsrv webtest
  USE_RC_SUBR+=	vboxwebsrv
 -SUB_LIST+=	VBOXWSUSER=${VBOXWSUSER}
 -PLIST_SUB+=	WEB=""
 -.else
 -PLIST_SUB+=	WEB="@comment "
  .endif
  
  .if ${ARCH} == i386
 @@ -190,10 +160,6 @@ PLIST_SUB+=	ARCH="${KMK_ARCH}"
  
  .include <bsd.port.pre.mk>
  
 -.if ${OSVERSION} < 802000
 -BROKEN=		Does not compile on FreeBSD < 8.2
 -.endif
 -
  .if ${OSVERSION} < 900000 && ${OSVERSION} > 801500
  EXTRA_PATCHES+=	${FILESDIR}/extrapatch-src-VBox-Devices-PC-vbox.dsl
  .endif
 @@ -210,7 +176,11 @@ pre-everything::
  post-patch:
  	@${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${PREFIX}/lib/virtualbox' > ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_PATH_SHARED_LIBS = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 +.if defined(_GCC_RUNTIME)
 +	@${ECHO} 'VBOX_WITH_RUNPATH = ${_GCC_RUNTIME}:${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 +.else
  	@${ECHO} 'VBOX_WITH_RUNPATH = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 +.endif
  	@${ECHO} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk
 @@ -226,9 +196,6 @@ post-patch:
  .if ${PORT_OPTIONS:MVNC}
  	@${ECHO} 'VBOX_WITH_EXTPACK_VNC = 1' >> ${WRKSRC}/LocalConfig.kmk
  .endif
 -.if ${OSVERSION} < 800069
 -	@${ECHO} 'VBOX_WITH_USB=' >> ${WRKSRC}/LocalConfig.kmk
 -.endif
  .if ${PORT_OPTIONS:MUDPTUNNEL}
  	@${ECHO} 'VBOX_WITH_UDPTUNNEL = 1' >> ${WRKSRC}/LocalConfig.kmk
  .endif
 @@ -321,7 +288,9 @@ post-install:
  	@${FIND} ${PREFIX}/lib/virtualbox -type d -print0 | ${XARGS} -0 ${CHMOD} 755
  
  .if ${PORT_OPTIONS:MQT4}
 +	${MKDIR} ${PREFIX}/share/pixmaps/
  	${INSTALL_DATA} ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png ${PREFIX}/share/pixmaps/VBox.png
 +	${MKDIR} ${PREFIX}/share/applications/
  	${INSTALL_DATA} ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop ${PREFIX}/share/applications/virtualbox.desktop
  .endif
  	@${CAT} ${PKGMESSAGE}
 
 Modified: head/emulators/virtualbox-ose/distinfo
 ==============================================================================
 --- head/emulators/virtualbox-ose/distinfo	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose/distinfo	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -1,4 +1,4 @@
 -SHA256 (VirtualBox-4.2.18.tar.bz2) = 9dbddf393b029c549249f627d12040c1d257972bc09292969b8819a31ab78d74
 -SIZE (VirtualBox-4.2.18.tar.bz2) = 76893031
 -SHA256 (VBoxGuestAdditions_4.2.18.iso) = f11a7f13dfe7bf9f246fb877144bb467fe6deadcd876568ec79b6ccd3b59d767
 -SIZE (VBoxGuestAdditions_4.2.18.iso) = 59656192
 +SHA256 (VirtualBox-4.2.20.tar.bz2) = 193aa3ce7c0e700fe6a12b64bf462ce633a856f1e831ee4a337cc3439b21df61
 +SIZE (VirtualBox-4.2.20.tar.bz2) = 77050211
 +SHA256 (VBoxGuestAdditions_4.2.20.iso) = 2fb3aa0f370d503b0e77725dbec76b989a251f613abee378f53c1fed9d6edf01
 +SIZE (VBoxGuestAdditions_4.2.20.iso) = 59664384
 
 Modified: head/emulators/virtualbox-ose/files/patch-Config.kmk
 ==============================================================================
 --- head/emulators/virtualbox-ose/files/patch-Config.kmk	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose/files/patch-Config.kmk	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -1,6 +1,6 @@
 ---- Config.kmk.orig	2012-12-20 14:44:38.260858319 +0100
 -+++ Config.kmk	2012-12-20 14:55:59.491850177 +0100
 -@@ -3239,7 +3239,7 @@
 +--- Config.kmk.orig	2013-10-15 13:01:31.000000000 +0200
 ++++ Config.kmk	2013-10-20 14:43:19.015746151 +0200
 +@@ -3387,16 +3387,16 @@
   	$(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) $(VBOX_GCC_fdiagnostics-show-option) \
   	-Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
   	-Wimplicit-function-declaration -Werror-implicit-function-declaration \
 @@ -8,8 +8,10 @@
  +	-O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
   	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
   	-nostdinc -std=c99
 - TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
 -@@ -3248,7 +3248,7 @@
 +-TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
 ++TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
 + TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
 + 	-fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \
   	-mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -Wundef
   TEMPLATE_VBOXR0DRV_CXXFLAGS            = -fno-exceptions -fno-rtti \
   	$(VBOX_GCC_WARN) -Wpointer-arith -Winline \
 @@ -18,7 +20,7 @@
   	$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
   	-nostdinc
   TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
 -@@ -3465,8 +3465,6 @@
 +@@ -3630,8 +3630,6 @@
   	/usr/X11R6/include \
   	/usr/local/include
   TEMPLATE_VBOXR3EXE_LIBPATH            += \
 @@ -27,7 +29,7 @@
   	/usr/local/lib
    else ifeq ($(KBUILD_TARGET),solaris)
   TEMPLATE_VBOXR3EXE_TOOL                = GXX3PLAIN
 -@@ -3955,8 +3953,6 @@
 +@@ -4206,8 +4204,6 @@
   	/usr/X11R6/include \
   	/usr/local/include
   TEMPLATE_VBOXMAINEXE_LIBPATH            += \
 @@ -36,7 +38,7 @@
   	/usr/local/lib
   else ifeq ($(KBUILD_TARGET),solaris)
   TEMPLATE_VBOXMAINEXE_TOOL                = GXX3PLAIN
 -@@ -4371,8 +4367,6 @@
 +@@ -4673,8 +4669,6 @@
   	/usr/X11R6/include \
   	/usr/local/include
       TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \
 @@ -45,7 +47,7 @@
   	/usr/local/lib
      endif
      ifeq ($(KBUILD_TARGET),solaris)
 -@@ -4555,8 +4549,6 @@
 +@@ -4869,8 +4863,6 @@
   	/usr/X11R6/include \
   	/usr/local/include
   TEMPLATE_VBOXBLDPROG_LIBPATH            += \
 
 Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VirtualBox-Makefile.kmk	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -0,0 +1,13 @@
 +--- src/VBox/Frontends/VirtualBox/Makefile.kmk.orig	2013-10-16 21:47:09.588793988 +0400
 ++++ src/VBox/Frontends/VirtualBox/Makefile.kmk	2013-10-16 21:47:37.458794265 +0400
 +@@ -175,10 +175,6 @@
 + # Necessary for the hdd backend enumeration
 + VirtualBox_LIBS = $(LIB_DDU)
 + 
 +-if1of ($(KBUILD_TARGET), linux freebsd netbsd openbsd)
 +- VirtualBox_LIBS += dl
 +-endif
 +-
 + # This library is required for multi-monitor support
 + VirtualBox_LIBS.linux   += Xinerama
 + VirtualBox_LIBS.solaris += Xinerama
 
 Added: head/emulators/virtualbox-ose/files/vboxwatchdog.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/emulators/virtualbox-ose/files/vboxwatchdog.in	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -0,0 +1,53 @@
 +#!/bin/sh
 +
 +# $FreeBSD$
 +#
 +# PROVIDE: vboxwatchdog
 +# REQUIRE: LOGIN
 +# KEYWORD: shutdown
 +#
 +# Add the following line to /etc/rc.conf[.local] to enable vboxwatchdog
 +#
 +# vboxwatchdog_enable (bool):	Set to "NO" by default.
 +#				Set it to "YES" to enable vboxwatchdog.
 +# vboxwatchdog_user (str):	User account to run with.
 +# vboxwatchdog_flags (str):	Custom flags for VBoxWatchdog.
 +
 +. /etc/rc.subr
 +
 +name=vboxwatchdog
 +rcvar=vboxwatchdog_enable
 +
 +command="%%PREFIX%%/bin/VBoxBalloonCtrl"
 +pidfile="/var/run/${name}.pid"
 +
 +start_cmd="${name}_start"
 +
 +vboxwatchdog_start()
 +{
 +	local pid
 +
 +	HOME=$(/usr/sbin/pw usershow -7 -n "${vboxwatchdog_user}" | /usr/bin/cut -d: -f6)
 +	pid=$(check_pidfile $pidfile $command)
 +
 +	if [ -n "${pid}" ]; then
 +		echo "${name} already running? (pid=${pid})."
 +		return 1
 +	fi
 +
 +	# prevent inheriting this setting to VBoxSVC
 +	unset VBOX_RELEASE_LOG_DEST
 +
 +	echo -n "Starting ${name}"
 +	/usr/bin/install -o ${vboxwatchdog_user} -g wheel -m 644 /dev/null ${pidfile}
 +	/usr/sbin/daemon -f -p ${pidfile} -u ${vboxwatchdog_user} ${command} ${vboxwatchdog_flags}
 +	echo '.'
 +}
 +
 +load_rc_config $name
 +
 +: ${vboxwatchdog_enable="NO"}
 +: ${vboxwatchdog_user="%%VBOXUSER%%"}
 +: ${vboxwatchdog_flags="-b"}
 +
 +run_rc_command "$1"
 
 Modified: head/emulators/virtualbox-ose/pkg-plist
 ==============================================================================
 --- head/emulators/virtualbox-ose/pkg-plist	Tue Dec 10 20:33:16 2013	(r336106)
 +++ head/emulators/virtualbox-ose/pkg-plist	Tue Dec 10 20:42:40 2013	(r336107)
 @@ -10,8 +10,8 @@ bin/VBoxSVC
  %%QT4%%bin/VBoxTestOGL
  bin/VBoxXPCOMIPCD
  %%QT4%%bin/VirtualBox
 -%%WEB%%bin/vboxwebsrv
 -%%WEB%%bin/webtest
 +%%WEBSERVICE%%bin/vboxwebsrv
 +%%WEBSERVICE%%bin/webtest
  %%X11%%lib/virtualbox/VBoxBFE
  %%X11%%lib/virtualbox/VBoxBFE.so
  lib/virtualbox/DBGCPlugInDiggers.so
 @@ -67,8 +67,8 @@ lib/virtualbox/VBoxDDR0.r0
  %%GUESTADDITIONS%%lib/virtualbox/additions/VBoxGuestAdditions_%%GUEST_VER%%.iso
  lib/virtualbox/VBoxPython%%PYTHON_VERU%%.so
  lib/virtualbox/VMMR0.r0
 -%%WEB%%lib/virtualbox/vboxwebsrv
 -%%WEB%%lib/virtualbox/webtest
 +%%WEBSERVICE%%lib/virtualbox/vboxwebsrv
 +%%WEBSERVICE%%lib/virtualbox/webtest
  lib/virtualbox/components/VirtualBox_XPCOM.xpt
  lib/virtualbox/components/VBoxXPCOMIPCC.so
  lib/virtualbox/components/VBoxSVCM.so
 @@ -242,8 +242,8 @@ lib/virtualbox/components/VBoxXPCOMBase.
  %%DATADIR%%/idl/VirtualBox_XPCOM.idl
  %%DATADIR%%/samples/tstVBoxAPILinux.cpp
  %%DATADIR%%/samples/Makefile
 -%%WEB%%%%DATADIR%%/sdk/bindings/webservice/vboxweb.wsdl
 -%%WEB%%%%DATADIR%%/sdk/bindings/webservice/vboxwebService.wsdl
 +%%WEBSERVICE%%%%DATADIR%%/sdk/bindings/webservice/vboxweb.wsdl
 +%%WEBSERVICE%%%%DATADIR%%/sdk/bindings/webservice/vboxwebService.wsdl
  include/virtualbox/VBoxCAPI_v2_2.h
  include/virtualbox/VBoxCAPI_v3_0.h
  include/virtualbox/VBoxCAPI_v3_1.h
 @@ -623,12 +623,13 @@ include/virtualbox/xpcom/xpcom-config.h
  %%VNC%%@dirrm lib/virtualbox/ExtensionPacks/VNC
  %%VNC%%@dirrmtry lib/virtualbox/ExtensionPacks
  %%NLS%%@dirrm %%DATADIR%%/nls
 -%%WEB%%@dirrm %%DATADIR%%/sdk/bindings/webservice
 -%%WEB%%@dirrm %%DATADIR%%/sdk/bindings
 -%%WEB%%@dirrm %%DATADIR%%/sdk
 +%%WEBSERVICE%%@dirrm %%DATADIR%%/sdk/bindings/webservice
 +%%WEBSERVICE%%@dirrm %%DATADIR%%/sdk/bindings
 +%%WEBSERVICE%%@dirrm %%DATADIR%%/sdk
  @dirrm %%DATADIR%%/samples
  @dirrm %%DATADIR%%/idl
  @dirrmtry %%DATADIR%%
 +%%QT4%%@dirrmtry share/applications
  @dirrm lib/virtualbox/components
  %%GUESTADDITIONS%%@dirrm lib/virtualbox/additions
  @dirrmtry lib/virtualbox
 _______________________________________________
 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"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182468: commit references a PR
Date: Wed, 11 Dec 2013 14:01:52 +0000 (UTC)

 Author: decke
 Date: Wed Dec 11 14:01:44 2013
 New Revision: 336164
 URL: http://svnweb.freebsd.org/changeset/ports/336164
 
 Log:
   - Add misc/compat9x port as conflicting because it causes the wrong libstdc++.so.6
   to be found by rtld. In fact vbox links to libstdc++.so.6 from lang/gcc46 because of
   USE_GCC=yes but we have another shared object with the same shlib version in compat9x
   which is incompatible.
   
   VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
   VirtualBox: dlopen("/usr/local/lib/virtualbox/VBoxRT.so",) failed:
   /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.15 required
   by /usr/local/lib/virtualbox/VBoxRT.so not found
   
   PR:		ports/182468
   Reported by:	various FreeBSD 10 users
 
 Modified:
   head/emulators/virtualbox-ose/Makefile
 
 Modified: head/emulators/virtualbox-ose/Makefile
 ==============================================================================
 --- head/emulators/virtualbox-ose/Makefile	Wed Dec 11 13:35:12 2013	(r336163)
 +++ head/emulators/virtualbox-ose/Makefile	Wed Dec 11 14:01:44 2013	(r336164)
 @@ -46,7 +46,7 @@ HAS_CONFIGURE=	yes
  CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --passive-mesa
  USE_LDCONFIG=	${PREFIX}/lib/virtualbox
  
 -CONFLICTS=	bcc-[0-9]*
 +CONFLICTS=	bcc-[0-9]* compat9x-*
  CONFLICTS_INSTALL=	virtualbox-ose-devel-[3,4]* virtualbox-ose-legacy-[3,4]* virtualbox-ose-additions-[3,4]* virtualbox-ose-additions-devel-[3,4]*
  
  VBOXUSER?=	vboxusers
 _______________________________________________
 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"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182468: commit references a PR
Date: Thu, 12 Dec 2013 15:29:09 +0000 (UTC)

 Author: decke
 Date: Thu Dec 12 15:29:01 2013
 New Revision: 336267
 URL: http://svnweb.freebsd.org/changeset/ports/336267
 
 Log:
   - Properly add $_GCC_RUNTIME to RPATH because that variable is evaluated
   after bsd.port.post.mk so it's hard to test for it.
   
   This fixes various issues that look like these ...
   
   VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
   VirtualBox: dlopen("/usr/local/lib/virtualbox/VBoxRT.so",) failed:
   /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.15 required
   by /usr/local/lib/virtualbox/VBoxRT.so not found
   
   Type Manifest File: /root/.VirtualBox/xpti.dat
   nsNativeComponentLoader: autoregistering begins.
   nsNativeComponentLoader: autoregistering succeeded
   VBoxManage: error: Failed to create the VirtualBox object!
   VBoxManage: error: Code NS_ERROR_ABORT (0x80004004) - Operation aborted (extended info not available)
   VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
   
   PR:		ports/182468
   PR:		ports/183085
   Submitted by:	bapt
 
 Modified:
   head/emulators/virtualbox-ose/Makefile
 
 Modified: head/emulators/virtualbox-ose/Makefile
 ==============================================================================
 --- head/emulators/virtualbox-ose/Makefile	Thu Dec 12 15:24:47 2013	(r336266)
 +++ head/emulators/virtualbox-ose/Makefile	Thu Dec 12 15:29:01 2013	(r336267)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	virtualbox-ose
  DISTVERSION=	4.2.20
 +PORTREVISION=	1
  CATEGORIES=	emulators
  MASTER_SITES=	http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
  		http://tmp.chruetertee.ch/ \
 @@ -46,7 +47,7 @@ HAS_CONFIGURE=	yes
  CONFIGURE_ARGS+=--with-gcc="${CC}" --with-g++="${CXX}" --passive-mesa
  USE_LDCONFIG=	${PREFIX}/lib/virtualbox
  
 -CONFLICTS=	bcc-[0-9]* compat9x-*
 +CONFLICTS=	bcc-[0-9]*
  CONFLICTS_INSTALL=	virtualbox-ose-devel-[3,4]* virtualbox-ose-legacy-[3,4]* virtualbox-ose-additions-[3,4]* virtualbox-ose-additions-devel-[3,4]*
  
  VBOXUSER?=	vboxusers
 @@ -176,11 +177,7 @@ pre-everything::
  post-patch:
  	@${ECHO} 'VBOX_PATH_APP_PRIVATE_ARCH = ${PREFIX}/lib/virtualbox' > ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_PATH_SHARED_LIBS = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 -.if defined(_GCC_RUNTIME)
 -	@${ECHO} 'VBOX_WITH_RUNPATH = ${_GCC_RUNTIME}:${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 -.else
 -	@${ECHO} 'VBOX_WITH_RUNPATH = ${PREFIX}/lib/virtualbox' >> ${WRKSRC}/LocalConfig.kmk
 -.endif
 +	@var=${_GCC_RUNTIME}; ${ECHO} "VBOX_WITH_RUNPATH = $${var:+$${var}:}${PREFIX}/lib/virtualbox" >> ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk
  	@${ECHO} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk
 _______________________________________________
 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"
 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Feb 27 15:00:46 UTC 2014 
State-Changed-Why:  
this seems fixed in 336267. 

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