threefoldtecharchive / jumpscaleX_builders

Apache License 2.0
1 stars 0 forks source link

Lua builder is borken #32

Closed abom closed 4 years ago

abom commented 4 years ago

kosmos "j.builders.runtimes.lua.install()"

Gives the following error (seems like some paths are incorrect).

...
++ LANG=en_US.UTF-8
+ cd /tmp/builders/lua/luarocks
+ ./configure --prefix=/sandbox/openresty/luarocks --with-lua=/sandbox/openresty/luajit

Configuring LuaRocks version 3.1.3...

Lua version detected: 5.1
Lua interpreter found: /sandbox/openresty/luajit/bin/luajit
lua.h not found (tried /sandbox/openresty/luajit/include/lua/5.1/lua.h /sandbox/openresty/luajit/include/lua5.1/lua.h /sandbox/openresty/luajit/includ
e/lua51/lua.h /sandbox/openresty/luajit/include/lua.h /sandbox/openresty/luajit/include/luajit-2.1/lua.h)

If the development files for Lua (headers and libraries)
are installed in your system, you may need to use the                                                                                       [37/12887]
--with-lua or --with-include flags to specify their location.

If those files are not yet installed, you need to install
them using the appropriate method for your operating system.

Run ./configure --help for details on flags.

configure failed.

Sun 22 14:17:21 InstallTools.py      -1296 - _execute                           : system.process.run ended, exitcode was 1
Sun 22 14:17:21 core/InstallTools.py -2250 - execute                            : EXCEPTION: 

    Could not execute: 'bash /tmp/builder_lua.sh'stdout:

        Configuring LuaRocks version 3.1.3...

        Lua version detected: 5.1
        Lua interpreter found: /sandbox/openresty/luajit/bin/luajit
        lua.h not found (tried /sandbox/openresty/luajit/include/lua/5.1/lua.h
            /sandbox/openresty/luajit/include/lua5.1/lua.h /sandbox/openresty/luajit/include/lua51/lua.h
            /sandbox/openresty/luajit/include/lua.h /sandbox/openresty/luajit/include/luajit-2.1/lua.h)

        If the development files for Lua (headers and libraries)
        are installed in your system, you may need to use the
        --with-lua or --with-include flags to specify their location.

        If those files are not yet installed, you need to install
        them using the appropriate method for your operating system.

        Run ./configure --help for details on flags.

        configure failed.
...
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in wrapper_action
    163    builder.build()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in wrapper_action
    178    res = self.apply_method(func, kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in apply_method
    93    return func(**kwargs)
/sandbox/lib/jumpscale/JumpscaleBuilders/runtimes/BuilderLua.py in build
    49    self._execute(C, showout=True)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in _execute
    386    showout=showout,
/sandbox/lib/jumpscale/Jumpscale/sal/process/SystemProcess.py in execute
    108    replace=replace,
/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py in execute
    2250    raise Tools.exceptions.Base(msg)
-----------------------------
abom commented 4 years ago

Fixed in https://github.com/threefoldtech/jumpscaleX_builders/commit/e4b46f2966df334287181a143bf88bf1e1b8808a by only removing luarocks related files, not the files that're created/managed by openresty builder.

Make sure to install openresty before trying to install lua to fix missing files, after that, the problem should not occur again when passing reset=True to lua builder install().

kosmos "j.builders.web.openresty.install(reset=True)"

Then kosmos "j.builders.runtimes.lua.install(reset=True)" should work if executed many times without problems.

hossnys commented 4 years ago

verified on development :

....+++++
.................................................................................+++++
writing new private key to '/sandbox/cfg/ssl/resty-auto-ssl-fallback.key'
-----