[vbox-dev] build errors with VB 3.0.8

Adrian Bono adrian.bono at gmail.com
Sat Oct 10 17:38:05 GMT 2009


Configure options:

--disable-dbus --disable-python --disable-pulse --disable-hardening
--with-qt-dir=/usr/local/Trolltech/Qt-4.4.3

When building 3.0.8 OSE i get the following errors:

./VirtualBox-3.0.8_OSE/src/VBox/Main/linux/HostHardwareLinux.cpp:216:
error: 'VBoxLoadDBusLib' was not declared in this scope
../VirtualBox-3.0.8_OSE/src/VBox/Main/linux/HostHardwareLinux.cpp:218:
error: 'getDriveInfoFromHal' was not declared in this scope


Checking HostHardwareLinux.cpp, i see:

 209 #ifdef VBOX_WITH_DBUS
 210         if (   RT_SUCCESS (rc)
 211             && RT_SUCCESS(VBoxLoadDBusLib())
 212             && (!success || testing()))
 213             rc = getDriveInfoFromHal(&mFloppyList, false /* isDVD
*/, &success);
 214 #endif /* VBOX_WITH_DBUS defined */
 215         if (   RT_SUCCESS(rc)
 216             && RT_SUCCESS(VBoxLoadDBusLib())
 217             && (!success || testing()))
 218             rc = getDriveInfoFromHal(&mFloppyList, false /* isDVD
*/, &success);
 219         /* As with the CDROMs, on Linux we have to take a
multi-level approach
 220          * involving parsing the mount tables. As this is not
bulletproof, we
 221          * give the user the chance to override the detection using an
 222          * environment variable, skiping the detection. */
 223
 224         if (RT_SUCCESS (rc) && (!success || testing()))

^^^ Lines 215-218 obviously should not reference VBoxLoadDBusLib() and
getDriveInfoFromHal() as these are used in the case where dbus and hal
are actually used. When commenting out line 216 and changing 218 to
call getDriveInfoFromSysfs(), build can proceed normally but get stuck
later on about an undefined reference to getdriveInfoFromSysfs() that
takes 4 parameters, including below.


 156 #ifdef VBOX_WITH_DBUS
 157         if (RT_SUCCESS (rc) && RT_SUCCESS(VBoxLoadDBusLib()) &&
(!success || testing()))
 158             rc = getDriveInfoFromHal(&mDVDList, true /* isDVD */,
&success);
 159 #endif /* VBOX_WITH_DBUS defined */
 160         if (RT_SUCCESS(rc) && (!success | testing()))
 161             rc = getDriveInfoFromSysfs(&mDVDList, true /* isDVD
*/, &success);
 162         /* On Linux without hal, the situation is much more
complex. We will
 163          * take a heuristical approach.  The general strategy is
to try some
 164          * known device names and see of they exist.  Failing that, we
 165          * enumerate the /etc/fstab file (luckily there's an API
to parse it)
 166          * for CDROM devices. Ok, let's start! */
 167         if (RT_SUCCESS (rc) && (!success || testing()))
 168         {
 169             // this is a good guess usually
 170             if (validateDevice("/dev/cdrom", true))

^^^ Line 161 contains an undefined reference to
getDriveInfoFromSysfs() that takes 4 parameters similar to above after
line 216 is commented out and line 218 is changed.


Commenting out lines 215-218 and 160-161 allows build to continue and succeed.




More information about the vbox-dev mailing list