Package: lua5.1
Version: 5.1.4-6

Changeset 5.1.4-6)which introduced DEB_HOST_MULTIARCH for the LUA_CPATH_DEFAULT in luaconf.h, like so:
#define LUA_CDIR2 LUA_ROOT2 "lib/" DEB_HOST_MULTIARCH "/lua/5.1/"
...
#define LUA_CPATH_DEFAULT \
"./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR3"?.so;" LUA_CDIR"loadall.so"
#endif

The DEB_HOST_MULTIARCH is only set during the Debian build process, or manually through the preprocessor. Since Lua packages are built with debhelper, they include a well-formed LUA_CPATH_DEFAULT.

However, this change breaks the compilation of programs outside of debhelper which embed Lua and rely upon LUA_CPATH_DEFAULT:
error: expected ')' before 'DEB_HOST_MULTIARCH'

A workaround is to set DEB_HOST_MULTIARCH manually (using dpkg-architecture -qDEB_HOST_MULTIARCH), or construct ones own LUA_CPATH_DEFAULT.

Since liblua5.1-0dev is architecture-specific, perhaps the build process could insert the architecture into luaconf.h rather than depend on a definition set in the package build process?

This is still present in the 5.1.4 series, as well as 5.1.5-1

This bug was originally submitted to Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/lua5.1/+bug/977813


Reply via email to