lua4web / luarocks-build-cpp

A fork of built-in build system for C++ rocks
3 stars 2 forks source link

Building with Lua 5.2 and 5.3 fails #2

Open legends2k opened 8 years ago

legends2k commented 8 years ago

The rock fltk4lua depends on luarocks-build-cpp for building the rock. Trying

luarocks install fltk4lua FLTK_DIR=F:/Libs/FLTK

gives the error

Installing https://luarocks.org/fltk4lua-0.1-1.src.rock...
Using https://luarocks.org/fltk4lua-0.1-1.src.rock... switching to 'build' mode

Error: Failed initializing build back-end for build type 'cpp': f:\apps\lua\/share/lua/5.3/luarocks\build\cpp.lua:3: attempt to call a nil value (global 'module')

The Lua interpreter I've is version 5.3; this doesn't have the function module defined in the standard library like 5.1 did. Lua 5.2 deprecated module.

cxw42 commented 6 years ago

To build fltk4lua on Lua 5.3 on mingw, I had to edit /mingw/share/lua/5.3/luarocks/build/cpp.lua as follows after installing the rock.