Bug 226878 - www/elinks: lua support does not work
Summary: www/elinks: lua support does not work
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Beat Gaetzi
Depends on:
Reported: 2018-03-23 18:15 UTC by John Hein
Modified: 2020-01-31 18:14 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (beat)


Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2018-03-23 18:15:30 UTC
I suspect that elinks lua support is quite old and won't work with lua later than 5.0 (which is gone from ports).

It builds, but configure fails, so lua is turned off.
'make configure' with the LUA option on produces:

checking for Lua... no

And in config.log...

configure:17581: checking for Lua
configure:17640: cc -o conftest -O2 -pipe  -I/usr/local/include/nspr -I/usr/local/include/js-1.7 -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wall  -I/usr/local/include/lua51 -isystem /usr/local/include    -L/usr/local/lib -lnspr4 -pthread -lpthread -lm -Wl,-rpath,/usr/local/lib -fstack-protector -rdynamic conftest.c -llua -llualib -lm -ljs -lexecinfo -L/usr/local/lib -lbz2 -lexpat >&5
conftest.c:145:17: warning: implicit declaration of function 'luaL_newstate' is invalid in C99 [-Wimplicit-function-declaration]
        lua_State *L = lua_open();
/usr/local/include/lua51/lua.h:287:20: note: expanded from macro 'lua_open'
#define lua_open()      luaL_newstate()
conftest.c:145:13: warning: incompatible integer to pointer conversion initializing 'lua_State *' (aka 'struct lua_State *') with an expression of type 'int' [-Wint-conversion]
        lua_State *L = lua_open();
                   ^   ~~~~~~~~~~
2 warnings generated.
/usr/bin/ld: cannot find -llua

And in config.h:

/* Define if you want: Lua support */
/* #undef CONFIG_LUA */

Just fixing the compilation args used for the configure test to work with lua51 (for example) is not enough.  The resulting test program seg faults (lua_open produces something luaopen_base() does not like).

Unless someone wants to do surgery to update elinks to work with newer lua (and submit upstream ideally), I suggest we just remove the option and pass --without-lua to configure.
Comment 1 Walter Schwarzenfeld freebsd_triage 2020-01-31 18:14:00 UTC