[rrd-developers] RRDtool + Lua module patch
fidelis at pobox.com
Thu Sep 25 15:02:09 CEST 2008
On Tue, Sep 23, 2008 at 1:53 AM, Tobias Oetiker <tobi at oetiker.ch> wrote:
> Hi Fidelis,
> Yesterday Fidelis Assis wrote:
>> Hi Tobi,
>> Tobias Oetiker escreveu:
>> > Fidelis,
>> > thanks ... I have integrated the patch and tried to fix the prefix
>> > issues .... when I try to build on my hardy setup, it does not seem
>> > to work though ...
>> > a) lua does not get picked up for building automatically even
>> > though I have lua and liblua-dev installed
>> Probably because of an old version - see below.
> I am running hardy which seems to be a pretty current linux
> distro. So if you can by any means make it compile with lua 5.0 or
> even lower, this would make this contribution much more interesting
> to other people since they could actually run it ...
I have not used lua 5.0 since 5.1 was released, but OK, I'll get back
to 5.0 and try to make code compatible with both versions.
Lua 5.1 introduced nice changes, including a new module system, which
make keeping compatibility somewhat harder. It also seems that 5.1 is
becoming the de facto standard for Lua. For instance, the number of
packages in hardy for 5.1 is 36 while only 2 for 5.0 - not counting
the language itself and virtual packages.
>> > b) when I run make lua in the bindings directory I get
>> > oetiker> make lua
>> > cd lua && /usr/bin/lua Makefile.lua "PREFIX=/usr/local/rrdtool-1.3.2 POD2MAN=/usr/bin/pod2man LUABIN=/usr/bin/lua LIB=/usr/local/rrdtool-1.3.2/lib/lua" > Makefile && make
>> > /usr/bin/lua: Makefile.lua:3: attempt to call field `match' (a nil value)
>> The 'match' function in string lib was introduced in Lua 5.1 - minimum
>> required for RRDLua -, so it seems you have 5.0 or older. And I have a
>> broken code to check Lua version... Sorry for that, I'll fix it and send
>> a patch.
>> BTW, is there a standard way to check version in autoconf? I'm just
>> starting to play with autoconf.
> some libraries have a function call to figure the library, maybe
> this exists in lua, then you can use this ...
Thanks, but I meant some macro that checks a version string and
returns OK if it's greater than or equal to a given minimum version.
OBS: I'm still using gutsy, but in the process of installing hardy. I
hope to have news by the weekend.
More information about the rrd-developers