lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

The increasing popularity of Lua, combined with the fact that Linux
distributions prefer, for obvious reasons, to build on shared libraries,
is starting to cause some troubles.

The shared objects for Lua 5.1 and 5.2 share a lot of symbol names.
This is usually not a problem, since an application is either linked
against Lua 5.1 or 5.2, so no confusion is made.  Unfortunately Lua is a
popular extension language for libraries too.  So it may happen that a
software links two distinct libraries that in turn are linked against
different versions of Lua.  Boom.

Would it be possible to name the symbols after the Lua version?  I'm
wondering if something like having #define lua_foo lua53_foo for each
symbol that is part of the public API would work.

These nasty name clashes are not a plague yet, but they were spotted and
the Debian release managers pointed it out to me.  Given that 5.3 is not
out yet, I wanted to put this topic on the table.

Enrico Tassi