[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
C.1 System Requirements | What is needed for the compilation | |
C.2 Editing the `Makefile' files | Definitions in the `Makefile' files | |
C.3 Installing Maria | Installing Maria for system-wide use | |
C.4 Compiling Maria for Debugging | Compiling a special version for debugging | |
C.5 Reporting Bugs |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Special care has been taken to ensure the quality and portability of the Maria source code. The code should compile on any ISO/IEC 14882 compliant C++ compiler. Unfortunately the standard is fairly new (summer 1998), and until 2001 or 2002, many C++ compilers did not support even the subset of it that compiling Maria requires.
We use the GNU Compiler Collection (gcc) on Debian GNU/Linux as the development platform. GCC should be able to compile the program also on FreeBSD, NetBSD, OpenBSD and IBM AIX systems. Furthermore, the code can be compiled with the native compilers of Digital UNIX 4.0 and 5.1, HP-UX 11.22, Sun Solaris 8, SGI IRIX 6.2 and Apple Darwin 5.3.
It is recommended that you install the freely available gcc 2.95 or later on your system if you have problems compiling the code.
We would like to hear success reports from people using other compilers. Patches, even to the `Makefile' files, are welcome.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In the top-level directory, in `Makefile' and in `Makefile'.system, there are a couple of variable definitions that you should check before invoking the compilation by typing `make'. It is recommended to make `reallyclean' before re-starting the compilation after making modifications.(7)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The file `Makefile' in the top-level directory contains rules for installing the `maria' executable and some related files on Unix-like systems. The installation is invoked by typing `make install installman installinfo'. You may want to redefine some of the following variables either in the `Makefile' or on the `make' command line:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Compiling a debugging version of Maria is simple: in `Makefile', define `DEBUG=-g', and you are all set. You could also disable `assert()' macros by defining `-DNDEBUG', but they are very useful, since they often catch errors introduced by modifying code that seems completely unrelated to the failed assertion at first sight.
For detecting and debugging memory management issues, you can use the Electric Fence Library, Valgrind for GNU/Linux, the Debug Malloc Library (See Info file `dmalloc', node `Top' or http://www.dmalloc.com) or commercial tools such as Third Degree (`third') on Digital UNIX.
Debuggers often have problems with C++. For us, the GNU debugger (gdb 5.0) and has worked pretty well on Debian GNU/Linux. Version 4.18 has problems calling virtual methods.
Defining the `YYDEBUG' macro enables grammar debugging. An
executable compiled with this macro defined will look for the
environment variable DEBUG
. When DEBUG=1
, the parser will
print out more than enough information on the parsing process. Often it
makes sense to set a conditional breakpoint on the lexical analyzer
function based on the input line number, and to enable the parser
debugging output only for a certain region of the input by setting or
clearing the status variable in the debugger.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Every non-trivial program is likely to contain bugs. Fatal bugs, such as assertion failures or segmentation faults, are easiest to locate. Our intention has been to make the parsers in Maria bullet-proof: no matter what the input is, the program should not crash.
Sometimes a program may behave in a counter-intuitive way, doing something else than one would except. Such situations can be caused by a bug, or the program might behave just as planned. The latter case is often fixed by rephrasing or extending the documentation.
Bug reports and suggestions are welcome at `msmakela@tcs.hut.fi'. In the bug reports, please mention which platform you are using (including version numbers of the operating system and the relevant compilers and libraries) and include a stripped-down input file that is enough for triggering the bug. You can also compile the analyzer with support for debugging enabled, since it can help tracking down the error. Please use the `diff -c' format for any patches you send.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |