Page 1 of 1

Can't build latest Bochs CVS

Posted: Thu May 29, 2008 9:16 pm
by indiocolifa
I'm trying to build the latest 2.3.6 Bochs from CVS and I'm getting the following error using --enable-debugger, --enable-disasm, --with-sdl and --with-x11:

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward/hash_map:64,
from symbols.cc:86:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
symbols.cc:143: error: ISO C++ forbids declaration of ‘hash_map’ with no type
symbols.cc:143: error: expected ‘;’ before ‘<’ token
symbols.cc:151: error: expected constructor, destructor, or type conversion before ‘<’ token
symbols.cc: In constructor ‘context_t::context_t(Bit32u)’:
symbols.cc:158: error: ‘map’ was not declared in this scope
symbols.cc: In static member function ‘static context_t* context_t::get_context(Bit32u)’:
symbols.cc:180: error: ‘map’ was not declared in this scope
make[1]: *** [symbols.o] Error 1
make[1]: Leaving directory `/home/hernan/abs/local/bochs/bx_debug'
make: *** [bx_debug/libdebug.a] Error 2

Any help? Thanks.

2) There is some other valuable options to pass ./configure for OS development?

Posted: Fri May 30, 2008 1:45 am
by Combuster
I would use a release version instead of CVS. Last time I tried CVS it got me a whole bunch of linker errors.

As for configure options, having magic breakpoint enabled together with the debugger can be very useful. (Have a go at the bochs manual to see how it works) Other than that, it's handy to enable all hardware you may possibly need too (like NICs, soundcards, ...)

Posted: Fri May 30, 2008 6:41 am
by bluecode
Combuster wrote:I would use a release version instead of CVS. Last time I tried CVS it got me a whole bunch of linker errors.
The problem is, that the last release is not compile with debugger and disassembler enabled, so you are basically left with using a CVS snapshot.

You might want to try a pre 4.3 gcc, because according to the changelog
Formal deprecation of <ext/hash_set> and <ext/hash_map>, which are now <backward/hash_set> and <backward/hash_map>. This code:
#include <ext/hash_set>
__gnu_cxx::hash_set<int> s;

Can be transformed (in order of preference) to:
#include <tr1/unordered_set>
std::tr1::unordered_set<int> s;

or
#include <backward/hash_set>
__gnu_cxx::hash_set<int> s;

Similar transformations apply to __gnu_cxx::hash_map, __gnu_cxx::hash_multimap, __gnu_cxx::hash_set, __gnu_cxx::hash_multiset.
they moved and renamed the hash_map.

edit: hm... just noticed that "formal deprecation" and "in order of preference" sounds like the old thing should actually work...

Posted: Fri May 30, 2008 9:49 am
by indiocolifa
May be I can try to force GCC into pre-4.3.0 behaviour.

Anyway, someone is using the e9Hack option or I/O ports in bochs to output debugging to a console?

Posted: Fri May 30, 2008 4:12 pm
by inx
I use the e9 hack for early boot output.. Why do you ask?

Posted: Fri May 30, 2008 7:32 pm
by indiocolifa
Because I've never used it ! ha!

The magic breakpoint with XCHG BX,BX looks good for a macro

Code: Select all

MACRO BOCHS_BP
     xchg bx,bx
ENDMACRO
This is somewhat pseudocode, I dont remember the FASM macro syntax right now.