[Vm-dev] attempting to build BochsX64Plugin on 32-bit Ubuntu
Robert Withers
robert.w.withers at gmail.com
Sun Oct 25 19:05:39 UTC 2015
Eliot, thank you for that orientation. I looked at your mac but had to
go one more step. I realized I probably couldn't build both
BochsIA32Plugin and BochsX64Plugin at the same time while sharing the
processors/IA32 support code - it is compiled separately for IA32 and
X64. So I added a processors/X64 directory, with a seaparate copy of
Bochs for 64-bit emulation, built the libs with your conf.COG from mac,
and built both Bochs plugins. I am attaching the link to BochsX64Plugin
for 32-bit linux:
https://www.dropbox.com/s/g73feosuzlx45le/BochsX64Plugin.11-25-2015.tgz?dl=0
Best,
Robert
... ^^
On 10/24/2015 11:54 PM, Eliot Miranda wrote:
>
>
>
> Hi Rob,
>
> I've only tried to build it in Mac OS X. I've also changed the
> build structure so one /can/ build it either in 32 or 64 bits. So
> look at the structure for building the support libraries under
> build.macos32x86 and replicate it under build.linux32x86, write or
> change platforms/unix/plugins/BochsX64Plugin/Makefile to pick up the
> libraries from (IIRC)
> build.linux32x86/bochsx64/{cpu/libcpu.a,disasm/libdisasm.a,fpu/libfpu.a}
> and you should be fine. You'll need to
> run build.linux32x86/bochsx64/conf.COG which you'll copy
> from build.macos32x86/bochsx64/conf.COG
>
> _,,,^..^,,,_ (phone)
>
> On Oct 24, 2015, at 5:59 PM, Robert Withers
> <robert.w.withers at gmail.com <mailto:robert.w.withers at gmail.com>> wrote:
>
>> Is it possible I need 64-bit headers/libraries on the 32-bit Ubuntu
>> when compiling BochsX64Plugin? Here a line I am receiving an error
>> for and it is for 64-bits:
>>
>> from sqBochsX64Plugin.cpp, line 68:
>> bx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.l = 1; // 64-bit seg
>>
>> resulting in error, below.
>>
>>
>> On 10/23/2015 01:49 PM, Eliot Miranda wrote:
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 21, 2015 at 7:26 PM, Robert Withers
>>> <robert.w.withers at gmail.com> wrote:
>>>
>>>
>>> I am not sure it is possible, even. Can this plugin be build
>>> 32-bit; does it make any sense to do so?
>>>
>>>
>>> yes. How on earth can the 64-bit Cogit be created if this plugin
>>> can't be built in 32-bits? I'm using it on Mac OS X in 32-bits using
>>> a 32-bit VM.
>>>
>>>
>>> Here is the make portion of this attempt for this plugin. I am
>>> unsure how to deal with this C++ issue in the
>>> Cross/plugins/BochsX64Plugin/sqUnixBochsX64Plugin.cpp file.
>>>
>>>
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:
>>> In function 'int resetCPU(void*)':
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:68:47:
>>> error: 'struct bx_descriptor_t::<anonymous union>::<anonymous>'
>>> has no member named 'l'
>>> bx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.l = 1; // 64-bit seg
>>>
>>>
>>> Thank you,
>>> Robert
>>>
>>>
>>> /bin/bash
>>> /home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build/libtool
>>> --mode=compile gcc -m32 -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2
>>> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DLSB_FIRST=1
>>> -m32 -DHAVE_CONFIG_H
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/platforms/unix/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/vm
>>> -I/home/rabbit/warren/oscogvm/spursrc/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin
>>> -m32 -DUSE_BOCHS_CONFIG_H=1
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/linuxbochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs/instrument/stubs
>>> -c -o BochsX64Plugin.lo
>>> /home/rabbit/warren/oscogvm/src/plugins/BochsX64Plugin/BochsX64Plugin.c
>>> gcc -m32 -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -D_GNU_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DLSB_FIRST=1 -m32
>>> -DHAVE_CONFIG_H
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/platforms/unix/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/vm
>>> -I/home/rabbit/warren/oscogvm/spursrc/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin
>>> -m32 -DUSE_BOCHS_CONFIG_H=1
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/linuxbochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs/instrument/stubs
>>> -c
>>> /home/rabbit/warren/oscogvm/src/plugins/BochsX64Plugin/BochsX64Plugin.c
>>> -fPIC -DPIC -DPIC -o BochsX64Plugin.o
>>> mv -f BochsX64Plugin.o BochsX64Plugin.lo
>>> /bin/bash
>>> /home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build/libtool
>>> --mode=compile g++ -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2
>>> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DLSB_FIRST=1
>>> -m32 -DHAVE_CONFIG_H
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/platforms/unix/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/vm
>>> -I/home/rabbit/warren/oscogvm/spursrc/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin
>>> -m32 -DUSE_BOCHS_CONFIG_H=1
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/linuxbochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs/instrument/stubs
>>> -c -o sqBochsX64Plugin.lo
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp
>>> g++ -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -D_GNU_SOURCE
>>> -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DLSB_FIRST=1 -m32
>>> -DHAVE_CONFIG_H
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/build.linux32x86/squeak.cog.spur/build
>>> -I/home/rabbit/warren/oscogvm/platforms/unix/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/vm
>>> -I/home/rabbit/warren/oscogvm/spursrc/vm
>>> -I/home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin
>>> -m32 -DUSE_BOCHS_CONFIG_H=1
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/linuxbochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs
>>> -I/home/rabbit/warren/oscogvm/processors/IA32/bochs/instrument/stubs
>>> -c
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp
>>> -fPIC -DPIC -DPIC -o sqBochsX64Plugin.o
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:17:0:
>>> warning: "setjmp" redefined [enabled by default]
>>> # define setjmp(jb) _setjmp(jb)
>>> ^
>>> In file included from
>>> /home/rabbit/warren/oscogvm/processors/IA32/bochs/gui/siminterface.h:1069:0,
>>> from
>>> /home/rabbit/warren/oscogvm/processors/IA32/bochs/bochs.h:117,
>>> from
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:7:
>>> /usr/include/setjmp.h:67:0: note: this is the location of the
>>> previous definition
>>> #define setjmp(env) _setjmp (env)
>>> ^
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:
>>> In function 'int resetCPU(void*)':
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:68:47:
>>> error: 'struct bx_descriptor_t::<anonymous union>::<anonymous>'
>>> has no member named 'l'
>>> bx_cpu.sregs[BX_SEG_REG_CS].cache.u.segment.l = 1; // 64-bit seg
>>> ^
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:74:47:
>>> error: 'struct bx_descriptor_t::<anonymous union>::<anonymous>'
>>> has no member named 'l'
>>> bx_cpu.sregs[BX_SEG_REG_DS].cache.u.segment.l = 1; // 64-bit seg
>>> ^
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:80:47:
>>> error: 'struct bx_descriptor_t::<anonymous union>::<anonymous>'
>>> has no member named 'l'
>>> bx_cpu.sregs[BX_SEG_REG_SS].cache.u.segment.l = 1; // 64-bit seg
>>> ^
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:101:10:
>>> error: 'class bx_cpu_c' has no member named 'efer'
>>> bx_cpu.efer.set_LMA(1); /* Hack. The old version we use have
>>> doesn't support set_EFER */
>>> ^
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:
>>> In function 'int disassembleForAtInSize(void*, ulong, void*,
>>> ulong)':
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:213:52:
>>> error: 'struct bx_descriptor_t::<anonymous union>::<anonymous>'
>>> has no member named 'l'
>>> anx64->sregs[BX_SEG_REG_CS].cache.u.segment.l,
>>> ^
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:
>>> At global scope:
>>> /home/rabbit/warren/oscogvm/platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp:324:39:
>>> error: no 'void bx_cpu_c::TLB_flushNonGlobal()' member function
>>> declared in class 'bx_cpu_c'
>>> void BX_CPU_C::TLB_flushNonGlobal(void)
>>> ^
>>> make[1]: *** [sqBochsX64Plugin.lo] Error 1
>>> make: *** [BochsX64Plugin.la] Error 2
>>> rabbit at rabbithole:~/warren/oscogvm/build.linux32x86/squeak.cog.spur/build$
>>> mv -f BochsX64Plugin.o BochsX64Plugin.lo
>>> mv: cannot stat ‘BochsX64Plugin.o’: No such file or directory
>>>
>>>
>>>
>>>
>>> --
>>> _,,,^..^,,,_
>>> best, Eliot
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20151025/895da4e7/attachment.htm
More information about the Vm-dev
mailing list