[vbox-dev] Latest virtualbox 5.0.2 fails to build from source on Debian i386, padding error.

Gianfranco Costamagna costamagnagianfranco at yahoo.it
Sun Aug 16 22:18:02 GMT 2015


Hi folks,

the latest vbox 5.0.2 failed to build on Debian unstable i386.

Build failure is located at [1] and I'm putting a snip log just below

tstDeviceStructSize: error! VGASTATE::GCPhysVRAM offset=0x12d64 (77156) expected alignment 0x8, meaning 0x4 (4) off
tstDeviceStructSize: error! VGASTATE::Dev offset=0x12dec (77292) expected alignment 0x8, meaning 0x4 (4) off
tstDeviceStructSize: error! VGASTATE::CritSect offset=0x12d6c (77164) expected alignment 0x8, meaning 0x4 (4) off
tstDeviceStructSize: error! VGASTATE::StatRZMemoryRead offset=0x13044 (77892) expected alignment 0x8, meaning 0x4 (4) off
[snip]
tstDeviceStructSize: FAILURE - 4 errors
kmk: *** [/«PKGBUILDDIR»/out/obj/Devices/testcase/tstDeviceStructSize.run] Error 4
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2
kmk_builtin_append -n "/«PKGBUILDDIR»/out/obj/VMMR0/VMMAll/IEMAll.o.dep" "" "/«PKGBUILDDIR»/src/VBox/VMM/VMMAll/IEMAll.cpp:" ""
make[1]: *** [override_dh_auto_build] Error 2
debian/rules:57: recipe for target 'override_dh_auto_build' failed
make[1]: Leaving directory '/«PKGBUILDDIR


this seems to be a padding error, caused between 5.0.0 and 5.0.2, and only when arch is 32 bit.

So I did a patch (released under MIT or your best license), to fix the offset by 4, at least on Debian with our configure/build flags


I'm not sure this is the best patch (I guess this isn't the best one, I'm just reporting it there for your best usage),
but at least now virtualbox builds fine on both amd64 and i386 architectures.


--- virtualbox-5.0.2-dfsg.orig/src/VBox/Devices/Graphics/DevVGA.h
+++ virtualbox-5.0.2-dfsg/src/VBox/Devices/Graphics/DevVGA.h
@@ -473,7 +473,11 @@ typedef struct VGAState {
bool                        fVMSVGAEnabled;
bool                        Padding1[1+4];
#else
+# if HC_ARCH_BITS == 32
+    bool                        Padding1[2];
+# else
bool                        Padding1[2+4];
+# endif
#endif

/** Physical access type for the linear frame buffer dirty page tracking. */



[1] https://buildd.debian.org/status/fetch.php?pkg=virtualbox&arch=i386&ver=5.0.2-dfsg-1&stamp=1439581763

please let me know if the fix is suitable for unstable or not, and if you have a better patch.

cheers,

Gianfranco




More information about the vbox-dev mailing list