|
1 | 1 | # Build instructions
|
2 | 2 |
|
3 | 3 | * Very simple build scripts are in https://github.com/dibyendumajumdar/ravi-distro/tree/master/build.
|
4 |
| -* If you wish to manually build then below are some details. |
5 | 4 |
|
6 | 5 | ### External dependencies
|
7 | 6 |
|
8 |
| -* BLAS and LAPACK libraries are needed. |
| 7 | +* BLAS and LAPACK libraries |
| 8 | +* OpenSSL library |
| 9 | +* libuv library |
9 | 10 | * CMake is used as the build system
|
10 | 11 |
|
11 |
| -#### Installing BLAS / LAPACK on Ubuntu 16.x |
| 12 | +#### Ubuntu |
12 | 13 |
|
13 |
| -For information on how to install and configure BLAS and LAPACK refer to information at [DebianScience Wiki](http://wiki.debian.org/DebianScience/LinearAlgebraLibraries). |
| 14 | +Have a look at the [Dockerfile](https://github.com/dibyendumajumdar/Suravi/blob/master/Dockerfile). |
14 | 15 |
|
15 |
| -Install OpenBLAS as follows: |
16 |
| -``` |
17 |
| - sudo apt-get install libopenblas-dev |
18 |
| -``` |
19 |
| -Above should also install LAPACK. |
20 |
| -Configure OpenBLAS to be the default BLAS as follows: |
21 |
| -``` |
22 |
| - sudo update-alternatives --config libblas.so.3 |
23 |
| - sudo update-alternatives --config liblapack.so.3 |
24 |
| -``` |
25 |
| - |
26 |
| -#### Install BLAS and LAPACK on Windows 10 |
27 |
| - |
28 |
| -On Windows you can use pre-built libraries I provide in ravi-external-libs project. |
29 |
| - |
30 |
| -### Build process |
31 |
| - |
32 |
| -This is manual at present. |
33 |
| - |
34 |
| -* Decide on the home folder for the distro. The distro assumes the following locations for these, if you change these then you will need to amend the `FindLua.cmake` scripts in all the projects. |
35 |
| - - `c:/Software/lua53` or `c:/Software/ravi` on Windows |
36 |
| - - `~/lua53` or `~/ravi` on Unix systems |
| 16 | +#### Windows 10 |
37 | 17 |
|
| 18 | +* Decide on the home folder for the distro. Edit the build script to relect your choice. |
38 | 19 | * Clone the respository and update the submodules.
|
39 |
| -``` |
40 |
| -git clone https://github.com/dibyendumajumdar/Suravi.git |
41 |
| -cd Suravi |
42 |
| -git submodule update --init --recursive |
43 |
| -``` |
44 | 20 |
|
45 |
| -* Install Lua 5.3 or Ravi first. Ensure that `-DCMAKE_INSTALL_PREFIX` is defined as above. If you did not use the default location above then you will need to amend the `FindLua.cmake` scripts in all the projects. |
46 |
| - |
47 |
| -For example, on Ubuntu, follow these steps to build and install Ravi. |
48 |
| -But first, in case you don't have readline installed: |
49 |
| -``` |
50 |
| -sudo apt-get install libreadline6 libreadline6-dev |
51 | 21 | ```
|
52 |
| -Here we will build Ravi without LLVM: |
| 22 | +git clone --recurse-submodules https://github.com/dibyendumajumdar/Suravi.git |
53 | 23 | ```
|
54 |
| -cd ravi-distro/ravi |
55 |
| -mkdir build |
56 |
| -cd build |
57 |
| -cmake -DCMAKE_INSTALL_PREFIX=$HOME/ravi .. |
58 |
| -make |
59 |
| -make install |
60 |
| -``` |
61 | 24 |
|
62 |
| -* Install the ravi-external-libs project if you are on Windows. You can also install this project on Linux or Mac OSX; on |
63 |
| -those platforms it simply installs an environment script. |
| 25 | +* Run the appropriate build script. |
64 | 26 |
|
65 | 27 | ### Setup environment
|
66 | 28 |
|
67 |
| -Set environment variables appropriately for locating the distro. You will need to set: |
68 |
| - |
69 |
| -- `PATH` on all platforms |
70 |
| -- `LD_LIBRARY_PATH` on Linux |
71 |
| -- `DYLD_LIBRARY_PATH` on Mac OSX |
72 |
| -- `LUA_PATH` and `LUA_CPATH` on all Platforms |
73 |
| - |
74 |
| -In the examples below, replace 'ravi' with 'lua53' for Lua based installation. |
75 |
| - |
76 |
| -Note that the ravi-external-libs project installs 'ravienv.sh' and 'luaenv.sh' scripts that essentially do below. |
77 |
| - |
| 29 | +Set environment variables appropriately for locating the distro by invoking the provided `*env` script in the installation bin directory. |
78 | 30 |
|
79 | 31 |
|
0 commit comments