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

Secondary port build failure when using EMCC_LOCAL_PORTS #9402

Open
Beuc opened this issue Sep 6, 2019 · 0 comments

Comments

@Beuc
Copy link
Contributor

commented Sep 6, 2019

Hi,

Using -s USE_SDL_MIXER=2 or -s USE_SDL_TTF=2 with a local SDL2 port fails.
The build directory of sdl2_mixer or sdl2_ttf gets mysteriously and entirely removed in the middle of the build, causing failure.
Note: I already have cache lock from #9391

$ echo "int main(void) { return 0; }" > test.c

$ EMCC_LOCAL_PORTS=sdl2=../build/SDL2 emcc test.c -s USE_SDL=2 -s USE_SDL_MIXER=2
system_libs:WARNING: using local ports: sdl2=../build/SDL2
system_libs:WARNING: grabbing local port: sdl2 from ../build/SDL2 to /home/me/.emscripten_ports/sdl2 (subdir: SDL2-version_18)
root:INFO: Cache: deleting cached file: /home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2.a
cache:INFO: generating port: libSDL2.a... (this will be cached in "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2.a" for subsequent builds)
cache:INFO:  - ok
system_libs:WARNING: using local ports: sdl2=../build/SDL2
system_libs:WARNING: using local ports: sdl2=../build/SDL2
system_libs:WARNING: using local ports: sdl2=../build/SDL2
cache:INFO: generating port: libSDL2_mixer.a... (this will be cached in "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2_mixer.a" for subsequent builds)
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
...
checking for SDL... no
checking for sdl2-config... /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config
checking for SDL - version >= 2.0.0... emscripten sdl2-config called with /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config --cflags
emscripten sdl2-config called with /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config --libs
emscripten sdl2-config called with /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config --version
emscripten sdl2-config called with /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config --version
emscripten sdl2-config called with /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config --version
no
*** Could not run SDL test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl2-config script: /home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/bin/sdl2-config
configure: error: *** SDL version 2.0.0 not found!
Traceback (most recent call last):
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 3559, in <module>
    sys.exit(run(sys.argv))
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 1852, in run
    compile_source_file(i, input_file)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 1834, in compile_source_file
    cmd = get_clang_command([input_file]) + ['-c', '-o', output_file]
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 1805, in get_clang_command
    args = system_libs.process_args(args, shared.Settings)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/system_libs.py", line 1626, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/ports/sdl2_mixer.py", line 53, in process_args
    get(ports, settings, shared)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/ports/sdl2_mixer.py", line 38, in get
    return [shared.Cache.get('libSDL2_mixer.a', create, what='port')]
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/cache.py", line 133, in get
    temp = creator()
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/ports/sdl2_mixer.py", line 31, in create
    shared.run_process([shared.PYTHON, shared.EMCONFIGURE, configure, '--prefix=' + dist_dir] + formatflags + commonflags + ['CFLAGS=-s USE_VORBIS=1'])
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/shared.py", line 181, in run_process
    result.check_returncode()
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/shared.py", line 161, in check_returncode
    raise Py2CalledProcessError(returncode=self.returncode, cmd=self.args, output=self.stdout, stderr=self.stderr)
tools.shared.Py2CalledProcessError: Command '['/usr/bin/python', '/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emconfigure.py', '/home/me/.emscripten_ports/sdl2_mixer/SDL2_mixer-release-2.0.1/configure', '--prefix=/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/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']' returned non-zero exit status 1
$ EMCC_LOCAL_PORTS=sdl2=../build/SDL2 emcc test.c -s USE_SDL=2 -s USE_SDL_TTF=2
system_libs:WARNING: using local ports: sdl2=../build/SDL2
system_libs:WARNING: grabbing local port: sdl2 from ../build/SDL2 to /home/me/.emscripten_ports/sdl2 (subdir: SDL2-version_18)
root:INFO: Cache: deleting cached file: /home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2.a
cache:INFO: generating port: libSDL2.a... (this will be cached in "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2.a" for subsequent builds)
cache:INFO:  - ok
system_libs:WARNING: using local ports: sdl2=../build/SDL2
system_libs:WARNING: using local ports: sdl2=../build/SDL2
cache:INFO: generating port: libSDL2_ttf.a... (this will be cached in "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2_ttf.a" for subsequent builds)
system_libs:WARNING: using local ports: sdl2=../build/SDL2
system_libs:WARNING: grabbing local port: sdl2 from ../build/SDL2 to /home/me/.emscripten_ports/sdl2 (subdir: SDL2-version_18)
root:INFO: Cache: deleting cached file: /home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2.a
cache:INFO: generating port: libSDL2.a... (this will be cached in "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/libSDL2.a" for subsequent builds)
cache:INFO:  - ok
system_libs:WARNING: using local ports: sdl2=../build/SDL2
error: unable to open output file '/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/ports-builds/sdl2_ttf/SDL_ttf.c.o': 'No such file or directory'
1 error generated.
shared:ERROR: '/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=43 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/include/libcxx -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/lib/libcxxabi/include -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/include -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/system/local/include -DEMSCRIPTEN -O2 -w /home/me/.emscripten_ports/sdl2_ttf/SDL2_ttf-version_1/SDL_ttf.c -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/ports-builds/sdl2/include -Xclang -isystem/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/ports-builds/freetype/include -c -o /home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/ports-builds/sdl2_ttf/SDL_ttf.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
Traceback (most recent call last):
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 3559, in <module>
    sys.exit(run(sys.argv))
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 1852, in run
    compile_source_file(i, input_file)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 1834, in compile_source_file
    cmd = get_clang_command([input_file]) + ['-c', '-o', output_file]
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py", line 1805, in get_clang_command
    args = system_libs.process_args(args, shared.Settings)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/system_libs.py", line 1626, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/ports/sdl2_ttf.py", line 60, in process_args
    get(ports, settings, shared)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/ports/sdl2_ttf.py", line 45, in get
    return [shared.Cache.get(libname, create, what='port')]
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/cache.py", line 133, in get
    temp = creator()
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/ports/sdl2_ttf.py", line 40, in create
    ports.run_commands(commands)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/system_libs.py", line 1399, in run_commands
    run_commands(commands)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/system_libs.py", line 62, in run_commands
    run_build_command(command)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/system_libs.py", line 55, in run_build_command
    shared.run_process(cmd, stdout=stdout, stderr=stderr)
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/shared.py", line 181, in run_process
    result.check_returncode()
  File "/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/tools/shared.py", line 161, in check_returncode
    raise Py2CalledProcessError(returncode=self.returncode, cmd=self.args, output=self.stdout, stderr=self.stderr)
tools.shared.Py2CalledProcessError: Command '['/usr/bin/python', '/home/me/workdir/emtests/renpyweb-asyncify/emsdk/upstream/emscripten/emcc.py', '/home/me/.emscripten_ports/sdl2_ttf/SDL2_ttf-version_1/SDL_ttf.c', '-O2', '-s', 'USE_SDL=2', '-s', 'USE_FREETYPE=1', '-o', '/home/me/workdir/emtests/renpyweb-asyncify/emsdk/.emscripten_cache/wasm-obj/ports-builds/sdl2_ttf/SDL_ttf.c.o', '-w']' returned non-zero exit status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.