Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] VirtualBox, anyone?

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Thomas Orgis <thomas-forum AT orgis.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] VirtualBox, anyone?
  • Date: Tue, 22 Nov 2016 19:45:58 +0100

Hi,

I needed VirtualBox for something … tried installing it from the
spell(s). Noticed that things are rather broken.

1. Transition to qt5 is incomplete (traces of qt4)
2. Qt5 forces C++11, need to insert -std= for that.
3. The linux-pam dependency needs hacking if disabled.
3. virtualmox-module is just … weird. There is no SOURCE_URL! How is
that spell supposed to work? I see vboxdrv stuff in the install of
the main virtualbox spell, though.

After fixing up at least virtualbox itself to get it built, I am faced
with this:

$ virtualbox
vboxdrv module is not loaded, trying to load it ...
modprobe: FATAL: Module vboxdrv not found in directory
/lib/modules/4.1.35-usbtv
OK, vboxdrv is loaded.
VBoxSVC is not running, tryng to start VBoxSVC ...
OK, VBoxSVC is running.
OK, VirtualBox is starting ...
./VBoxSVC: symbol lookup error: ./VBoxSVC: undefined symbol:
SUPTracerFireProbe
VirtualBox: Error -11 in supR3HardenedMainInitRuntime!
VirtualBox: supR3PreInit failed with rc=-11

VirtualBox: Tip! It may help to reinstall VirtualBox.

or this:

$ /opt/virtualbox/VirtualBox
VirtualBox: Error -11 in supR3HardenedMainInitRuntime!
VirtualBox: supR3PreInit failed with rc=-11

VirtualBox: Tip! It may help to reinstall VirtualBox.


This tip is particularily helpful. Anyone actually using VirtualBox and
able to fix up this mess? I'm not sure if I will pursue this … might
use an alternative.

My efforts so far are attached.


Alrighty then,

Thomas
diff --git a/utils/virtualbox/BUILD b/utils/virtualbox/BUILD
index 9b9f2de..7fca022 100755
--- a/utils/virtualbox/BUILD
+++ b/utils/virtualbox/BUILD
@@ -7,8 +7,6 @@ if [[ ${BUILD%%-*} == "x86_64" ]]; then
   OPTS="--disable-vmmraw $OPTS"
 fi &&
 
-OPTS="--with-qt-dir=${TRACK_ROOT}/opt/qt4/ $OPTS"
-
 ./configure $OPTS  &&
 source ./env.sh  &&
-PATH=${TRACK_ROOT}/opt/qt4/bin:$PATH kmk all
+kmk all
diff --git a/utils/virtualbox/DEPENDS b/utils/virtualbox/DEPENDS
index 40f9222..2676ad8 100755
--- a/utils/virtualbox/DEPENDS
+++ b/utils/virtualbox/DEPENDS
@@ -14,6 +14,10 @@ depends  makeself &&
 depends  lvm      &&
 depends  READCD   &&
 
+optional_depends  linux-pam                        \
+                  ""                               \
+                  ""                               \
+                  "for PAM auth"                   &&
 optional_depends  python                           \
                   ""                               \
                   "--disable-python"               \
@@ -32,4 +36,4 @@ optional_depends  JAVA                             \
 optional_depends  pulseaudio                       \
                   ""                               \
                   "--disable-pulse"                \
-                  "for PulseAudio output support" 
+                  "for PulseAudio output support"
diff --git a/utils/virtualbox/DETAILS b/utils/virtualbox/DETAILS
index 8355dc0..f21c459 100755
--- a/utils/virtualbox/DETAILS
+++ b/utils/virtualbox/DETAILS
@@ -1,9 +1,9 @@
            SPELL=virtualbox
-         VERSION=5.1.6
+         VERSION=5.1.10
           SOURCE=VirtualBox-$VERSION.tar.bz2
 SOURCE_DIRECTORY=$BUILD_DIRECTORY/VirtualBox-${VERSION%-*}
    SOURCE_URL[0]=http://download.virtualbox.org/virtualbox/${VERSION%-*}/$SOURCE
-     SOURCE_HASH=sha512:7b10c203692a091b3de8dda147b386e17fa7d2bdb56031163e0551e54c1ff6a8e953361d51cc6f7bb6978544a6517e843b446e866aa1fa6f96b4677dda27daa4
+     SOURCE_HASH=sha512:b4418545919adfa1f06d86dddf56f95bdfe1dd6664bbe4574765cbf8eb54273d8d56954e55d1afe8b2aab9fbc82055867a129e40eba30cc5baddd417f9a8f722
            TMPFS=off
       LICENSE[0]=GPL
         WEB_SITE=http://www.virtualbox.org/
diff --git a/utils/virtualbox/HISTORY b/utils/virtualbox/HISTORY
index 0cd3fbe..0d42c52 100644
--- a/utils/virtualbox/HISTORY
+++ b/utils/virtualbox/HISTORY
@@ -1,3 +1,9 @@
+2016-11-22 Thomas Orgis <sobukus AT sourcemage.org>
+	* DETAILS: version 5.1.10
+	* BUILD: qt4 → qt5
+	* PRE_BUILD: hack C++1 in there, remove that sedit deleting lines;
+	  What was that for?! The lines it hit were for FreeBSD.
+
 2016-09-18 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
 	* DEPENDS: remove dependency on qt4, add dependencies on qtbase and
 	  qtx11extras
diff --git a/utils/virtualbox/PRE_BUILD b/utils/virtualbox/PRE_BUILD
index 395d2d5..f866c63 100755
--- a/utils/virtualbox/PRE_BUILD
+++ b/utils/virtualbox/PRE_BUILD
@@ -3,4 +3,21 @@ cd $SOURCE_DIRECTORY  &&
 
 cp $SPELL_DIRECTORY/LocalConfig.kmk . &&
 
-sedit "145d;147d" configure
+# Qt5 built with C++11 nowadays
+sed -i 's:^CXX="g++:CXX="g++ -std=gnu++11:' configure &&
+# Build enables PAM unconditionally on Linux otherwise.
+if ! is_depends_enabled $SPELL linux-pam; then
+  patch -p0 <<'EOT'
+--- Config.kmk.orig	2016-11-22 16:54:06.289453377 +0100
++++ Config.kmk	2016-11-22 16:53:41.039769041 +0100
+@@ -453,7 +453,7 @@
+  VBOX_WITH_DBUS = 1
+ endif
+ # Enable building PAM modules.
+-if1of ($(KBUILD_TARGET), linux solaris)
++if1of ($(KBUILD_TARGET), ifihadpamenabled)
+  VBOX_WITH_PAM = 1
+ endif
+ # Enable internal networking.
+EOT
+fi
diff --git a/utils/virtualbox/virtualbox b/utils/virtualbox/virtualbox
index 04f6704..ceb2919 100755
--- a/utils/virtualbox/virtualbox
+++ b/utils/virtualbox/virtualbox
@@ -3,6 +3,8 @@
 # VirtualBox is installed in /opt/virtualbox
 cd /opt/virtualbox
 
+# What about error handling here?
+
 # Is vboxdrv module loaded?
 if lsmod | grep vboxdrv > /dev/null
 then
@@ -24,4 +26,7 @@ else
 fi
 
 echo OK, VirtualBox is starting ...
-LD_LIBRARY_PATH=.:/opt/qt4/lib ./VirtualBox
+#LD_LIBRARY_PATH=.:/opt/qt4/lib ./VirtualBox
+# It should still find Qt5 libs, right?
+# And I think one really should pass along command line parameters, if any.
+LD_LIBRARY_PATH=. ./VirtualBox "$@"

Attachment: pgpb4HTOVdO1u.pgp
Description: Digitale Signatur von OpenPGP



  • [SM-Discuss] VirtualBox, anyone?, Thomas Orgis, 11/22/2016

Archive powered by MHonArc 2.6.24.

Top of Page