Unable to build VirtualBox 2.0.6 OSE on Windows XP 64 bit

Discussions related to using the OSE version of VirtualBox.
Post Reply
Virendra
Posts: 3
Joined: 11. Dec 2008, 15:45

Unable to build VirtualBox 2.0.6 OSE on Windows XP 64 bit

Post by Virendra »

When I try to build the VirtualBox 2.0.6 OSE on 64 bit Windows XP I get the following error -
---------------------------------------------------------------------------------------------
kmk.exe[2]: Entering directory `E:/vbsource/VirtualBox/src/recompiler'
kBuild: dyngen VBoxREM - E:/vbsource/VirtualBox/out/win.amd64/release/obj/src/recompiler/VBoxREM2/target-i386/op.o dyngen: bad ELF header
kmk.exe[2]: *** [E:/vbsource/VirtualBox/out/win.amd64/release/obj/src/recompiler/VBoxREM2/op.h] Error 1
kmk.exe[2]: *** Deleting file `E:/vbsource/VirtualBox/out/win.amd64/release/obj/src/recompiler/VBoxREM2/op.h'
kmk.exe[2]: Leaving directory `E:/vbsource/VirtualBox/src/recompiler'
kmk.exe[1]: *** [pass_binaries_before] Error 2
kmk.exe[1]: Leaving directory `E:/vbsource/VirtualBox/src'
kmk: *** [pass_binaries_before] Error 2


Also I looked into the make file the recompiler folder "makefile.kmk" and it says that we cannot build op.c on Windows.
Any ideas on where find "op.s" mentioned below and how to use it to build the 64 bit VirtualBox.


Here is the dump of the text written in the "recompiler\makefile.kmk"
-------------------------------------------------------------------------------------------
# There are a few of complicating factors here, esp. on AMD64 systems:
#
# * op.c doesn't compile work correctly with gcc 4. For this we've
# checked in op.S, which is the reason why we don't compile op.c
# directly but always compile via the assembly file.s
# * On 64-bit Windows we lack a compiler and have to resort to a
# linux cross compiler building an ELF relocatable module which
# we then load using a wrapper module. Thus the REM_MOD mess.
# * On platforms using the 64-bit GCC ABI, we're not allowed to
# generate non-PIC shared objects, and op.c requires the code
# to be non-PIC. We apply the same trick as we developed for
# 64-bit windows.
#

....
.....

#
# L4 must use the no-crt path because it's lacking math stuff it seems...
# Darwin must use the non-crt path because it can't compile op.c nativly.
# All the AMD64 target must use the no-crt path because ELF doesn't like op.c
# when stuffed into a shared library and windows doesn't have 64-bit gcc (yet).
#
Virendra
Posts: 3
Joined: 11. Dec 2008, 15:45

Successfully generated the op.S on Fedora 64 bit.

Post by Virendra »

I have successfully generated the op.S on Fedora. But how to use this file in the Windows to get over the "Bad ELF" compilation error ?

That is I would like to know in which folder should I copy this file and what changes I need to do in any scripts to successfully compile the recompiler folder on a 64 bit Windows environment.
Post Reply