neonious / lowjs

A port of Node.JS with far lower system requirements. Community version for POSIX systems such as Linux, uClinux or Mac OS X.
http://www.lowjs.org/
Other
1.27k stars 72 forks source link

make error on build #123

Closed GiovanniCardamone closed 3 years ago

GiovanniCardamone commented 3 years ago

Hello, i was trying to build a low.js bin on my machine

$ uname -a
Linux Jhos 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

but the make command gave me the following error:

$ make         
rm -rf deps/duktape/src-low
cd deps/duktape && python tools/configure.py --output-directory=src-low \
    -DDUK_USE_GLOBAL_BUILTIN   \
    -DDUK_USE_BOOLEAN_BUILTIN   \
    -DDUK_USE_ARRAY_BUILTIN   \
    -DDUK_USE_OBJECT_BUILTIN   \
    -DDUK_USE_FUNCTION_BUILTIN   \
    -DDUK_USE_STRING_BUILTIN   \
    -DDUK_USE_NUMBER_BUILTIN   \
    -DDUK_USE_DATE_BUILTIN   \
    -DDUK_USE_REGEXP_SUPPORT   \
    -DDUK_USE_MATH_BUILTIN   \
    -DDUK_USE_JSON_BUILTIN   \
    -DDUK_USE_BUFFEROBJECT_SUPPORT   \
    -DDUK_USE_ENCODING_BUILTINS   \
    -DDUK_USE_PERFORMANCE_BUILTIN   \
    -DDUK_USE_OBJECT_BUILTIN    \
    -DDUK_USE_ES6_PROXY \
    -DDUK_USE_GLOBAL_BINDING \
    -DDUK_USE_SYMBOL_BUILTIN    \
    -DDUK_USE_SECTION_B \
    -DDUK_USE_CPP_EXCEPTIONS
Traceback (most recent call last):
  File "tools/configure.py", line 1005, in <module>
    main()
  File "tools/configure.py", line 315, in main
    get_duk_version(os.path.join(srcdir, 'duktape.h.in'))
  File "tools/configure.py", line 139, in get_duk_version
    m = r.match(line)
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Makefile:98: deps/duktape/src-low/duktape.c] Errore 1

someone know how to fix this?

ThomasRogg commented 3 years ago

My guess: python most probably links to v3, but you must have v2 installed for DukTape.

GiovanniCardamone commented 3 years ago

yep, my python executable links to python3.7

$ python --version
Python 3.7.7

i will replace makefile python with python2 executable

$ python2 --version
Python 2.7.18

Tips:

maybe makefile should have variable like CC for python?

example:

PYTHON2=/path/to/python2