Skip to content

Files

Latest commit

 

History

History
77 lines (63 loc) · 1.63 KB

INSTALL.Ubuntu.md

File metadata and controls

77 lines (63 loc) · 1.63 KB

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

lua5.2 liblua5.2-dev luarocks llvm llvm-runtime

or

lua5.1 liblua5.1-0-dev luarocks llvm llvm-runtime

when building for Lua 5.1.

Install required luarocks packages

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:

git clone https://github.com/patrickfrey/luabcd.git
cd LuaBcd
./configure
make
make PREFIX=/usr/local install

Fetch sources of latest release version

git clone https://github.com/patrickfrey/mewa
cd mewa
git checkout -b 0.10

Configure to find Lua includes and to write the file Lua.inc included by make

./configure

Build with GNU C/C++

make COMPILER=gcc RELEASE=YES

Build with Clang C/C++

make COMPILER=clang RELEASE=YES

Run tests

make test

Install

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:

. tests/luaenv.sh