lua-users home
lua-l archive

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


Well, seems like we are not really binary compatible yet, as we follow
different linking strategies.
I see a number of things now that absolutely need a convetion and agreement
on how to be done:

I have set up my binaries to consist of
a) lua4.0.1.dll (I don't care about the name, as long as we agree)
-> this contains everything a standard lua.exe would have plus the
loadmodule functionality

b) lua.exe
-> provides the shell, and opens all libs supplied by the dll
-> this could be replaced by any number of special case applications (GUI
app etc, sharing the same Lua interpreter and modules)

lua.exe implicitely links against the lua4.0.1

My goal was to minimize the core files needed, and have maximum flexibility
from the application loading the dll.
=> the lua(*).dll needs to implement all functionality to standard Lua
scripts + load external modules.

All modules I set up also implicitely link the same lua(*).dll

Your setup contains two dlls and the exe:
lua-4.0.dll
lualib-4.0.dll
lua.exe
So binary modules you compile will not run with my lua.exe, and the other
way around.

If there is good reason to keep the core in 3 different files, I have no
problem to do it that way. I'm very much interested on getting to binary
compatible for modules compiled from different people & compilers...

One concern for me is the fact that each split in another dll will increase
overall size.
(apparently thats a problem I'm seeing because I use VC, my compiled Release
version of luapacklib.dll is 48kb, where your's is 7kb!!!)

Another point that came up for me is how to handle 'small' modules, like
packlib, bitlib etc. As VC build those into dlls with sizes over 20KB each,
putting each into its own 'module' seemed suboptimal. Seeing the sizes of
youre dlls puts it into another light.
Maybe someone can give me a hint on how to achieve similar sizes in VC?


> If I remember correctly lua-4.0.1 and lua-4.0 have the same functionallity
> and the same interface, the 4.0.1 is only a bug fix revision, right?

I think so too, but the internal version (the one loadmodule checks) would
be 4.0.1, so the name _could_ be confusing
Maybe ignoring the minor version in loadmodule.c is a good idea, as I also
guess that lua 4.0 and 4.0.1 modules would be compatible already.

-Martin

----- Original Message -----
From: "Ignacio Castaño" <castanyo@yahoo.es>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Sunday, November 24, 2002 4:51 PM
Subject: Re: Binary Modules for Lua [was Re: External modules]


I have uploaded the binaries that I'm using here:

http://talika.eii.us.es/~titan/lua/lua-lm-4.0.1.zip

I've named the libraries 'lua-4.0.dll' and 'lualib-4.0.dll', and
luapacklib.dll is implicitely linked against them. I don't care about the
names, as long everybody uses the sames, so if everybody agrees I will
change them to lua4.0.dll and lualib4.0.dll.

If I remember correctly lua-4.0.1 and lua-4.0 have the same functionallity
and the same interface, the 4.0.1 is only a bug fix revision, right?

On linux that would be resolved using a symboling link, you should link your
applications to liblua40.so, but that will be a symlink to the latest
revision. I don't know how that should be handled on win32.

On the other side, loadmodule should allow you to link with libraries that
have been linked to a different revision. luaLM_version could return
something different, or ll_loadlib could ignore the minor version number.
What do you suggest?


Ignacio Castaño
castanyo@yahoo.es

PS:
Martin, try with my binaries and see if it works. I will add a patch to
build them asap.


Martin Spernau wrote:
> From: "Ignacio Castaño" <castanyo@yahoo.es>
> > may I suggest using lua-4.0.dll or lua4.0.dll instead?
>
> How should I handle Lua 4.0.1 which I use as base.
> If I compile it as lua4.0.dll I guess it is compatible enough to load yor
> binary luapacklib.dll..., only the luaLM_version() test will fail, as my
> setup uses the internal 4.0.1 version number.
> Should I rather make the 'minor' version explicit?
>
> Or could we all just go for the bugfixed 4.0.1 as common base?
>
> -Martin
> P.S.:
> when I try to loadmodule("packlib") from my lua.exe (which uses
> lua4.0.1.dll) I get a windows system alert that the lua4.0.dll is missing,
> and then the normal Lua error:
> ###
> Lua 4.0.1  Copyright (C) 1994-2000 TeCGraf, PUC-Rio
> > loadmodule("packlib")
> error: cannot load module packlib:
>
> stack traceback:
>    1:  function `loadmodule' [C]
>    2:  main of string "loadmodule("packlib")" at line 1
> >
> ###
>
>

_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis!
Descárgalo ya desde http://messenger.yahoo.es