lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Stefano once stated:
> Hi all,
> 
> As part of my work on ULua [1], I routinely go through the task of trying
> to install the Lua rocks from luarocks.org (root manifest) on Windows, OSX
> and Linux.
> 
> Problems include, but are not limited to:
> + rocks contending the same module name, who doesn't love 'json'?
> + rocks polluting the module namespace with generic names - anyone using
> 'test'? - worsening the problem above
> + missing supported OS and required external libraries specifications
> + no automated way of building such required external libraries
> + no standardised build tool: make, cmake, nmake, automake...just lake is
> missing!
> + builds which should work but fails in the most creative ways (I am easily
> amused)
> + wrong dependency requirements

  Thanks for the work, but I'm having difficulty understanding the output
from all this.  For instance, I only found one of my modules [1] in the
Windows output [2] and while I would like to fix the issue, I don't [3]
use Windows, so I'm at a loss as to how to fix this issue:

env.c
env.c(44): warning C4273: '__p__environ': inconsistent dll linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdlib.h(1158): note: see previous definition of '__p__environ'
Microsoft (R) Incremental Linker Version 14.00.23026.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library org/conman/env.lib and object org/conman/env.exp
Installing https://luarocks.org/org.conman.env-1.0.1-0.rockspec...
Using https://luarocks.org/org.conman.env-1.0.1-0.rockspec... switching to 'build' mode
cl /nologo /MD /O2 -c -Foenv.obj -IC:/ste/luarocks/2.2/include env.c
link -dll -def:env.def -out:org/conman/env.dll C:/ste/luarocks/2.2/lua51.lib env.obj
Updating manifest for C:/ste/luarockstree/lib/luarocks/rocks
org.conman.env 1.0.1-0 is now built and installed in C:/ste/luarockstree (license: LGPL)

  And that's one of the simpler modules!

  Another issue:  I'm checking the pass list [4] and I see this for two of
my modules:

  ["org.conman.env"] = {
    ["1.0.1-2"] = {
      Linux = {
        x86 = true
      },
      OSX = {
        x86 = true
      },
      Windows = {
        x86 = true
      }
    }
  },
  ["org.conman.errno"] = {
    ["1.0.1-2"] = {
      Linux = {
        x86 = false
      },
      OSX = {
        x86 = false
      },
      Windows = {
        x86 = false
      }
    }
  },

  Um ... did org.conman.errno pass?  Why is the Linux.x86 set to false?  I
*know* it compiled under Linux x86 as that's my main development system.  I
know it also compiles under 64-bit Linux as I use that at work.  I also know
it compiled under OS-X as I use that both at home and at work.  What am I
looking at?

  Under the error list [5] I see:

    ["org.conman.iconv"] = {
      ["1.1.0-1"] = {
        ICONV = {
          header = "iconv.h"
        }
      }
    },

  Okay ... apparently this failed ... for something ... somewhere ... I
guess.  I can't find any other mention of this module anywhere else.  But
under the Linux error_sys portion [6] I found my UUID module with the
following error:

    ["org.conman.uuid"] = {
      ["1.2.2-1"] = {
        stderr = {
          "Warning: skipping dependency checks.",
          "make: Warning: File `Makefile' has modification time 7.1e+08 s in the future",
          "src/luauuid.c:35:17: fatal error: lua.h: No such file or directory",
          " #include <lua.h>",
          "                 ^",
          "compilation terminated.",
          "make: *** [so/luauuid.o] Error 1",
          "",
          "Error: Build error: Failed building."
        },
        stdout = {
          "mkdir so",
          "mkdir lib",
          "gcc -std=c99 -O2 -fPIC -fPIC -c -o so/luauuid.o src/luauuid.c",
          "Installing https://rocks.moonscript.org/org.conman.uuid-1.2.2-1.src.rock...";,
          "Using https://rocks.moonscript.org/org.conman.uuid-1.2.2-1.src.rock... switching to 'build' mode"
        }
      }
    },

lua.h not found?  What file should I include?  And it also failed under
OS-X [7] but *not* Windows? [8]

  My main issue with this is that I can't find any actionable items to fix. 
I mean, okay, my Makefile has a modification time some 700,000,00 seconds in
the future?  No ... it's fine (both on my system and from a fresh checkout
from github).  Missing lua.h?  Should I be using lua-51.h?  lua51.h?  Should
I be passing /usr/local/include to the compiler?  Which of my modules
(listed here) passed?  How did org.conman.errno fail?  What was wrong with
org.conman.iconv?

  I've got too many questions to even start looking into my luarock modules. 
And while I can fix the Linux and OS-X issues, I have no Windows systems [3]
nor do I understand that platform to fix issues there.  And I'm sure there
are people who can fix Windows issues but not OS-X or Linux.  

  -spc

[1]	All the modules that start with org.conman are mine.

[2]	http://www.scilua.org/luarocksorg/state/Windows/x86/log/

[3]	More like "won't" but I digress

[4]	http://www.scilua.org/luarocksorg/state/pass.lua

[5]	http://www.scilua.org/luarocksorg/state/error.lua

[6]	http://www.scilua.org/luarocksorg/state/Linux/x86/error_sys.lua

[7]	http://www.scilua.org/luarocksorg/state/OSX/x86/error_sys.lua

[8]	http://www.scilua.org/luarocksorg/state/Windows/x86/exclude_sys.lua