[OpenWrt-Devel] Lua patches break runtime

Alex alex at maximum.guru
Wed Jul 27 22:17:26 EDT 2016


The Lua runtime that ships with OpenWrt is broken.  It is broken by one
(or more) of the patches.

I have create a ticket a while back about this issue, which you can find
here: https://dev.openwrt.org/ticket/20821

I was able to work around this issue removing/fixing patches and
compiling my own version of the Lua package.

However, just today, I hit this issue AGAIN using a busybox docker
container (which uses OpenWrt x86 packages).

Ubuntu docker container.  Everything works fine.

$ docker run -it --rm ubuntu:14.04
root at a278557d3a59:/# apt-get update

........................................

root at a278557d3a59:/# apt-get install lua5.1 luarocks

........................................

root at a278557d3a59:/# luarocks install bit32
Installing http://luarocks.org/repositories/rocks/bit32-5.3.0-1.src.rock...
Using http://luarocks.org/repositories/rocks/bit32-5.3.0-1.src.rock...
switching to 'build' mode
Archive: 
/tmp/luarocks_luarocks-rock-bit32-5.3.0-1-5729/bit32-5.3.0-1.src.rock
  inflating: bit32-5.3.0-1.rockspec  
   creating: lua-compat-5.2/
   creating: lua-compat-5.2/c-api/
  inflating: lua-compat-5.2/c-api/compat-5.2.h  
  inflating: lua-compat-5.2/c-api/compat-5.2.c  
  inflating: lua-compat-5.2/LICENSE  
  inflating: lua-compat-5.2/lbitlib.c  
   creating: lua-compat-5.2/tests/
  inflating: lua-compat-5.2/tests/test.lua  
  inflating: lua-compat-5.2/tests/testmod.c  
  inflating: lua-compat-5.2/README.md  
   creating: lua-compat-5.2/compat52/
  inflating: lua-compat-5.2/compat52/mstrict.lua  
  inflating: lua-compat-5.2/compat52/strict.lua  
  inflating: lua-compat-5.2/compat52-scm-1.rockspec  
  inflating: lua-compat-5.2/compat52.lua  
  inflating: lua-compat-5.2/bit32-scm-1.rockspec  
   creating: lua-compat-5.2/rockspecs/
  inflating: lua-compat-5.2/rockspecs/bit32-5.3.0-1.rockspec  
  inflating: lua-compat-5.2/rockspecs/compat52-0.1-1.rockspec  
  inflating: lua-compat-5.2/rockspecs/bit32-5.2.2-1.rockspec  
  inflating: lua-compat-5.2/rockspecs/bit32-5.2.3-1.rockspec  
gcc -O2 -fPIC -I/usr/include/lua5.1 -c lbitlib.c -o lbitlib.o -Ic-api
gcc -shared -o bit32.so -L/usr/local/lib lbitlib.o
Updating manifest for /usr/local/lib/luarocks/rocks
 
bit32 5.3.0-1 is now built and installed in /usr/local/ (license: MIT/X11)



BusyBox docker container with opkg.

$ docker run -it --rm progrium/busybox
/ # opkg-install lua luarocks
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/Packages.gz.

Inflating
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/Packages.gz.

Updated list of available packages in /var/opkg-lists/base.
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/packages/Packages.gz.

Inflating
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/packages/Packages.gz.

Updated list of available packages in /var/opkg-lists/packages.
Installing lua (5.1.5-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/lua_5.1.5-1_x86_64.ipk.

Installing liblua (5.1.5-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/liblua_5.1.5-1_x86_64.ipk.

Installing luarocks (2.2.2-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/packages/luarocks_2.2.2-1_x86_64.ipk.

Installing luac (5.1.5-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/luac_5.1.5-1_x86_64.ipk.

Installing luasocket (3.0-rc1-20130909-3) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/packages/luasocket_3.0-rc1-20130909-3_x86_64.ipk.

Installing unzip (6.0-4) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/packages/unzip_6.0-4_x86_64.ipk.

Installing curl (7.49.0-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/curl_7.49.0-1_x86_64.ipk.

Installing libcurl (7.49.0-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/libcurl_7.49.0-1_x86_64.ipk.

Installing libpolarssl (1.3.17-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/libpolarssl_1.3.17-1_x86_64.ipk.

Installing luasec (0.5.1-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/packages/luasec_0.5.1-1_x86_64.ipk.

Installing libopenssl (1.0.2h-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/libopenssl_1.0.2h-1_x86_64.ipk.

Installing zlib (1.2.8-1) to root...
Downloading
http://downloads.openwrt.org/snapshots/trunk/x86/64/packages/base/zlib_1.2.8-1_x86_64.ipk.

Configuring libpolarssl.
Configuring libcurl.
Configuring liblua.
Configuring lua.
Configuring luac.
Configuring luasocket.
Configuring unzip.
Configuring curl.
Configuring zlib.
Configuring libopenssl.
Configuring luasec.
Configuring luarocks.
/ # luarocks install bit32
 
Error: LuaRocks 2.2.2 bug (please report at
https://github.com/keplerproject/luarocks/issues).
/usr/share/lua/5.1/luarocks/deps.lua:159: attempt to compare two table
values
stack traceback:
        /usr/share/lua/5.1/luarocks/deps.lua:159: in function
'compare_versions'
        /usr/share/lua/5.1/luarocks/type_check.lua:175: in function
'check_version'
        /usr/share/lua/5.1/luarocks/type_check.lua:269: in function
</usr/share/lua/5.1/luarocks/type_check.lua:264>
        (tail call): ?
        /usr/share/lua/5.1/luarocks/manif_core.lua:28: in function
</usr/share/lua/5.1/luarocks/manif_core.lua:21>
        (tail call): ?
        /usr/share/lua/5.1/luarocks/search.lua:176: in function
'manifest_search'
        /usr/share/lua/5.1/luarocks/search.lua:209: in function
'search_repos'
        /usr/share/lua/5.1/luarocks/search.lua:285: in function
'find_suitable_rock'
        /usr/share/lua/5.1/luarocks/install.lua:189: in function
</usr/share/lua/5.1/luarocks/install.lua:161>
        (tail call): ?
        [C]: in function 'xpcall'
        /usr/share/lua/5.1/luarocks/command_line.lua:208: in function
'run_command'
        /usr/bin/luarocks:33: in main chunk
        [C]: ?


It would be nice if somebody finally fixes this issue or removes the
breaking patches.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160727/e97bc3a3/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list