Closed arskiy closed 5 years ago
Possibly the ports dir is in a bad state after an initial error. Does emcc --clear-cache
not help? Deleting the cache dir directly, as you say you did, should be equivalent, but worth trying anyhow. If it's not that, not sure what it could be. Permissions issue on the dir perhaps? (I can't reproduce locally, and our bots also build it ok.)
Also emcc --clear-ports
may be necessary.
Nope, unfortunately that doesn't works. This is what I did, please correct me if I did something wrong:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
ls
./emsdk install latest
./emsdk activate latest
source emsdk_env.sh
emcc --clear-cache
emcc --clear-ports
embuilder.py build sdl2
(enters error loop)
Those commands look fine, and running them locally it works for me. Very strange.
Perhaps adding some print debugging before the failing line in sdl2.py can help, like this maybe:
$ git diff
diff --git a/tools/ports/sdl2.py b/tools/ports/sdl2.py
index 05e2f4df5..2a8444a07 100644
--- a/tools/ports/sdl2.py
+++ b/tools/ports/sdl2.py
@@ -29,7 +29,9 @@ def get(ports, settings, shared):
# copy includes to a location so they can be used as 'SDL2/'
source_include_path = os.path.join(ports.get_dir(), 'sdl2', SUBDIR + '', 'include')
dest_include_path = os.path.join(shared.Cache.get_path('ports-builds'), 'sdl2', 'include')
+ print('debugging1', os.path.exists(dest_include_path))
shared.try_delete(dest_include_path)
+ print('debugging2', os.path.exists(dest_include_path))
shutil.copytree(source_include_path, dest_include_path)
shutil.copytree(source_include_path, os.path.join(dest_include_path, 'SDL2'))
# write out an SDL_config.h file, that configure would normally emit
When I run that I see
('debugging1', False)
('debugging2', False)
and then it continues successfully.
Ok, after a bit of debugging I tried doing that in a VM. (after I have decided that I was going nowhere) Surprise surprise, it worked.
So, I came to the conclusion that there's something wrong with my Linux install, probably with some hidden Emscripten config that is breaking everything.
I'm not closing this because I'm going to test around a little bit more, searching for some file in my system that is breaking Emscripten
Thanks a lot for the help anyway.
While running
embuilder.py build sdl2
or trying to compile code that uses the SDL2 library using Emscripten, embuilder enters an infinite loop of errors.This was repeated 3100x times, until it finally error'd out. I've tried doing a clean install (including deleting
~/.emscripten*
) of Emscripten multiple times using different ways, but none of them worked.