Miller 5.6.1

Installation
• Miller license
• Prebuilt executables
    • Via package managers
    • Via GitHub per release
• Building from source
    • From release tarball using autoconfig
    • From git clone using autoconfig
    • Without using autoconfig
    • Windows
• In case of problems
• Dependencies
    • Required external dependencies
    • Optional external dependencies
    • Internal dependencies
• Creating a new release: for developers
• Misc. development notes

Miller license

Two-clause BSD license https://github.com/johnkerl/miller/blob/master/LICENSE.txt.

Prebuilt executables

Via package managers

Homebrew installation support for OSX is available via

brew update && brew install miller

You may already have the mlr executable available in your platform’s package manager on NetBSD, Debian Linux, Ubuntu Xenial and upward, Arch Linux, or perhaps other distributions. For example, on various Linux distributions you might do one of the following:

sudo apt-get install miller

sudo apt install miller

sudo yum install miller

Via GitHub per release

Please see https://github.com/johnkerl/miller/releases where there are builds for OSX Yosemite, Linux x86-64 (dynamically linked), and Windows (via Appveyor build artifacts).

Miller is autobuilt for Linux using Travis on every commit (https://travis-ci.org/johnkerl/miller/builds). This was set up by the generous assistance of SikhNerd on Github, tracked in https://github.com/johnkerl/miller/issues/15. Analogously, Miller is autobuilt for Windows using the Appveyor continuous-build system: https://ci.appveyor.com/project/johnkerl/miller.

Miller releases from 5.1.0w onward will have a precompiled Windows binary, in addition to the MacOSX and Linux 64-bit precompiled binaries as on previous releases. Specifically, at https://ci.appveyor.com/project/johnkerl/miller you can select Latest Build and then Artifacts to always get the current head build. Miller releases from 5.3.0 onward will simply point to a particular Appveyor artifact associated with the release.

Building from source

From release tarball using autoconfig

Miller allows you the option of using GNU autoconfigure to build portably.

Grateful acknowledgement: Miller’s GNU autoconfig work was done by the generous and expert efforts of Thomas Klausner.

From git clone using autoconfig

Without using autoconfig

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.

But, many others (myself included!) find autoconfig confusing: if it works without errors, great, but if not, the ./configure && make 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 kerl.john.r+miller@gmail.com, — or, better, open an issue with “New Issue” at https://github.com/johnkerl/miller/issues.)

Steps:

The Makefile.no-autoconfig is simple: little more than gcc *.c. 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 gcc and clang, on Ubuntu 12.04 LTS, SELinux, Darwin (MacOS Yosemite), and FreeBSD.

Windows

Disclaimer: I’m now relying exclusively on Appveyor for Windows builds; I haven’t built from source using MSYS in quite a while.

Miller has been built on Windows using MSYS2: http://www.msys2.org/. You can install MSYS2 and build Miller from its source code within MSYS2, and then you can use the binary from outside MSYS2. You can also use a precompiled binary (see above).

You will first need to install MSYS2: http://www.msys2.org/. Then, start an MSYS2 shell, e.g. (supposing you installed MSYS2 to C:\msys2\) run C:\msys2\mingw64.exe. Within the MSYS2 shell, you can run the following to install dependent packages:

pacman -Syu
pacman -Su
pacman -S base-devel
pacman -S msys2-devel
pacman -S mingw-w64-x86_64-toolchain
pacman -S mingw-w64-x86_64-pcre
pacman -S msys2-runtime

The list of dependent packages may be also found in appveyor.yml in the Miller base directory.

Then, simply run msys2-build.sh which is a thin wrapper around ./configure && make which accommodates certain Windows/MSYS2 idiosyncracies.

There is a unit-test false-negative issue involving the semantics of the mkstemp library routine but a make -k in the c subdirectory has been producing a mlr.exe for me.

Within MSYS2 you can run mlr: simply copy it from the c subdirectory to your desired location somewhere within your MSYS2 $PATH. To run mlr outside of MSYS2, just as with precompiled binaries as described above, you’ll need msys-2.0.dll. One way to do this is to augment your path:

C:\> set PATH=%PATH%;\msys64\mingw64\bin

Another way to do it is to copy the Miller executable and the DLL to the same directory:

C:\> mkdir \mbin
C:\> copy \msys64\mingw64\bin\msys-2.0.dll \mbin
C:\> copy \msys64\wherever\you\installed\miller\c\mlr.exe \mbin
C:\> set PATH=%PATH%;\mbin

In case of problems

If you have any build errors, feel free to contact me at kerl.john.r+miller@gmail.com, — or, better, open an issue with “New Issue” at https://github.com/johnkerl/miller/issues.

Dependencies

Required external dependencies

These are necessary to produce the mlr executable.

Optional external dependencies

This documentation pageset is built using Poki:
docs here, source code here. Note that http://johnkerl.org/miller/doc/index.html is nothing more than Miller’s doc directory served up by a web server. You’ll need poki 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 make install as above, then run poki in Miller’s doc subdirectory, then run git diff to see if docs were affected by the code mod. (If so, commit and push them.)

Internal dependencies

These are included within the
Miller source tree and do not need to be separately installed (and in fact any separate installation will not be picked up in the Miller build):

Creating a new release: for developers

At present I’m the primary developer so this is just my checklist for making new releases.

In this example I am using version 3.4.0; of course that will change for subsequent revisions.

Misc. development notes

I use terminal width 120 and tabwidth 4.