Bug 182468 - [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Summary: [patch] lang/gcc builds unrunnable emulators/virtualbox-ose
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL:
Keywords:
Depends on:
Blocks: 245048
  Show dependency treegraph
 
Reported: 2013-09-28 23:30 UTC by Peter Jeremy
Modified: 2020-03-30 21:51 UTC (History)
0 users

See Also:


Attachments
file.diff (843 bytes, patch)
2013-09-28 23:30 UTC, Peter Jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jeremy 2013-09-28 23:30:00 UTC
	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).

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).
How-To-Repeat: 
	Build emulators/virtualbox-ose and try to run it.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-28 23:30:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gerald

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-09-30 00:05:15 UTC
Responsible Changed
From-To: gerald->vbox

this is actually about virtualbox.
Comment 3 c.kworr 2013-11-01 13:19:32 UTC
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.
Comment 4 Peter Jeremy 2013-11-03 10:09:07 UTC
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 
>/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 automatically
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.

-- 
Peter Jeremy
Comment 5 Bernhard Froehlich 2013-11-13 12:31:49 UTC
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/
Comment 6 Bernhard Froehlich 2013-11-15 09:57:10 UTC
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/
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2013-11-17 21:32:46 UTC
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
Comment 8 Peter Jeremy 2013-11-21 19:01:34 UTC
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öhlich <decke@bluelife.at> wrote:
>>  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=
>
>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=compiler 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=..." options.

(IMO, the whole -L/-rpath approach is broken: The runtime searchpath
should default to the linktime searchpath.  Unfortunately, fixing that
isn't possible).

-- 
Peter Jeremy
Comment 9 dfilter service freebsd_committer freebsd_triage 2013-12-10 20:42:52 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"
Comment 10 Bernhard Froehlich 2013-12-10 20:46:01 UTC
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/
Comment 11 dfilter service freebsd_committer freebsd_triage 2013-12-11 14:01:52 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"
Comment 12 dfilter service freebsd_committer freebsd_triage 2013-12-12 15:29:09 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"
Comment 13 Martin Wilke freebsd_committer freebsd_triage 2014-02-27 15:00:46 UTC
State Changed
From-To: open->closed

this seems fixed in 336267.