| 1 | Building and Installing Oils - old CPython build
 | 
| 2 | ================================================
 | 
| 3 | 
 | 
| 4 | Oils is a new Unix shell.  This file is INSTALL-old.txt, and it describes how
 | 
| 5 | to configure, build, and install the oil-$VERSION tarball.
 | 
| 6 | 
 | 
| 7 | The tarball contains an older, slower reference implementation based on CPython
 | 
| 8 | code.
 | 
| 9 | 
 | 
| 10 | You may want INSTALL.txt instead, which tells you how to build the fast
 | 
| 11 | oils-for-unix-$VERSION tarball.
 | 
| 12 | 
 | 
| 13 | Quick Start
 | 
| 14 | -----------
 | 
| 15 | 
 | 
| 16 | If you haven't already done so, extract the tarball:
 | 
| 17 |  
 | 
| 18 |     tar -x --xz < oil-0.22.0.tar.xz
 | 
| 19 |     cd oil-0.22.0
 | 
| 20 | 
 | 
| 21 | Either install as /usr/local/bin/osh:
 | 
| 22 | 
 | 
| 23 |     ./configure      # completes very quickly
 | 
| 24 |     make             # 30-60 seconds
 | 
| 25 |     sudo ./install
 | 
| 26 | 
 | 
| 27 | or install as ~/bin/osh and the man page as ~/.local/share/man/man1/osh.1:
 | 
| 28 | 
 | 
| 29 |     ./configure --prefix ~ --datarootdir ~/.local/share
 | 
| 30 |     make
 | 
| 31 |     ./install
 | 
| 32 | 
 | 
| 33 | The latter doesn't require root access, but it requires:
 | 
| 34 | 
 | 
| 35 | - ~/bin to be in your $PATH
 | 
| 36 | - Pages under ~/.local/share/man to be found by 'man'.
 | 
| 37 |   (See manpath or $MANPATH.)
 | 
| 38 | 
 | 
| 39 | NOTE: Out-of-tree builds are NOT currently supported, so you have to be in the
 | 
| 40 | oil-0.22.0 directory.
 | 
| 41 | 
 | 
| 42 | Smoke Test
 | 
| 43 | ----------
 | 
| 44 | 
 | 
| 45 | OSH behaves like a POSIX shell:
 | 
| 46 | 
 | 
| 47 |     $ osh -c 'echo hi'
 | 
| 48 |     hi
 | 
| 49 | 
 | 
| 50 | This parses and prints a syntax tree for the 'configure' script.
 | 
| 51 | 
 | 
| 52 |     osh -n configure
 | 
| 53 | 
 | 
| 54 | More Documentation
 | 
| 55 | ------------------
 | 
| 56 | 
 | 
| 57 | Every release has a home page with links, e.g.
 | 
| 58 | 
 | 
| 59 |     https://oilshell.org/release/0.22.0/
 | 
| 60 | 
 | 
| 61 | System Requirements
 | 
| 62 | -------------------
 | 
| 63 | 
 | 
| 64 | Roughly speaking, you need:
 | 
| 65 | 
 | 
| 66 |   - an ANSI C environment (compiler and libc)
 | 
| 67 |   - GNU Bash
 | 
| 68 |   - GNU Make.
 | 
| 69 | 
 | 
| 70 | (I want to remove the GNU requirements and require only POSIX sh instead).
 | 
| 71 | 
 | 
| 72 | Optional:
 | 
| 73 | 
 | 
| 74 |   - GNU readline library, for interactive features
 | 
| 75 |     (https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
 | 
| 76 | 
 | 
| 77 | Debian/Ubuntu and derivatives:
 | 
| 78 | 
 | 
| 79 |     sudo apt install build-essential libreadline-dev
 | 
| 80 | 
 | 
| 81 | Alpine Linux:
 | 
| 82 | 
 | 
| 83 |     apk add libc-dev gcc bash make readline-dev
 | 
| 84 | 
 | 
| 85 | OSH has been tested in several Linux distros and OS X.  It aims to run on any
 | 
| 86 | POSIX system.  If it doesn't, file a bug here:
 | 
| 87 | 
 | 
| 88 |     https://github.com/oilshell/oil/issues
 | 
| 89 | 
 | 
| 90 | Build Options
 | 
| 91 | -------------
 | 
| 92 | 
 | 
| 93 | ./configure --help will show the options.  Right now, the only significant
 | 
| 94 | options are --prefix and --{with,without}-readline.
 | 
| 95 | 
 | 
| 96 | Notes
 | 
| 97 | -----
 | 
| 98 | 
 | 
| 99 | - The oil.ovm executable behaves like busybox, and osh is a symlink to it.
 | 
| 100 | - Oil contains a fork of the Python 2.7 runtime, so it should compile with most
 | 
| 101 |   popular compiler/OS combinations.
 |