You are not logged in.

#1 2008-05-26 23:04:26

bzklrm
Member
From: Australia
Registered: 2005-04-18
Posts: 36

lua support in elinks [SOLVED]

Hello,

It seems that elinks lacks lua support, despite lua being a dependency of the elinks package.

# elinks -version
ELinks 0.11.4rc1 (built on Mar 19 2008 21:33:42)

Features:
Standard, IPv6, gzip, bzip2, Periodic Saving, Timer, Cascading Style Sheets, 
Protocol (File, FTP, HTTP, URI rewrite, User protocols), SSL (OpenSSL), 
MIME (Option system, Mailcap, Mimetypes files), LED indicators, Bookmarks, 
Cookies, ECMAScript, Form History, Global History, Scripting (ECMAScript scripting engine), 
Goto URL History, Search History

I filed a bug report (http://bugs.archlinux.org/task/10515), but I am wondering what I should do to build the package myself from abs. It seems the problem is that the lualib library (liblualib.so) is missing. any hint?

Last edited by bzklrm (2008-05-27 03:24:11)

Offline

#2 2008-05-27 00:21:23

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: lua support in elinks [SOLVED]

I tried a bit, and they have the following in doc/lua-scripting.txt:

Since ELinks 0.11.0, only version 5.0 of Lua is supported.
Future versions of ELinks will probably support Lua 5.1 too;
see http://bugzilla.elinks.cz/show_bug.cgi?id=742[bug 742].

I looked at that bug, and there's a patch - but it's not enough by itself, since it only patches core.c, and ./configure still fails (on the lua part). I'm trying to hack configure.in and Makefile.config to see if I can get it to accept the existence of lua5.1 smile

EDIT: it's a mess. There are actually two patches in that bugreport. The first one patches at several places. That supposedly produces a binary that doesn't work. The second one patches only at one place in core.c, but with only that elinks doesn't compile (actually, it doesn't link).

I guess I give up. One thing one can do is to have it depend on lua-compat (which is 5.0 version, and it conflicts with lua5.1). But I guess this needs to be reported upstream, since the last entry in that bugreport is that they committed a patch that should make lua5.1 preferred (on 2007-07-23).

EDIT2: Ah! Not quite! It was committed into one of the dev's branches. So probably not merged into master yet (which is weird).

Last edited by bender02 (2008-05-27 00:37:03)

Offline

#3 2008-05-27 00:41:28

bzklrm
Member
From: Australia
Registered: 2005-04-18
Posts: 36

Re: lua support in elinks [SOLVED]

Ha, great, thanks! Very sorry for not finding this - google did not give me anything and I gave up searching a bit too soon I guess. I am also looking into it. I was able to run configure and compile by removing references to lualib:

sed -i 's/-llualib$suffix//' configure

Now, I need to test it. Thanks again for this!

Offline

#4 2008-05-27 00:46:49

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: lua support in elinks [SOLVED]

Well, I don't know how you got it to link. If you succeed, sure let me know!

Offline

#5 2008-05-27 00:50:46

bzklrm
Member
From: Australia
Registered: 2005-04-18
Posts: 36

Re: lua support in elinks [SOLVED]

Well, not sure exactly how I did get it to link - it just linked (with a warning about the use of tmpname). In any case the program doesn't run - I get a:
PANIC: unprotected error in call to Lua API (no calling environment)

Well, I'll keep looking and if I find something I'll post it, but I guess I'll have to live without lua support for some time...

Offline

#6 2008-05-27 01:31:24

bzklrm
Member
From: Australia
Registered: 2005-04-18
Posts: 36

Re: lua support in elinks [SOLVED]

Ok, I got it to work. In fact it was necessary to apply both patches (id=331 and id=353). It then compiles, links and run with lua support.
Thanks again for your help.

Offline

#7 2008-05-27 02:01:03

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: lua support in elinks [SOLVED]

Nice work!

Anyway, I think it's pretty ignorant of upstream that they didn't add lua5.1 support, given that:
1) Lua 5.1 is out since 21 Feb 2006
2) patches are there in their bugtracker
3) the whole issue is fixable by just replacing couple of lines.

Offline

#8 2008-05-27 02:35:21

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: lua support in elinks [SOLVED]

Please mark this thread as solved.  Thank you.

Offline

Board footer

Powered by FluxBB