Pyston currently only supports installing from source; the following instructions have fairly tested as working on Ubuntu, and are extensively verified as not working on Mac. (Please see issue [#165](https://github.com/dropbox/pyston/issues/165) for discussion on enabling OSX support, which is pretty difficult.)
The build instructions assume that you will put the Pyston source code in `~/pyston` and put the dependencies in `~/pyston_deps`. Barring any bugs, you should be free to put them anywhere you'd like, though the instructions in this file would have to be altered before following. Also, if you want to change the dependency dir, you'll have to change the value of the the `DEPS_DIR` variable in `Makefile`.
The build instructions assume that you will put the Pyston source code in `~/pyston` and put the dependencies in `~/pyston_deps`. If you want to change the dependency dir, you'll have to change the value of the the `DEPS_DIR` variable in `CMakeLists.txt`.
# CMake build system
Our CMake build system supersedes our old Makefile build system. The old Makefile rules still exist and can be activated by adding `USE_CMAKE=0` to your make invocation, but they will be removed at some point. We still use the Makefile as a sort of "lite development environment"; it helps manage multiple cmake configurations and has some testing helpers.
We use a Makefile as a sort of "lite development environment"; it helps manage multiple cmake configurations and has some testing helpers.
### Prerequisites
...
...
@@ -136,8 +136,6 @@ cd valgrind-3.10.0
make -j4
make install
sudo apt-get install libc6-dbg
cd ~/pyston
echo "ENABLE_VALGRIND := 1" >> Makefile.local
```
### gperftools (-lprofiler)
...
...
@@ -164,181 +162,8 @@ Then, run `make dbgpy_TESTNAME` and it will launch the test under gdb. There's
```
sudo apt-get install doxygen graphviz
# then run cmake (see below) and invoke the docs target
# then run cmake and invoke the docs target
ninja docs
# now within the Pyston build directory open docs/html/index.html with a browser
```
Generate doxygen documentation for Pyston. Requires using the cmake build system.
# Deprecated Makefile build system
These are the old instructions for our original Makefile build system and toolchain. They will be disappearing shortly.
clang requires a fairly modern [host compiler](http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library), so typically you will have to install a new one. The easiest thing to do is to just create a fresh build of GCC:
```
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev make build-essential libtool zip gcc-multilib autogen
# Specifying LIBRARY_PATH is a workaround to get gcc to compile on newer Ubuntus with multiarch
LIBRARY_PATH=/usr/lib32 make -j4
make check
make install
```
### ccache
ccache is a build tool that can help speed up redundant compilations. It's not strictly necessary but it's useful enough to be enabled by default; you can disable it by adding `USE_CCACHE := 0` to your Makefile.local. To get it, run:
LLVM and clang depend on a pretty modern compiler; the steps below assume you installed GCC 4.8.2 as described above. It should be possible to build using clang >= 3.1, such as what you might find on a Mac, but that will require changes to the way LLVM is configured (specified in Makefile) that I haven't tested.
There seem to be some lingering issues with the LLVM build that haven't been identified yet; if the last step fails with errors along the lines of "rm: could not find file foo.tmp", it is quite likely that simply running it again will cause it to continue successfully. You may have to do this multiple times, unfortunately.
Note: if you followed the previous version of the directions and installed libunwind globally, you'll need to uninstall it by doing the following:
```
cd ~/pyston_deps/libunwind-1.1
./configure
sudo make uninstall
```
and then repeat the correct process
### zsh
`zsh` is needed when running pyston tests.
```
sudo apt-get install zsh
```
### readline
`readline` is used for the repl.
```
sudo apt-get install libreadline-dev
```
### gmp
`gmp` is a multiprecision library used for implementing Python longs. It's also a dependency of gcc, so if you installed that you should already have it:
This will link pyston_dbg and pyston_debug against the debug version of libunwind (the release pyston build will still link against the release libunwind); to enable debug output, set the UNW_DEBUG_LEVEL environment variable, ex to 13.