Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_Mixer=2 fails with 1.38.31 #8487

Closed
SimplyLiz opened this issue Apr 25, 2019 · 4 comments · Fixed by #8490
Closed

SDL_Mixer=2 fails with 1.38.31 #8487

SimplyLiz opened this issue Apr 25, 2019 · 4 comments · Fixed by #8490

Comments

@SimplyLiz
Copy link

Same error message as in #8341

-s USE_SDL_MIXER=2 doesn't work on windows with 1.38.31.

Traceback (most recent call last):
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\emcc.py", line 3308, in <module>
    sys.exit(run(sys.argv))
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\emcc.py", line 1661, in run
    compile_source_file(i, input_file)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\emcc.py", line 1643, in compile_source_file
    args = get_clang_args([input_file]) + ['-c', '-o', output_file]
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\emcc.py", line 1624, in get_clang_args
    args = system_libs.process_args(args, shared.Settings)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\system_libs.py", line 1035, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\ports\sdl2_mixer.py", line 53, in process_args
    get(ports, settings, shared)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\ports\sdl2_mixer.py", line 38, in get
    return [shared.Cache.get('libSDL2_mixer.a', create, what='port')]
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\cache.py", line 133, in get
    temp = creator()
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\ports\sdl2_mixer.py", line 31, in create
    ports.run_commands([[shared.EMCONFIGURE, configure, '--prefix=' + dist_dir] + formatflags + commonflags + ['CFLAGS=-s USE_VORBIS=1']])
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\system_libs.py", line 826, in run_commands
    run_commands(commands)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\system_libs.py", line 35, in run_commands
    call_process(command)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\system_libs.py", line 28, in call_process
    shared.run_process(cmd, stdout=stdout, stderr=stderr)
  File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\shared.py", line 170, in run_process
    proc = Popen(cmd, *args, **kw)
  File "D:\iso\emscripten\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "D:\iso\emscripten\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 640, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 ist keine zulõssige Win32-Anwendung

(which means that it's not a valid 32 bit application)

sbc100 added a commit that referenced this issue Apr 25, 2019
This should fix the windows build where python scripts cannot be
executed directly.

Fixes: #8487
@sbc100
Copy link
Collaborator

sbc100 commented Apr 25, 2019

Did this ever work? It loosk like it should have always failed this way.

sbc100 added a commit that referenced this issue Apr 25, 2019
#8490)

This should fix the windows build where python scripts cannot be
executed directly.

Fixes: #8487
@SimplyLiz
Copy link
Author

Thank you! Going to test it tomorrow.

I don't know if it ever worked, i've use emscripten the first time two weeks ago to port my game. I ifdef'ed the sdl mixer parts, (which probably won't work anyway for now as i have mp3s).

I also noticed that the mixer ports - file differ greatly from the other sdl ports. That should be refactored imho. I've tried it, but i couldn't get it to work, tbh. Else i'd have submitted a PR

@SimplyLiz
Copy link
Author

@sbc100
I've tried your changes but it still get the same error. (I changed both .py files in emsdk\emscripten\tag-1.38.31). Should that suffice?

I used emcc --clear-cache and emcc --clear-ports before

Seems it boils down to:

emconfigure C:\Users\jimmysnails\.emscripten_ports\sdl2_mixer\SDL2_mixer-release-2.0.1\configure --prefix=C:\Users\jimmysnails\.emscripten_cache\asmjs\ports-builds\sdl2_mixer\dist --enable-music-wave --disable-music-mod --disable-music-midi --enable-music-ogg --disable-music-ogg-shared --disable-music-flac --disable-music-mp3 --disable-shared --disable-music-cmd --enable-sdltest --disable-smpegtest CFLAGS=-s USE_VORBIS=1

which directly executed throws this error (even with your changes):

shared:ERROR: Error running configure: "C:\Users\jimmysnails.emscripten_ports\sdl2_mixer\SDL2_mixer-release-2.0.1\configure --prefix=C:\Users\jimmysnails.emscripten_cache\asmjs\ports-builds\sdl2_mixer\dist --enable-music-wave --disable-music-mod --disable-music-midi --enable-music-ogg --disable-music-ogg-shared --disable-music-flac --disable-music-mp3 --disable-shared --disable-music-cmd --enable-sdltest --disable-smpegtest CFLAGS=-s USE_VORBIS=1"
Traceback (most recent call last):
File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\emconfigure.py", line 59, in
run()
File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\emconfigure.py", line 53, in run
shared.Building.configure(sys.argv[1:])
File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\shared.py", line 1654, in configure
res = run_process(args, check=False, stdout=stdout, stderr=stderr, env=env)
File "D:\iso\emscripten\emsdk\emscripten\tag-1.38.31\tools\shared.py", line 170, in run_process
proc = Popen(cmd, *args, **kw)
File "D:\iso\emscripten\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 390, in init
errread, errwrite)
File "D:\iso\emscripten\emsdk\python\2.7.13.1_64bit\python-2.7.13.amd64\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 193] %1 ist keine zulõssige Win32-Anwendung

@sbc100
Copy link
Collaborator

sbc100 commented Apr 26, 2019

In order to actually run the configure script on windows presumably you would also need bash installed and some kind of UNIX-like environment (cygwin, mingw, etc).

I don't know the history of this port but it looks like it was never able to build correctly on regular windows install. I would change the title of this bug accordingly. I don't think there are any other ports that actually used autoconf, so maybe this port could be converted to use the same build techniques used by the other SDL ports. If you fancy taking a stab it that you could try copying sdl2_net.py does.

VirtualTim pushed a commit to VirtualTim/emscripten that referenced this issue May 21, 2019
emscripten-core#8490)

This should fix the windows build where python scripts cannot be
executed directly.

Fixes: emscripten-core#8487
belraquib pushed a commit to belraquib/emscripten that referenced this issue Dec 23, 2020
emscripten-core#8490)

This should fix the windows build where python scripts cannot be
executed directly.

Fixes: emscripten-core#8487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants