Use Cmake with gcc or clang with C++17 support.
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.
Install packages with 'apt-get'/aptitude.
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.
luarocks install bit32
luarocks install penlight
luarocks install LuaBcd
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
git clone https://github.com/patrickfrey/mewa
cd mewa
git checkout -b 0.10
./configure
make COMPILER=gcc RELEASE=YES
make COMPILER=clang RELEASE=YES
make test
make PREFIX=/usr/local install
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