#503 ejabberd2prosody.lua fails with error lua: ../tools/erlparse.lua:183: attempt to index a nil value (global 'io')

Reporter jsheid
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Status-CantReproduce
  • Type-Defect
  1. jsheid on

    *What steps will reproduce the problem?* *1.* *2.* *3.* *What is the expected output? What do you see instead?* *What version of the product are you using? On what operating system?* *Please provide any additional information below.*

  2. jsheid on

    Steps to reproduce: 1. run ./tools/ejabberd2prosody.lua ./lovingly-saved-ejabberd.dump expected output: messages indicating success importing prior data actual output: lua: ../tools/erlparse.lua:183: attempt to index a nil value (global 'io') stack traceback: ../tools/erlparse.lua:183: in function <../tools/erlparse.lua:182> (...tail calls...) ../tools/ejabberd2prosody.lua:297: in main chunk [C]: in ? version: prosody-0.9.8 (from fedora-22) patch to fix: --- erlparse.lua~ 2015-06-25 17:27:31.307274000 -0700 +++ erlparse.lua 2015-06-25 16:44:10.908974000 -0700 @@ -179,6 +179,7 @@ if x then read("."); end return x; end +local io = require "io" local function readFile(filename) file = io.open(filename); if not file then error("File not found: "..filename); os.exit(0); end random comment: Thank goodness lua is somewhat less obscure than Erlang. Somewhat.

  3. Zash on

    This has to be some Fedora-specific weridness, are they on Lua 5.37 already or something in which all globals are gone? Can't reproduce on any of Lua 5.1 .. 5.3 or LuaJIT 2.0

  4. Robert Scheck on

    Fedora-specific weirdness? Fedora ships Lua 5.3, yes. But Prosody in Fedora is only using Lua 5.1. If you assume some Fedora specific issue, please let us follow up this. However, I would need an ejabberd dump then. Important is that './configure --runwith=<lua-name>' doesn't get applied to 'tools/ejabberd2prosody.lua' through, but that is an upstream issue, not a Fedora one.

  5. Robert on

    I got bit by this too.. Fedora 23.

  6. Zash on

    This is either an incompatible Lua build or a broken Lua build. We really can't support either.

    Changes
    • owner Zash
    • tags Status-CantReproduce

New comment

Not published. Used for spam prevention and optional update notifications.