LuaBinaries
Pre-compiled Lua libraries and executables.

Configuration

All the binaries were built using Tecmake with the following configuration parameters and changes:

Lua 5.3

LuaBinaries distribution of Lua 5.3 uses the same default configuration of the makefiles provided by the Lua.org distribution tar file, but using "lua53" as library and program names. This means that only LUA_COMPAT_5_2 was defined when compiling.

AIX/IRIX/SunOS    LUA_USE_POSIX    LUA_USE_DLOPEN
Linux/FreeBSD/Cygwin    LUA_USE_LINUX
MacOSX    LUA_USE_MACOSX

In Windows the executables are dependent on the "lua53.dll" library.

In UNIX the executables exports the Lua functions, so they are not dependent on the LuaBinaries dynamic libraries.

Note: The default LUA_CPATH supports the "53" suffix used in Tecgraf libraries. This is the only change we do in the Lua source files, other files are only added to the standard distribution to compose the LuaBinaries packages.

Lua 5.2

LuaBinaries distribution of Lua 5.2 uses the same default configuration of the makefiles provided by the Lua.org distribution tar file, but using "lua52" as library and program names. This means that LUA_COMPAT_ALL was defined when compiling.

AIX/IRIX/SunOS    LUA_USE_POSIX    LUA_USE_DLOPEN
Linux/FreeBSD/Cygwin    LUA_USE_LINUX
MacOSX    LUA_USE_MACOSX

In Windows the executables are dependent on the "lua52.dll" library.

In UNIX the executables exports the Lua functions, so they are not dependent on the LuaBinaries dynamic libraries.

Note: The default LUA_CPATH supports the "52" suffix used in Tecgraf libraries. This is the only change we do in the Lua source files, other files are only added to the standard distribution to compose the LuaBinaries packages.

Lua 5.1

LuaBinaries distribution of Lua 5.1 uses the same default configuration of the makefiles provided by the Lua.org distribution tar file, but using "lua5.1" as library and program names. A small difference is that the "etc/bin2c.c" utility is re-added to the distribution.

AIX/IRIX/SunOS    LUA_USE_POSIX    LUA_USE_DLOPEN
Linux/FreeBSD/Cygwin    LUA_USE_POSIX    LUA_USE_DLOPEN    LUA_USE_READLINE
MacOSX    LUA_USE_POSIX    LUA_DL_DYLD

In Windows the default configuration also enable equivalent definitions for LUA_USE_ISATTY and LUA_USE_POPEN (part of LUA_USE_POSIX). And LUA_DL_DLL is also defined. The executables contain support for command line globing (so you can use "lua5.1 *.lua"). The executables are dependent on the "lua5.1.dll" library. The modules default search path (LUA_CPATH definition) also includes the "clibs" subfolder.

In UNIX the executables exports the Lua functions, so they are not dependent on the LuaBinaries dynamic libraries.

Note 1: The name "lua5.1" was a decision we made at the release of LuaBinaries for Lua 5.1.0. Unfortunately it was a bad decision, but because of several applications compatibility we will keep it until Lua 5.2.0 is released.

Note 2: The default LUA_CPATH supports the "51" suffix used in Tecgraf libraries.

Lua 5.0

lualib USE_TMPNAME defined in all systems.
USE_POPEN defined in non Windows systems.
USE_DLOPEN defined in non Windows systems, except AIX.
luac LUA_OPNAMES defined in all systems.
lua (executable) _POSIX_SOURCE defined in non Windows systems.
LUA_USERCONFIG='"$(LUA5)/etc/saconfig.c"' and USE_READLINE defined only in Linux systems.
-Wl,-E parameter used in Linux systems.
In Release 2, linked with the dynamic library in Windows, statically linked in UNIX.

Lua 4.0

lualib POPEN defined in non Windows systems.
bin2c fixed a problem with C++ compilers.
lua (executable) _POSIX_SOURCE defined in non Windows systems.

Lua 3.2

bin2c fixed a problem with C++ compilers.

Libraries and executables were built using speed optimization. In UNIX the dynamic libraries were NOT built with the -fpic parameter. In MacOS X the dynamic libraries are in bundle format. The source code along with the "config.mak" files for Tecmake are also available.

The DLLs were built using the cdecl calling convention. This could be a problem for Visual Basic users.

In Visual C++ 6 and 7 we use the single thread C Run Time Library for static libraries and the multi thread C RTL for DLLs. Since Visual C++ 8 both (static and dynamic) use the multi thread C RTL.

The library names have at least the major version number as a suffix. Except for Lua 3 because of historical reasons. So several versions of Lua can coexist in the same system, can be easily linked, and identified.

If you want to build dynamically loadable modules that should be compatible with LuaBinaries please check the Using LuaBinaries documentation.

Building LuaBinaries

We use Tecmake to build LuaBinaries because it makes our life easier. The Tecmake configuration files (*.mak) are available at the "src" folder, and very easy to understand.

The LuaBinaries source packages already include the Tecmake files, so no installation is necessary, just type "make -f Makefile.tecmake". It will build the same binaries, with the same names and folder configuration we use. In Windows you must specify the compiler you want to use ("make -f Makefile.tecmake TEC_UNAME=mingw4"), some modifications on tecmakewin.mak, or setting environment variables, should be necessary to match your compiler installation.

In Ubuntu you will need to install the following package and its dependencies to build the interpreter executable:

libreadline5-dev

For those who build installation packages like MSI, RPM or DEB, please use the binaries from LuaBinaries, just repack them in the installation package format. Or if you want to rebuild the binaries then make sure use the same configuration and the same name standard. This will make the life of many Lua users and package developers easier. If the packaging format requires a different file name then please use the standard file name and add a symbolic link with the required file name, or at least add a symbolic link to the standard file name.

For those who build Lua binaries in other platforms following the LuaBinaries standards we would be happy to redistribute your binaries in the LuaBinaries downloads. Also installation packages using LuaBinaries are welcome to be redistributed in the LuaBinaries downloads.

$Id: configuration.html,v 1.3 2011/12/20 18:41:16 scuri Exp $