/usr/share/mozart/doc/install/node8.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>6.2 Acquiring the Required Packages</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node7.html#section.cygwin.environment"><< Prev</A></TD><TD><A href="node6.html">- Up -</A></TD><TD><A href="node9.html#section.cygwin.building">Next >></A></TD></TR></TABLE><DIV id="section.cygwin.packages"><H2><A name="section.cygwin.packages">6.2 Acquiring the Required Packages</A></H2><DIV class="apropos"><P class="margin">Package Directory</P><P> We will install all our packages in a new directory we create especially for them. Say this directory is <CODE>/opt/packages</CODE>. Whatever it is, we will refer to it as <I>packages</I> throughout this document. Furthermore, we populate the <I>packages</I> directory with the following subdirectories: </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TH><P>Directory</P></TH><TH><P>Purpose </P></TH></TR><TR valign="top"><TD><P><CODE>dlls</CODE></P></TD><TD><P>For the Dynamically Linked Libraries (DLLs). </P></TD></TR><TR valign="top"><TD><P><CODE>include</CODE></P></TD><TD><P>For the packages' C/C++ header files (<CODE>.h</CODE>). </P></TD></TR><TR valign="top"><TD><P><CODE>lib</CODE></P></TD><TD><P>For the libraries (<CODE>.a</CODE>). </P></TD></TR></TABLE><P> Furthermore, we create a separate directory for the builds, for example, <CODE>/tmp/build</CODE>. We will refer to this as <I>build</I>. </P></DIV><DIV class="apropos"><P class="margin">Required Packages</P><P> The following table lists the packages we need, along with their versions and the place where they can be downloaded. </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TH><P>Package</P></TH><TH><P>Version</P></TH><TH><P>Location </P></TH></TR><TR valign="top"><TD><P>GNU MP</P></TD><TD><P>4.1.4 </P></TD><TD><P><A href="ftp://ftp.gnu.org/pub/gnu/gmp/gmp-4.1.4.tar.gz"><CODE>ftp://ftp.gnu.org/pub/gnu/gmp/gmp-4.1.4.tar.gz</CODE></A> </P></TD></TR><TR valign="top"><TD><P>zlib</P></TD><TD><P>1.2.3 </P></TD><TD><P><A href="http://www.gzip.org/zlib-1.2.3.tar.gz"><CODE>http://www.gzip.org/zlib-1.2.3.tar.gz</CODE></A> </P></TD></TR><TR valign="top"><TD><P>Tcl/Tk</P></TD><TD><P>8.4.12.0 </P></TD><TD><P><A href="http://aspn.activestate.com/ASPN/Downloads/ActiveTcl/"><CODE>http://aspn.activestate.com/ASPN/Downloads/ActiveTcl/</CODE></A> </P></TD></TR><TR valign="top"><TD><P>GDBM</P></TD><TD><P>1.8.3 </P></TD><TD><P><A href="ftp://ftp.gnu.org/pub/gnu/gdbm/gdbm-1.8.3.tar.gz"><CODE>ftp://ftp.gnu.org/pub/gnu/gdbm/gdbm-1.8.3.tar.gz</CODE></A> </P></TD></TR><TR valign="top"><TD><P>regex</P></TD><TD><P>0.12 </P></TD><TD><P><A href="ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz"><CODE>ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz</CODE></A> </P></TD></TR></TABLE><P> Note that these are all source packages except for Tcl/Tk. You'll soon find out why. </P></DIV><DIV class="apropos"><P class="margin">Build Flags</P><P> The remainder of this chapter will use <I>CFLAGS</I> to indicate a meaningful set of flags for the C/C++ compilers. For instance, you can use the following, which we used for the last releases: </P><BLOCKQUOTE class="code"><CODE>-mno-cygwin -O3 -fomit-frame-pointer -march=i586 -mcpu=i686</CODE></BLOCKQUOTE><P> It is imperative that you include <CODE>-mno-cygwin</CODE>! </P></DIV><DIV class="apropos"><P class="margin">A Note for the Lazy</P><P> There's some good news: If you are lazy enough that you would trust the packages I built, you can just obtain a copy of my <I>packages</I> directory from <A href="http://www.mozart-oz.org/download/mozart-ftp/extras/packages.tgz"><CODE>http://www.mozart-oz.org/download/mozart-ftp/extras/packages.tgz</CODE></A> and skip most of the following sections (in fact, all but those about the msvcrt and Emacs). Be sure to adapt the included <CODE>tclConfig.sh</CODE> and <CODE>tkConfig.sh</CODE> files to reflect your system's paths! </P></DIV><H3><A name="label5">6.2.1 Microsoft Visual C++ Runtime</A></H3><P> This one is easy: You already have it! It is located in <CODE>$<SPAN class="variablename">SYSTEMROOT</SPAN>/system32/</CODE> (at least under Windows 2000; if you're running 9x, then you'll have to locate it yourself). So we just copy it to our <I>packages</I><CODE>/dlls</CODE> directory: </P><BLOCKQUOTE class="code"><CODE>cp $<SPAN class="variablename">SYSTEMROOT</SPAN>/system32/msvcrt.dll </CODE><I>packages</I><CODE>/dlls</CODE></BLOCKQUOTE><P> </P><H3><A name="label6">6.2.2 GNU MP</A></H3><P> Unpack it, configure it, build it, and install it thus: </P><BLOCKQUOTE class="code"><CODE><SPAN class="builtin">cd</SPAN> </CODE><I>build</I><CODE> <BR>tar zxvf gmp-4.1.2.tar.gz<BR><SPAN class="builtin">cd</SPAN> gmp-4.1.2<BR>./configure --prefix=</CODE><I>packages</I><CODE> --disable-shared <SPAN class="variablename">CFLAGS</SPAN>=<SPAN class="string">"</SPAN></CODE><I>CFLAGS</I><CODE><SPAN class="string">"</SPAN> <BR>make<BR>make install</CODE></BLOCKQUOTE><P> </P><P> You should end up with the following files: </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TD><P><I>packages</I><CODE>/include/gmp.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/lib/libgmp.a</CODE> </P></TD></TR></TABLE><P> </P><H3><A name="label7">6.2.3 zlib</A></H3><P> Unpack it, configure it, build it, and install it thus: </P><BLOCKQUOTE class="code"><CODE><SPAN class="builtin">cd</SPAN> </CODE><I>build</I><CODE> <BR>tar zxvf zlib.tar.gz<BR><SPAN class="builtin">cd</SPAN> zlib-1.1.4<BR><SPAN class="variablename">CFLAGS</SPAN>=<SPAN class="string">"</SPAN></CODE><I>CFLAGS</I><CODE><SPAN class="string">"</SPAN> ./configure --prefix=</CODE><I>packages</I><CODE> <BR>make<BR>make install</CODE></BLOCKQUOTE><P> </P><P> You should end up with the following files: </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TD><P><I>packages</I><CODE>/include/zlib.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/zconf.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/lib/libz.a</CODE> </P></TD></TR></TABLE><P> </P><H3><A name="label8">6.2.4 Tcl/Tk</A></H3><P> Install your Tcl/Tk distribution (for example, ActiveTcl). Copy the following files and directories from the installed location: </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TD><P><I>packages</I><CODE>/include/tcl.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/tclDecls.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/tclPlatDecls.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/tk.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/tkDecls.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/tkIntXlibDecls.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/tkPlatDecls.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/include/X11/*</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/lib/tk8.4/*</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/lib/tcl8.4/*</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/dlls/tcl84.dll</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/dlls/tclpip84.dll</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/dlls/tk84.dll</CODE> </P></TD></TR></TABLE><P> Unfortunately, Windows Tcl/Tk distributions come without the all-important <CODE>tclConfig.sh</CODE> and <CODE>tkConfig.sh</CODE> files, which we therefore have to create manually (directly in the <I>packages</I> directory). <CODE>tclConfig.sh</CODE> should have the following contents: </P><BLOCKQUOTE class="code"><CODE># <SPAN class="comment">tclConfig.sh --<BR></SPAN><SPAN class="variablename">TCL_VERSION</SPAN>=<SPAN class="string">'8.4'</SPAN> <BR><SPAN class="variablename">TCL_PREFIX</SPAN>=<SPAN class="string">'</SPAN></CODE><I>packages</I><CODE><SPAN class="string">'</SPAN> <BR><SPAN class="variablename">TCL_LIBS</SPAN>=<SPAN class="string">''</SPAN> <BR><SPAN class="variablename">TCL_LIB_SPEC</SPAN>=<SPAN class="string">'</SPAN></CODE><I>packages</I><CODE><SPAN class="string">/dlls/tcl84.dll'</SPAN></CODE></BLOCKQUOTE><P> Whereas <CODE>tkConfig.sh</CODE> ought to look like this: </P><BLOCKQUOTE class="code"><CODE># <SPAN class="comment">tkConfig.sh --<BR></SPAN><SPAN class="variablename">TK_VERSION</SPAN>=<SPAN class="string">'8.4'</SPAN> <BR><SPAN class="variablename">TK_PREFIX</SPAN>=<SPAN class="string">'</SPAN></CODE><I>packages</I><CODE><SPAN class="string">'</SPAN> <BR><SPAN class="variablename">TK_LIBS</SPAN>=<SPAN class="string">''</SPAN> <BR><SPAN class="variablename">TK_LIB_SPEC</SPAN>=<SPAN class="string">'</SPAN></CODE><I>packages</I><CODE><SPAN class="string">/dlls/tk84.dll'</SPAN> <BR><SPAN class="variablename">TK_XINCLUDES</SPAN>=<SPAN class="string">''</SPAN></CODE></BLOCKQUOTE><P> (Don't forget to substitute your actual packages directory for <I>packages</I> in these files!) </P><H3><A name="label9">6.2.5 GDBM</A></H3><P> Unpack it thus: </P><BLOCKQUOTE class="code"><CODE><SPAN class="builtin">cd</SPAN> </CODE><I>packages</I><CODE> <BR>tar zxvf gdbm-1.8.3.tar.gz<BR><SPAN class="builtin">cd</SPAN> gdbm-1.8.3</CODE></BLOCKQUOTE><P> GDBM does not compile out-of-the-box for MinGW, so we have to apply a patch. Copy the file <A href="gdbm-1.8.3-patch.diff">gdbm-1.8.3-patch.diff</A>, then patch it, configure it, build it, and install it thus: </P><BLOCKQUOTE class="code"><CODE>patch < gdbm-1.8.3-patch.diff<BR><SPAN class="variablename">CFLAGS</SPAN>=<SPAN class="string">"</SPAN></CODE><I>CFLAGS</I><CODE><SPAN class="string">"</SPAN> ./configure --disable-shared<BR>make <SPAN class="variablename">CFLAGS</SPAN>=<SPAN class="string">"</SPAN></CODE><I>CFLAGS</I><CODE><SPAN class="string">"</SPAN> <BR>make <SPAN class="variablename">prefix</SPAN>=</CODE><I>packages</I><CODE> install</CODE></BLOCKQUOTE><P> </P><P> You should end up with the following files: </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TD><P><I>packages</I><CODE>/include/gdbm.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/lib/libgdbm.a</CODE> </P></TD></TR></TABLE><P> </P><H3><A name="label10">6.2.6 regex</A></H3><P> Unpack it thus: </P><BLOCKQUOTE class="code"><CODE><SPAN class="builtin">cd</SPAN> </CODE><I>packages</I><CODE> <BR>tar zxvf regex-0.12.tar.gz<BR><SPAN class="builtin">cd</SPAN> regex-0.12</CODE></BLOCKQUOTE><P> Like GDBM, the regex package needs a patch <A href="regex-0.12-patch.diff">regex-0.12-patch.diff</A>. Patch the package, configure it, build it, and install it thus: </P><BLOCKQUOTE class="code"><CODE>patch < regex-0.12-patch.diff<BR><SPAN class="variablename">CFLAGS</SPAN>=<SPAN class="string">"</SPAN></CODE><I>CFLAGS</I><CODE><SPAN class="string">"</SPAN> ./configure --prefix=</CODE><I>packages</I><CODE> <BR>make <SPAN class="variablename">CFLAGS</SPAN>=<SPAN class="string">"</SPAN></CODE><I>CFLAGS</I><CODE><SPAN class="string">"</SPAN> <BR>make <SPAN class="variablename">prefix</SPAN>=</CODE><I>packages</I><CODE> install</CODE></BLOCKQUOTE><P> </P><P> You should end up with the following files: </P><TABLE align="center" bgcolor="#f0f0e0"><TR valign="top"><TD><P><I>packages</I><CODE>/include/regex.h</CODE> </P></TD></TR><TR valign="top"><TD><P><I>packages</I><CODE>/lib/libregex.a</CODE> </P></TD></TR></TABLE><P> </P><H3><A name="label11">6.2.7 Emacs</A></H3><P> You need an installed Emacs. You can get it at <A href="http://www.gnu.org/software/emacs/windows/"><CODE>http://www.gnu.org/software/emacs/windows/</CODE></A>. Unpack it somewhere, for example to <CODE>/cygdrive/c/Program\ Files/</CODE> and execute the <CODE>addpm.exe</CODE> binary in the <CODE>bin</CODE> subdirectory. We will refer to the directory where Emacs is installed as <I>emacs</I>. </P><P> You really need to use the Emacs version you have installed in your Windows system. If you have Emacs installed along with cygwin, you have to change your PATH to build Mozart in order to find first the Emacs that it's installed for Windows. Be aware that the <CODE>configure</CODE> script is not going to check whether you have Emacs installed in your system, but it will be necessary to build, so install it NOW! </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node7.html#section.cygwin.environment"><< Prev</A></TD><TD><A href="node6.html">- Up -</A></TD><TD><A href="node9.html#section.cygwin.building">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif Kornstaedt</A>, <A href="http://www.ps.uni-sb.de/~scheidhr/">Ralf Scheidhauer</A> and <A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|