-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL.Ubuntu.md.in
76 lines (63 loc) · 1.63 KB
/
INSTALL.Ubuntu.md.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
## Ubuntu 20.04 on x86_64, i686
### Build system
Use Cmake with gcc or clang with C++17 support.
### LLVM Version
The examples of this version of _Mewa_ are based on LLVM version 12 to 16 and run also with version 10 or 11.
The examples pass with with LLVM versions 10 and 11 too, but the output of the IR differs slightly.
### Prerequisites
Install packages with 'apt-get'/aptitude.
#### Required packages
```Bash
lua5.2 liblua5.2-dev luarocks llvm llvm-runtime
```
or
```Bash
lua5.1 liblua5.1-0-dev luarocks llvm llvm-runtime
```
when building for Lua 5.1.
#### Install required luarocks packages
```Bash
luarocks install bit32
luarocks install penlight
luarocks install LuaBcd
```
### Build LuaBcd from sources (if luarocks install LuaBcd fails)
If the build of LuaBcd with luarocks fails, you can fetch the sources from github and build it:
```Bash
git clone https://github.com/patrickfrey/luabcd.git
cd LuaBcd
./configure
make
make PREFIX=/usr/local install
```
### Fetch sources of latest release version
```Bash
git clone https://github.com/patrickfrey/mewa
cd mewa
git checkout -b $:VERSION
```
### Configure to find Lua includes and to write the file Lua.inc included by make
```Bash
./configure
```
### Build with GNU C/C++
```Bash
make COMPILER=gcc RELEASE=YES
```
### Build with Clang C/C++
```Bash
make COMPILER=clang RELEASE=YES
```
### Run tests
```Bash
make test
```
### Install
```Bash
make PREFIX=/usr/local install
```
### Lua Environment
For running the examples by hand don't forget to set the environment variables needed by Lua (LUA_CPATH,LUA_PATH) correctly by sourcing the script luaenv.sh in tests:
```Bash
. tests/luaenv.sh
```