[FIXED] Bochs fails to compile for 32 bit targets

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

[FIXED] Bochs fails to compile for 32 bit targets

Post by xenos »

Hi everyone, I tried to compile the most recent Bochs SVN version and it aborted with an error when compiling the file cpu/access32.cc - I suspect a bug introduced in SVN 12497. This happens only for 32 bit simulation targets (without --enable-x86-64), it works nicely for 64 bit targets (with --enable-x86-64). Here's the configure line:

Code: Select all

./configure --with-x11 --with-sdl --enable-pci --enable-cpu-level=6
And here's the error:

Code: Select all

g++ -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT access32.cc -o access32.o
access32.cc:1331:6: error: prototype for ‘void BX_CPU_C::write_new_stack_word(Bit64u, unsigned int, Bit16u)’ does not match any in class ‘BX_CPU_C’
 void BX_CPU_C::write_new_stack_word(Bit64u laddr, unsigned curr_pl, Bit16u data)

In file included from access32.cc:26:0:
cpu.h:4537:15: error: candidates are: static void BX_CPU_C::write_new_stack_word(bx_address, unsigned int, Bit16u)
   BX_SMF void write_new_stack_word(bx_address laddr, unsigned curr_pl, Bit16u data);

cpu.h:4533:15: error:                 static void BX_CPU_C::write_new_stack_word(bx_segment_reg_t*, Bit32u, unsigned int, Bit16u)
   BX_SMF void write_new_stack_word(bx_segment_reg_t *seg, Bit32u offset, unsigned curr_pl, Bit16u data);

access32.cc:1360:6: error: prototype for ‘void BX_CPU_C::write_new_stack_dword(Bit64u, unsigned int, Bit32u)’ does not match any in class ‘BX_CPU_C’
 void BX_CPU_C::write_new_stack_dword(Bit64u laddr, unsigned curr_pl, Bit32u data)

In file included from access32.cc:26:0:
cpu.h:4538:15: error: candidates are: static void BX_CPU_C::write_new_stack_dword(bx_address, unsigned int, Bit32u)
   BX_SMF void write_new_stack_dword(bx_address laddr, unsigned curr_pl, Bit32u data);

cpu.h:4534:15: error:                 static void BX_CPU_C::write_new_stack_dword(bx_segment_reg_t*, Bit32u, unsigned int, Bit32u)
   BX_SMF void write_new_stack_dword(bx_segment_reg_t *seg, Bit32u offset, unsigned curr_pl, Bit32u data);

access32.cc:1389:6: error: prototype for ‘void BX_CPU_C::write_new_stack_qword(Bit64u, unsigned int, Bit64u)’ does not match any in class ‘BX_CPU_C’
 void BX_CPU_C::write_new_stack_qword(Bit64u laddr, unsigned curr_pl, Bit64u data)

In file included from access32.cc:26:0:
cpu.h:4539:15: error: candidates are: static void BX_CPU_C::write_new_stack_qword(bx_address, unsigned int, Bit64u)
   BX_SMF void write_new_stack_qword(bx_address laddr, unsigned curr_pl, Bit64u data);

cpu.h:4535:15: error:                 static void BX_CPU_C::write_new_stack_qword(bx_segment_reg_t*, Bit32u, unsigned int, Bit64u)
   BX_SMF void write_new_stack_qword(bx_segment_reg_t *seg, Bit32u offset, unsigned curr_pl, Bit64u data);
Last edited by xenos on Thu Oct 16, 2014 2:06 am, edited 1 time in total.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: Bochs fails to compile for 32 bit targets - bug in SVN 1

Post by stlw »

Fixed in SVN 12512
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Bochs fails to compile for 32 bit targets - bug in SVN 1

Post by xenos »

Thanks! Works fine now. :)
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
Post Reply