On Jul 20, 2013 7:49 PM, "Paul K" <firstname.lastname@example.org> wrote:
> Hi Jay,
> >> One question. is something like this possible for OSX and Linux
> >> platforms as well?
> > It is not possible on Linux because upstream a) has no official support for shared libraries,
> > and b) as Peter alludes to, upstream's unofficial choices for module linkage require a flat
> > namespace. Linux certainly supports non-flat namespaces these days, but I don't feel like
> Yes, I saw Peter's comment, but I'm not familiar with the terminology
> ("non-flat namespaces") to figure out what the implications are and
> quick google search didn't turn much relevant information.
Think of it this way: a Lua extension module on Linux does not contain any information about which Lua API it was compiled against, since upstream's policy is not to link (and hence not describe) the libluaX.Y.so dependency in a mod.so.
You have to solve this problem before anything else.
You could probably build some heuristics to dig through the dynamic symbol list, but there are a couple of other possible paths if you can relink--at least easier for the things I might use it for. The Linux twoface implementation of liblua5.1.so would probably just link the "real" liblua5.2.so; symbol versioning is another possibility.
As usual, see http://www.akkadia.org/drepper/dsohowto.pdf for perhaps far more detail than you wanted