0

Ever since yesterday, I've been trying to install lua.vm.js to use it. I've hit some road bumps here and there but this one is by far the one I have no clue on how to fix. What I've been trying to do is literally build it, that's it. I got the files from this GitHub page and I'm just trying to follow the instructions. But I got this error message that, at least for me, does not make sense and I have no clue on how I could find a solution.

    C:\lua.vm.js-master\lua>make emscripten
    cd src && make emscripten
    process_begin: CreateProcess(NULL, em-config EMCC, ...) failed.
    process_begin: CreateProcess(NULL, em-config EMAR, ...) failed.
    process_begin: CreateProcess(NULL, em-config EMRANLIB, ...) failed.
    make[1]: Entering directory `C:/lua.vm.js-master/lua/src'
    make ../../dist/lua.vm.js \
                    CC="" \
                    AR=" rcu" \
                    RANLIB="" \
                    SYSLDFLAGS="-Os \
                            -s INVOKE_RUN=0 \
                            -s NO_EXIT_RUNTIME=1 \
                            -s TOTAL_MEMORY=134217728 \
                            -s RESERVED_FUNCTION_POINTERS=8 \
                            --memory-init-file 0 \
                            --post-js ../../src/lua.js \
                            --embed-file ../../src/js.lua@js.lua \
                            "
    make[2]: Entering directory `C:/lua.vm.js-master/lua/src'
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lapi.o lapi.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lapi.o lapi.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lapi.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lcode.o lcode.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lcode.o lcode.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lcode.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lctype.o lctype.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lctype.o lctype.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lctype.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ldebug.o ldebug.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ldebug.o ldebug.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ldebug.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ldo.o ldo.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ldo.o ldo.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ldo.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ldump.o ldump.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ldump.o ldump.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ldump.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lfunc.o lfunc.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lfunc.o lfunc.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lfunc.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lgc.o lgc.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lgc.o lgc.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lgc.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o llex.o llex.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o llex.o llex.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [llex.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lmem.o lmem.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lmem.o lmem.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lmem.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lobject.o lobject.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lobject.o lobject.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lobject.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lopcodes.o lopcodes.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lopcodes.o lopcodes.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lopcodes.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lparser.o lparser.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lparser.o lparser.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lparser.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lstate.o lstate.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lstate.o lstate.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lstate.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lstring.o lstring.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lstring.o lstring.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lstring.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ltable.o ltable.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ltable.o ltable.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ltable.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ltm.o ltm.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ltm.o ltm.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ltm.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lundump.o lundump.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lundump.o lundump.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lundump.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lvm.o lvm.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lvm.o lvm.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lvm.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lzio.o lzio.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lzio.o lzio.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lzio.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lauxlib.o lauxlib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lauxlib.o lauxlib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lauxlib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lbaselib.o lbaselib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lbaselib.o lbaselib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lbaselib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lbitlib.o lbitlib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lbitlib.o lbitlib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lbitlib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lcorolib.o lcorolib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lcorolib.o lcorolib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lcorolib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ldblib.o ldblib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ldblib.o ldblib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ldblib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o liolib.o liolib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o liolib.o liolib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [liolib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lmathlib.o lmathlib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lmathlib.o lmathlib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lmathlib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o loslib.o loslib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o loslib.o loslib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [loslib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o lstrlib.o lstrlib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o lstrlib.o lstrlib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [lstrlib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o ltablib.o ltablib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o ltablib.o ltablib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [ltablib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o loadlib.o loadlib.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o loadlib.o loadlib.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [loadlib.o] Error 2 (ignored)
    O2 -Wall -DLUA_COMPAT_ALL     -c -o linit.o linit.c
    process_begin: CreateProcess(NULL, O2 -Wall -DLUA_COMPAT_ALL -c -o linit.o linit.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: [linit.o] Error 2 (ignored)
    rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o
    process_begin: CreateProcess(NULL, rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o, ...) failed.
    make (e=2): The system cannot find the file specified.
    make[2]: *** [liblua.a] Error 2
    make[2]: Leaving directory `C:/lua.vm.js-master/lua/src'
    make[1]: *** [emscripten] Error 2
    make[1]: Leaving directory `C:/lua.vm.js-master/lua/src'
    make: *** [emscripten] Error 2

I tried looking for others with similar issues but it seems this problem is specific to what you are trying to do, so I couldn't apply any of what I found to this issue. I'm using gnuwn32 to make, I didn't tamper with any of the files.


A bit more information I'll put down. The em-config.py file the makefile references contain this code:

"""This is a helper tool which is designed to make it possible
for other apps to read emscripten's configuration variables
in a unified way.  Usage:

  em-config VAR_NAME

This tool prints the value of the variable to stdout if one
is found, or exits with 1 if the variable does not exist.
"""

import sys
import re
from tools import config


def main():
  if len(sys.argv) != 2 or \
    not re.match(r"^[\w\W_][\w\W_\d]*$", sys.argv[1]) or \
    not hasattr(config, sys.argv[1]):
    print('Usage: em-config VAR_NAME', file=sys.stderr)
    exit(1)

  print(getattr(config, sys.argv[1]))
  return 0


if __name__ == '__main__':
  sys.exit(main())

You can clearly see its usage in the comments, it's supposed to "make it possible for other apps to read emscripten's configuration variables in a unified way" And right below it, the line of code the Makefile for lua.vm.js calls to find certain variables. As seen here:

process_begin: CreateProcess(NULL, em-config EMCC, ...) failed.
process_begin: CreateProcess(NULL, em-config EMAR, ...) failed.
process_begin: CreateProcess(NULL, em-config EMRANLIB, ...) failed.

And why it still refuses to find the proper files is beyond me at this point. But I have a clue, this C compiler that the Makefile is trying to find may not exist on my system, which is both strange and confusing.

Tchinka
  • 15
  • 7

1 Answers1

1

Well, starting with the errors:

O2 -Wall -DLUA_COMPAT_ALL     -c -o lapi.o lapi.c

This command is trying to compile a C file, but there's no actual compiler here, it's just options. Where did the compiler go? Looking a little further back:

make ../../dist/lua.vm.js \
                CC="" \

Here we see that the invocation of make set the CC variable, which holds the C compiler, to the empty string. Why might that happen? I don't know for sure, but looking at these messages before that:

process_begin: CreateProcess(NULL, em-config EMCC, ...) failed.

leads me to suspect that at the top-level makefile there appears something like this:

CC := $(shell em-config EMCC)

which tries to invoke the em-config program and have it find a C compiler, and this command is failing. It would be nice if the makefile checked that these values were not empty and exited with a more understandable error.

But anyway, it seems that the em-config program is not found or not executable for some reason. That's about all we can say. Either you didn't install something or you didn't configure something. These tools are usually developed on POSIX systems like Linux or MacOS; often the conversion to Windows requires some extra manual steps etc. I don't know for sure but I recommend you read whatever instructions are available for building on Windows extra carefully and make sure all of them were successfully followed.

MadScientist
  • 92,819
  • 9
  • 109
  • 136
  • Thank you for your amazing insight. You see, the Lua VM uses Emscripten, a piece of software that comes separate to it and requires some manual installation. And it comes with this missing em-config file that is supposed to fetch a C compiler yet it still does not find it , even after making 100% sure it could in fact see the config file throw the right path through the Environment Variables. Is there anything I can edit in to give you some more info related to this issue? Thank you again for your time – Tchinka Aug 19 '21 at 23:40
  • Sorry but I know little about lua and emscripten and next to nothing about Windows, so I won't be able to help. – MadScientist Aug 20 '21 at 03:06