mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 08:55:41 +00:00
336 lines
14 KiB
HTML
336 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en">
|
|
|
|
<!-- PAGE GENERATED FROM template.html and content-for-build.html BY poki. -->
|
|
<!-- PLEASE MAKE CHANGES THERE AND THEN RE-RUN poki. -->
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
|
|
<meta name="description" content="Miller documentation"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <!-- mobile-friendly -->
|
|
<meta name="keywords"
|
|
content="John Kerl, Kerl, Miller, miller, mlr, OLAP, data analysis software, regression, correlation, variance, data tools, " />
|
|
|
|
<title> Installation, portability, dependencies, and testing </title>
|
|
<link rel="stylesheet" type="text/css" href="css/miller.css"/>
|
|
<link rel="stylesheet" type="text/css" href="css/poki-callbacks.css"/>
|
|
</head>
|
|
|
|
<!-- ================================================================ -->
|
|
<script type="text/javascript">
|
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
|
</script>
|
|
<script type="text/javascript">
|
|
try {
|
|
var pageTracker = _gat._getTracker("UA-15651652-1");
|
|
pageTracker._trackPageview();
|
|
} catch(err) {}
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
function toggle(divName) {
|
|
var eleDiv = document.getElementById(divName);
|
|
if (eleDiv != null) {
|
|
if (eleDiv.style.display == "block") {
|
|
eleDiv.style.display = "none";
|
|
} else {
|
|
eleDiv.style.display = "block";
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<!--
|
|
The background image is from a screenshot of a Google search for "data analysis
|
|
tools", lightened and sepia-toned. Over this was placed a Mac Terminal app with
|
|
very light-grey font and translucent background, in which a few statistical
|
|
Miller commands were run with pretty-print-tabular output format.
|
|
-->
|
|
<body background="pix/sepia-overlay.jpg">
|
|
|
|
<!-- ================================================================ -->
|
|
<table width="100%">
|
|
<tr>
|
|
|
|
<!-- navbar -->
|
|
<td width="15%">
|
|
<!--
|
|
<img src="pix/mlr.jpg" />
|
|
<img style="border-width:1px; color:black;" src="pix/mlr.jpg" />
|
|
-->
|
|
|
|
<div class="pokinav">
|
|
<center><titleinbody>Miller</titleinbody></center>
|
|
|
|
<!-- PAGE LIST GENERATED FROM template.html BY poki -->
|
|
<br/>• <a href="index.html">About Miller</a>
|
|
<br/>• <a href="file-formats.html">File formats</a>
|
|
<br/>• <a href="feature-comparison.html">Miller features in the context of the Unix toolkit</a>
|
|
<br/>• <a href="record-heterogeneity.html">Record-heterogeneity</a>
|
|
<br/>• <a href="reference.html">Reference</a>
|
|
<br/>• <a href="data-examples.html">Data examples</a>
|
|
<br/>• <a href="cookbook.html">Cookbook</a>
|
|
<br/>• <a href="faq.html">FAQ</a>
|
|
<br/>• <a href="internationalization.html">Internationalization</a>
|
|
<br/>• <a href="build.html"><b>Installation, portability, dependencies, and testing</b></a>
|
|
<br/>• <a href="performance.html">Performance</a>
|
|
<br/>• <a href="whyc.html">Why C?</a>
|
|
<br/>• <a href="etymology.html">Why call it Miller?</a>
|
|
<br/>• <a href="originality.html">How original is Miller?</a>
|
|
<br/>• <a href="to-do.html">Things to do</a>
|
|
<br/>• <a href="release-docs.html">Documents by release</a>
|
|
<br/>• <a href="contact.html">Contact information</a>
|
|
<br/>• <a href="https://github.com/johnkerl/miller">GitHub repo</a>
|
|
<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
|
|
<br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/>
|
|
<br/> <br/> <br/> <br/> <br/> <br/>
|
|
</div>
|
|
</td>
|
|
|
|
<!-- page body -->
|
|
<td>
|
|
<!--
|
|
This is a visually gorgeous feature (here & in the CSS): it allows for
|
|
independent scroll of the nav and body panels. In particular the nav
|
|
stays on-screen as you scroll the body.
|
|
|
|
However, two problems:
|
|
|
|
(1) In Firefox & Chrome both I get janky end-of-body scrolls: there is
|
|
more content but I can't scroll down to it unless I repeatedly retry the
|
|
scrolldown. Which is weird.
|
|
|
|
(2) Worse, only the first page renders in PDF (again, Firefox & Chrome).
|
|
|
|
For now I'm disabling this separate-scroll feature. A frontender, I am
|
|
not ... maybe someday I'll find a config which gets *all* the features
|
|
I want; for now, it's a tradeoff.
|
|
-->
|
|
|
|
<!-- Implementation details: one bit is right here:
|
|
|
|
div style="overflow-y:scroll;height:1500px"
|
|
|
|
and the other bit is in css/poki-callbacks.css:
|
|
|
|
.pokinav {
|
|
display: inline-block;
|
|
background: #e8d9bc;
|
|
border: 1;
|
|
box-shadow: 0px 0px 3px 3px #C9C9C9;
|
|
margin: 10px;
|
|
padding-top: 10px;
|
|
padding-bottom: 10px;
|
|
padding-left: 10px;
|
|
padding-right: 10px;
|
|
overflow-y: scroll; < - - - - - - here
|
|
height: 1500px;
|
|
}
|
|
|
|
-->
|
|
<div>
|
|
<center> <titleinbody> Installation, portability, dependencies, and testing </titleinbody> </center>
|
|
<p/>
|
|
|
|
<!-- BODY COPIED FROM content-for-build.html BY poki -->
|
|
<div class="pokitoc">
|
|
<center><b>Contents:</b></center>
|
|
• <a href="#Prebuilt_executables">Prebuilt executables</a><br/>
|
|
• <a href="#Building_from_source">Building from source</a><br/>
|
|
• <a href="#From_release_tarball_using_autoconfig">From release tarball using autoconfig</a><br/>
|
|
• <a href="#From_git_clone_using_autoconfig">From git clone using autoconfig</a><br/>
|
|
• <a href="#Creating_a_release_tarball">Creating a release tarball</a><br/>
|
|
• <a href="#Without_using_autoconfig">Without using autoconfig</a><br/>
|
|
• <a href="#In_case_of_problems">In case of problems</a><br/>
|
|
• <a href="#Dependencies">Dependencies</a><br/>
|
|
• <a href="#Required_external_dependencies">Required external dependencies</a><br/>
|
|
• <a href="#Optional_external_dependencies">Optional external dependencies</a><br/>
|
|
• <a href="#Internal_dependencies">Internal dependencies</a><br/>
|
|
• <a href="#Miller_license">Miller license</a><br/>
|
|
</div>
|
|
<p/>
|
|
|
|
<a id="Prebuilt_executables"/><h1>Prebuilt executables</h1>
|
|
|
|
<p/> Please see <a href="https://github.com/johnkerl/miller/releases">
|
|
https://github.com/johnkerl/miller/releases</a> where there are builds for OSX
|
|
Yosemite, Linux i686 (statically linked), and Linux x86-64 (dynamically
|
|
linked).
|
|
|
|
<p/> Homebrew installation support for OSX is available via
|
|
|
|
<p/>
|
|
<div class="pokipanel">
|
|
<pre>
|
|
brew update && brew install miller
|
|
</pre>
|
|
</div>
|
|
<p/>
|
|
|
|
<p/> You may already have <tt>mlr</tt> available in your platform’s
|
|
package manager on NetBSD, Debian Linux, Ubuntu Xenial and upward, Arch Linux, or perhaps other distributions.
|
|
For example, on Debian/Ubuntu, you can try
|
|
|
|
<p/>
|
|
<div class="pokipanel">
|
|
<pre>
|
|
sudo apt-get install miller
|
|
</pre>
|
|
</div>
|
|
<p/>
|
|
|
|
<a id="Building_from_source"/><h1>Building from source</h1>
|
|
|
|
<a id="From_release_tarball_using_autoconfig"/><h2>From release tarball using autoconfig</h2>
|
|
|
|
<p/>Miller allows you the option of using GNU autoconfigure to build portably.
|
|
|
|
<p/>Grateful acknowledgement: Miller’s GNU autoconfig work was done by
|
|
the generous and expert efforts of <a href="https://github.com/0-wiz-0/">Thomas
|
|
Klausner</a>.
|
|
|
|
<ul>
|
|
<li/> Install the <tt>flex</tt> package using your system’s package
|
|
manager (<tt>apt-get</tt>, <tt>yum install</tt>, etc.).
|
|
<li/> Obtain <tt>mlr-i.j.k.tar.gz</tt> from <a
|
|
href="https://github.com/johnkerl/miller/tags">https://github.com/johnkerl/miller/tags</a>,
|
|
replacing <tt>i.j.k</tt> with the desired release, e.g. <tt>2.2.1</tt>.
|
|
<li/> <tt>tar zxvf mlr-i.j.k.tar.gz</tt>
|
|
<li/> <tt>cd mlr-i.j.k</tt>
|
|
<li> Various configuration options of your choice, e.g.
|
|
<ul>
|
|
<li/> <tt>./configure</tt>
|
|
<li/> <tt>./configure --prefix=/usr/local</tt>
|
|
<li/> <tt>./configure --prefix=$HOME/pkgs</tt>
|
|
<li/> <tt>./configure CC=clang</tt>
|
|
<li/> <tt>./configure --disable-shared</tt> (to make a statically linked executable)
|
|
<li/> <tt>./configure 'CFLAGS=-Wall -std=gnu99 -O3'</tt>
|
|
<li/> etc.
|
|
</ul>
|
|
<li/> <tt>make</tt> creates the <tt>c/mlr</tt> executable
|
|
<li/> <tt>make check</tt>
|
|
<li/> <tt>make install</tt> copies the <tt>c/mlr</tt> executable to your prefix’s <tt>bin</tt> subdirectory.
|
|
</ul>
|
|
|
|
<a id="From_git_clone_using_autoconfig"/><h2>From git clone using autoconfig</h2>
|
|
|
|
<ul>
|
|
<li/> Install the following packages using your system’s package manager
|
|
(<tt>apt-get</tt>, <tt>yum install</tt>, etc.):
|
|
<tt>automake autoconf libtool flex</tt>
|
|
|
|
<li/> <tt>git clone https://github.com/johnkerl/miller</tt>
|
|
<li/> <tt>cd miller</tt>
|
|
<li/> <tt>autoreconf -fiv</tt>
|
|
<li/> Then continue from <tt>./configure</tt> as above.
|
|
</ul>
|
|
|
|
<a id="Creating_a_release_tarball"/><h2>Creating a release tarball</h2>
|
|
|
|
<ul>
|
|
<li/> Proceed from git-clone as above.
|
|
<li/> Then edit the package version at the top of <tt>configure.ac</tt> as well as <tt>c/mlrvers.h</tt>.
|
|
<li/> Then <tt>make distcheck</tt>.
|
|
</ul>
|
|
|
|
<a id="Without_using_autoconfig"/><h2>Without using autoconfig</h2>
|
|
|
|
<p/> GNU autoconfig is familiar to many users, and indeed plenty of folks won’t bother to use an open-source
|
|
software package which doesn’t have autoconfig support. And this is for good reason: GNU autoconfig allows
|
|
us to build software on a wide diversity of platforms. For this reason I’m happy that Miller supports
|
|
autoconfig.
|
|
|
|
<p/>But, many others (myself included!) find autoconfig confusing: if it works
|
|
without errors, great, but if not, the <tt>./configure && make</tt>
|
|
output can be exceedingly difficult to decipher. And this also can be a
|
|
turn-off for using open-source software: if you can’t figure out the
|
|
build errors, you may just keep walking. For this reason I’m happy that
|
|
Miller allows you to build without autoconfig. (Of course, if you have any
|
|
build errors, feel free to contact me at
|
|
<a href="mailto:kerl.john.r+miller@gmail.com">kerl.john.r+miller@gmail.com</a>,
|
|
— or, better, open an issue with “New Issue” at
|
|
<a href="https://github.com/johnkerl/miller/issues">
|
|
https://github.com/johnkerl/miller/issues</a>.)
|
|
|
|
<p/>Steps:
|
|
<ul>
|
|
<li/> Obtain a release tarball or git clone.
|
|
<li/> <tt>cd</tt> into the <tt>c</tt> subdirectory.
|
|
<li/> Edit the <tt>INSTALLDIR</tt> in <tt>Makefile.no-autoconfig</tt>.
|
|
<li/> To change the C compiler, edit the <tt>CC=</tt> lines in
|
|
<tt>Makefile.no-autoconfig</tt> and <tt>dsls/Makefile.no-autoconfig</tt>.
|
|
<li/> <tt>make -f Makefile.no-autoconfig</tt> creates the <tt>mlr</tt>
|
|
executable and runs unit/regression tests (i.e. the equivalent of both
|
|
<tt>make</tt> and <tt>make check</tt> using autoconfig).
|
|
<li/> <tt>make install</tt> copies the <tt>mlr</tt> executable to your install directory.
|
|
</ul>
|
|
|
|
<p/>The <tt>Makefile.no-autoconfig</tt> is simple: little more than <tt>gcc
|
|
*.c</tt>. Customzing is less automatic than autoconfig, but more transparent.
|
|
I expect this makefile to work with few modifications on a large fraction of
|
|
modern Linux/BSD-like systems: I’m aware of successful use with
|
|
<tt>gcc</tt> and <tt>clang</tt>, on Ubuntu 12.04 LTS, SELinux, Darwin (MacOS
|
|
Yosemite), and FreeBSD.
|
|
|
|
<a id="In_case_of_problems"/><h1>In case of problems</h1>
|
|
|
|
<p/> If you have any build errors, feel free to contact me at <a
|
|
href="mailto:kerl.john.r+miller@gmail.com">kerl.john.r+miller@gmail.com</a>,
|
|
— or, better, open an issue with “New Issue” at
|
|
<a href="https://github.com/johnkerl/miller/issues">
|
|
https://github.com/johnkerl/miller/issues</a>.
|
|
|
|
<a id="Dependencies"/><h1>Dependencies</h1>
|
|
|
|
<a id="Required_external_dependencies"/><h2>Required external dependencies</h2>
|
|
|
|
<p/> These are necessary to produce the <tt>mlr</tt>
|
|
executable.
|
|
<ul>
|
|
<li/> <tt>gcc</tt>, <tt>clang</tt>, etc. (or presumably other compilers; please
|
|
open an issue or send me a pull request if you have information for me about
|
|
other 21st-century compilers)
|
|
<li/> The standard C library
|
|
<li/> <tt>flex</tt>
|
|
<li/> <tt>automake</tt>, <tt>autoconf</tt>, and <tt>libtool</tt>, if you build with autoconfig
|
|
</ul>
|
|
|
|
<a id="Optional_external_dependencies"/><h2>Optional external dependencies</h2>
|
|
|
|
This documentation pageset is built using <boldmaroon>Poki</boldmaroon>:
|
|
<a href="http://johnkerl.org/poki/doc">docs here</a>,
|
|
<a href="https://github.com/johnkerl/poki">source code here</a>.
|
|
Note that <a href="http://johnkerl.org/miller/doc/index.html">http://johnkerl.org/miller/doc/index.html</a>
|
|
is nothing more than Miller’s <tt>doc</tt> directory served up by a web server.
|
|
You’ll need <tt>poki</tt> if you modify documents, or if you modify the code in a way that affects the documents
|
|
(there are auto-run snippets inserted into the doc).
|
|
The best way to discover this is to run <tt>make install</tt> as above, then run <tt>poki</tt> in Miller’s
|
|
<tt>doc</tt> subdirectory, then run <tt>git diff</tt> to see if docs were affected
|
|
by the code mod. (If so, commit and push them.)
|
|
|
|
<a id="Internal_dependencies"/><h2>Internal dependencies</h2>
|
|
These are included within the <a href="https://github.com/johnkerl/miller">Miller source tree</a> and do not
|
|
need to be separately installed (and in fact any separate installation will not be picked up in the Miller build):
|
|
<ul>
|
|
<li/><a href="http://en.wikipedia.org/wiki/Mersenne_Twister">Mersenne Twister</a> for pseudorandom-number
|
|
generation: <a href="https://github.com/johnkerl/miller/blob/master/c/lib/mtrand.c">C implementation by Nishimura and Matsumoto</a> with license terms respected.
|
|
<li/> <a href="http://www.jera.com/techinfo/jtns/jtn002.html">MinUnit</a> for unit-testing,
|
|
with as-is-no-warranty license <a href="http://www.jera.com/techinfo/jtns/jtn002.html#License">http://www.jera.com/techinfo/jtns/jtn002.html#License</a>,
|
|
<a href="https://github.com/johnkerl/miller/blob/master/c/lib/minunit.h">
|
|
https://github.com/johnkerl/miller/blob/master/c/lib/minunit.h</a>.
|
|
<li/> The <a href="http://www.hwaci.com/sw/lemon/">Lemon parser-generator</a>, the author of which
|
|
<a href="https://github.com/johnkerl/miller/blob/master/c/dsls/lemon.c">explicitly disclaims
|
|
copyright</a>.
|
|
<li/> The <a href="https://github.com/udp/json-parser">udp JSON parser</a>, with BSD2 license.
|
|
</ul>
|
|
|
|
<a id="Miller_license"/><h1>Miller license</h1>
|
|
|
|
<p/>Two-clause BSD license <a href="https://github.com/johnkerl/miller/blob/master/LICENSE.txt">
|
|
https://github.com/johnkerl/miller/blob/master/LICENSE.txt</a>.
|
|
</div>
|
|
</td>
|
|
|
|
</table>
|
|
</body>
|
|
</html>
|