2013-09-13 17:01:40 +00:00
|
|
|
Preparing working environment on Ubuntu 12.04
|
|
|
|
---------------------------------------------
|
|
|
|
|
|
|
|
### Install basic packages
|
|
|
|
|
2017-05-25 22:23:27 +00:00
|
|
|
sudo apt-get install git libgmp-dev libmpfr-dev emacs -y
|
2013-09-19 18:49:04 +00:00
|
|
|
sudo add-apt-repository ppa:kalakris/cmake -y
|
2017-05-25 22:23:27 +00:00
|
|
|
sudo apt-get install cmake liblua5.2.0 lua5.2-0 lua5.2-dev -y
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
|
|
|
sudo update-alternatives --remove-all gcc
|
|
|
|
sudo update-alternatives --remove-all g++
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install g++-4.8 -y
|
|
|
|
sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y
|
2013-09-13 17:01:40 +00:00
|
|
|
|
|
|
|
### Optional packages
|
|
|
|
|
2017-05-25 22:23:27 +00:00
|
|
|
sudo apt-get install gitg ninja-build valgrind doxygen kcachegrind
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2013-12-10 01:45:31 +00:00
|
|
|
sudo add-apt-repository --yes ppa:boost-latest/ppa
|
2017-05-25 22:23:27 +00:00
|
|
|
sudo apt-get install libboost1.54-dev libboost-thread1.54-dev
|
2013-12-10 01:45:31 +00:00
|
|
|
|
2017-01-18 21:54:46 +00:00
|
|
|
### Fork Lean on github : https://github.com/leanprover/lean2
|
2013-09-13 17:01:40 +00:00
|
|
|
|
|
|
|
### Create a projects directory
|
|
|
|
|
2013-09-15 04:18:05 +00:00
|
|
|
cd ~
|
|
|
|
mkdir projects
|
|
|
|
cd projects
|
2013-09-13 17:01:40 +00:00
|
|
|
|
|
|
|
### Clone your fork
|
|
|
|
|
2017-01-18 21:54:46 +00:00
|
|
|
git clone https://github.com/[your-user-name]/lean2.git
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2017-01-17 19:32:27 +00:00
|
|
|
### Build Lean in release mode
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2017-01-18 21:54:46 +00:00
|
|
|
cd lean2
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
cmake -D CMAKE_BUILD_TYPE=Release ../src
|
2013-09-15 04:18:05 +00:00
|
|
|
make
|
2013-09-13 17:01:40 +00:00
|
|
|
|
2017-05-25 22:23:27 +00:00
|
|
|
### Alternative ways to build
|
|
|
|
Using Ninja (to speed up build)
|
|
|
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=RELEASE -G Ninja ../src
|
|
|
|
ninja
|
|
|
|
|
|
|
|
Using Boost (to speed up build)
|
2013-12-10 01:45:31 +00:00
|
|
|
|
2017-01-18 21:54:46 +00:00
|
|
|
cmake -D CMAKE_BUILD_TYPE=Release -D BOOST=ON ../src
|
2013-12-10 01:45:31 +00:00
|
|
|
make
|
|
|
|
|
2017-05-25 22:23:27 +00:00
|
|
|
Build in debug mode
|
|
|
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=DEBUG ../src
|
|
|
|
make
|
|
|
|
|
2017-05-25 00:38:05 +00:00
|
|
|
### You need to also set up the [Emacs Mode](../../src/emacs/README.md).
|