D7net Mini Sh3LL v1
Current File : //media/../../usr/share/doc/zlib1g/../eject/../python3-gi/../maria-doc/html/maria_7.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on March 22, 2020 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>Maria: C. Compiling Maria</title>
<meta name="description" content="Maria: C. Compiling Maria">
<meta name="keywords" content="Maria: C. Compiling Maria">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Compiling"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maria_6.html#Graph-Files" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#System-Requirements" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria_6.html#Graph-Files" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Compiling-Maria"></a>
<h1 class="appendix">C. Compiling Maria</h1>
<a name="index-compiling"></a>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#System-Requirements">C.1 System Requirements</a></td><td> </td><td align="left" valign="top"> What is needed for the compilation
</td></tr>
<tr><td align="left" valign="top"><a href="#Configuring">C.2 Editing the ‘<tt>Makefile</tt>’ files</a></td><td> </td><td align="left" valign="top"> Definitions in the ‘<tt>Makefile</tt>’ files
</td></tr>
<tr><td align="left" valign="top"><a href="#Installing">C.3 Installing Maria</a></td><td> </td><td align="left" valign="top"> Installing Maria for system-wide use
</td></tr>
<tr><td align="left" valign="top"><a href="#Debugging">C.4 Compiling Maria for Debugging</a></td><td> </td><td align="left" valign="top"> Compiling a special version for debugging
</td></tr>
<tr><td align="left" valign="top"><a href="#Bugs">C.5 Reporting Bugs</a></td><td> </td><td align="left" valign="top"></td></tr>
</table>
<hr size="6">
<a name="System-Requirements"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Compiling" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Configuring" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Compiling" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Compiling" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="System-Requirements-1"></a>
<h2 class="section">C.1 System Requirements</h2>
<p>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.
</p>
<p>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.
</p>
<p>It is recommended that you install the freely available gcc 2.95
or later on your system if you have problems compiling the code.
</p>
<p>We would like to hear success reports from people using other compilers.
Patches, even to the ‘<tt>Makefile</tt>’ files, are welcome.
</p>
<hr size="6">
<a name="Configuring"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#System-Requirements" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Installing" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Compiling" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Compiling" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Editing-the-Makefile-files"></a>
<h2 class="section">C.2 Editing the ‘<tt>Makefile</tt>’ files</h2>
<a name="index-Makefile"></a>
<p>In the top-level directory, in ‘<tt>Makefile</tt>’ and in
‘<tt>Makefile</tt>’.<var>system</var>, there are a couple of variable
definitions that you should check before invoking the compilation by
typing ‘<samp>make</samp>’. It is recommended to make ‘<samp>reallyclean</samp>’
before re-starting the compilation after making
modifications.<a name="DOCF7" href="maria_fot.html#FOOT7">(7)</a>
</p>
<dl compact="compact">
<dt> ‘<samp>HAS_READLINE</samp>’</dt>
<dt> ‘<samp>LIBREADLINE</samp>’</dt>
<dt> ‘<samp>INCREADLINE</samp>’</dt>
<dd><p>Set ‘<samp>HAS_READLINE=yes</samp>’ if the GNU Readline library is available,
and ensure that the directories have been set up properly. The library
is not a necessity; See section <a href="maria_3.html#Line-Editor">The Line Editor</a>, for the features it provides.
On some systems, you may need to add ‘<samp>-lncurses</samp>’ to the list of
libraries.
</p>
</dd>
<dt> ‘<samp>EXPR_COMPILE</samp>’</dt>
<dd><p>Set ‘<samp>EXPR_COMPILE=yes</samp>’ if your system supports dynamic loading of
shared libraries and if you want to enable the ‘<samp>-C</samp>’ command line
option (see section <a href="maria_3.html#Maria-Options">Options</a>), which will considerably speed up the
state space exploration.
</p>
</dd>
<dt> ‘<samp>EXTRA_DEFINES</samp>’</dt>
<dd><p>Extra definitions for the macro preprocessor. Set ‘<samp>-DUSE_MMAP</samp>’ in
order to enable memory mapped access to the reachability graph files on
systems that implement the POSIX.1b mmap(2) interface. This option can
considerably speed up the analysis of models that have a relatively
small number of high-level transitions. Please note that with this
option, 32-bit systems can only handle graph files whose total size is
less than 4 gigabytes, maybe even less than 1 gigabyte, depending on the
operating system.
</p>
</dd>
<dt> ‘<samp>DEBUG</samp>’</dt>
<dd><p>Debugging flags. Usually ‘<samp>-DNDEBUG</samp>’ for compiling the production
version and ‘<samp>-g</samp>’ for the debugging version.
</p>
</dd>
<dt> ‘<samp>PROF</samp>’</dt>
<dd><p>Profiling flags. Usually empty.
</p>
</dd>
<dt> ‘<samp>CXX</samp>’</dt>
<dt> ‘<samp>CC</samp>’</dt>
<dd><p>Commands for compiling modules written in C++ and C, respectively.
</p>
</dd>
<dt> ‘<samp>EXTRA_LIBS</samp>’</dt>
<dd><p>Define ‘<samp>EXTRA_LIBS=-ldl</samp>’ or similar, if you want to enable support
for compiled expressions and the dynamic loader routines are not part of
the standard libraries on your system.
</p>
</dd>
<dt> ‘<samp>DEFINES</samp>’</dt>
<dd><p>Extra flags e.g. for enabling the usage of the POSIX regular
expression library (‘<samp>-DHAS_REGEX</samp>’), of the ‘<samp>getopt_long</samp>’
function (‘<samp>-DHAS_GETOPT_LONG</samp>’), a GNU extension to the standard,
and of some extensions to the Standard Template Library
(‘<samp>-DHASH_MAP_LOC</samp>’ and ‘<samp>-DSLIST_LOC</samp>’).
</p>
</dd>
<dt> ‘<samp>CFLAGS</samp>’</dt>
<dt> ‘<samp>CXXFLAGS</samp>’</dt>
<dd><p>Flags for the C and C++ compilers e.g. for enabling optimizations.
</p></dd>
</dl>
<hr size="6">
<a name="Installing"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Configuring" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Debugging" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Compiling" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Compiling" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Installing-Maria"></a>
<h2 class="section">C.3 Installing Maria</h2>
<a name="index-installing-maria"></a>
<p>The file ‘<tt>Makefile</tt>’ in the top-level directory contains rules for
installing the ‘<tt>maria</tt>’ executable and some related files on
Unix-like systems. The installation is invoked by typing ‘<samp>make
install installman installinfo</samp>’. You may want to redefine some of the
following variables either in the ‘<tt>Makefile</tt>’ or on the ‘<tt>make</tt>’
command line:
</p>
<dl compact="compact">
<dt> <var>PREFIX</var></dt>
<dd><p>The base directory where Maria should be installed. You might want to
change this to ‘<samp>/usr/local</samp>’. The default is ‘<samp>/usr</samp>’.
</p>
</dd>
<dt> <var>INSTALLDIR</var></dt>
<dt> <var>INSTALLBIN</var></dt>
<dt> <var>INSTALLDATA</var></dt>
<dd><p>The commands for creating directories, installing executable files and
installing data files. On Apple Darwin, you will need to add the
‘<samp>-c</samp>’ switch to the latter two commands.
</p></dd>
</dl>
<hr size="6">
<a name="Debugging"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Installing" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Bugs" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Compiling" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Compiling" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Compiling-Maria-for-Debugging"></a>
<h2 class="section">C.4 Compiling Maria for Debugging</h2>
<a name="index-debugging-maria"></a>
<p>Compiling a debugging version of Maria is simple: in ‘<tt>Makefile</tt>’,
define ‘<samp>DEBUG=-g</samp>’, and you are all set. You could also disable
‘<samp>assert()</samp>’ macros by defining ‘<samp>-DNDEBUG</samp>’, 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.
</p>
<p>For detecting and debugging memory management issues, you can use the
Electric Fence Library, Valgrind for GNU/Linux, the Debug Malloc Library
(See <a href="../dmalloc/index.html#Top">(dmalloc)Top</a> or <a href="http://www.dmalloc.com">http://www.dmalloc.com</a>) or
commercial tools such as Third Degree (‘<tt>third</tt>’) on Digital
UNIX.
</p>
<p>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.
</p>
<p>Defining the ‘<samp>YYDEBUG</samp>’ macro enables grammar debugging. An
executable compiled with this macro defined will look for the
environment variable <code>DEBUG</code>. When <code>DEBUG=1</code>, 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.
</p>
<hr size="6">
<a name="Bugs"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Debugging" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Compiling" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Compiling" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Reporting-Bugs"></a>
<h2 class="section">C.5 Reporting Bugs</h2>
<a name="index-bugs_002c-reporting"></a>
<p>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.
</p>
<p>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.
</p>
<p>Bug reports and suggestions are welcome at ‘<samp>msmakela@tcs.hut.fi</samp>’.
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 ‘<samp>diff -c</samp>’ format for any patches you send.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Compiling" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maria_8.html#Examples" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maria.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maria_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maria_10.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maria_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>root</em> on <em>March 22, 2020</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
</p>
</body>
</html>
AnonSec - 2021 | Recode By D7net