cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
868 stars 115 forks source link

Emscripten build is broken #768

Open bplx opened 1 year ago

bplx commented 1 year ago
SDL2 include dir: /usr/include;/usr/include/SDL2
Data dir is ../
running /usr/bin/cmake -E copy_if_different /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/api/yajl_parse.h /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/..//include/yajl  2>&1
running /usr/bin/cmake -E copy_if_different /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/api/yajl_gen.h /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/..//include/yajl  2>&1
running /usr/bin/cmake -E copy_if_different /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/api/yajl_common.h /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/..//include/yajl  2>&1
running /usr/bin/cmake -E copy_if_different /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/api/yajl_tree.h /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl/src/cdogs/yajl/..//include/yajl  2>&1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dexah/Documents/Projects/cdogsinthebrowser/cdogs-sdl
Traceback (most recent call last):
  File "/usr/share/emscripten/emcc.py", line 3947, in <module>
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emscripten/emcc.py", line 3940, in main
    ret = run(args)
          ^^^^^^^^^
  File "/usr/share/emscripten/emcc.py", line 1199, in run
    phase_post_link(options, state, wasm_target, wasm_target, target)
  File "/usr/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emscripten/emcc.py", line 2766, in phase_post_link
    phase_final_emitting(options, state, target, wasm_target, memfile)
  File "/usr/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emscripten/emcc.py", line 2893, in phase_final_emitting
    generate_html(target, options, js_target, target_basename,
  File "/usr/share/emscripten/emcc.py", line 3681, in generate_html
    minify_html(target)
  File "/usr/share/emscripten/emcc.py", line 3655, in minify_html
    shared.check_call(['htmlmin', opts, '--', filename, filename])
  File "/usr/share/emscripten/tools/shared.py", line 221, in check_call
    return run_process(cmd, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/emscripten/tools/shared.py", line 105, in run_process
    ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1834, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not list

Here is the log. not really sure what this means, but it isn't compiling. Also, i had to change -sSTACK_SIZE=131072 to --stack_size=131072 in make_emscripten.sh because that was causing an issue as well. Let me know if you need any more info.

alexpalade commented 9 months ago

It builds and runs fine for me on Linux. I also didn't need that stack_size change. Maybe it's a Windows specific or a Python bug / installation issue. I have Emscripten 3.1.46 and Python 3.11.5.