-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
I'm trying out an updated freetype port using cmake. When I run embuilder build freetype, I get a cache lock error on the first assert (line 39 in cache.py).
I added print(dict(os.environ)), right before it, and EM_CACHE_IS_LOCKED did not show up in it.
After commenting out the assert, it seems to hang when building freetype.
Please include the following in your bug report:
Version of emscripten/emsdk:
Please include the output emcc -v here
3.1.23
Failing command line in full:
If this is compile or link-time failure please include the full failing command
along with its entire output.
python3 ./embuilder.py build zlib freetype
embuilder:INFO: building freetype
ports:INFO: retrieving port: freetype from https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz
ports:INFO: unpacking port: freetype
cache:INFO: generating port: sysroot/lib/wasm32-emscripten/libfreetype.a... (this will be cached in "/local/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libfreetype.a" for subsequent builds)
configure: cmake -B/local/emsdk/upstream/emscripten/cache/ports-builds/freetype -S/local/emsdk/upstream/emscripten/cache/ports/freetype/freetype-2.12.1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/local/emsdk/upstream/emscripten/cache/ports-builds/freetype -DCMAKE_CXX_FLAGS="-I/local/emsdk/upstream/emscripten/system/lib/libc/musl/include/" -DCMAKE_C_FLAGS="-I/local/emsdk/upstream/emscripten/system/lib/libc/musl/include/" -DCMAKE_TOOLCHAIN_FILE=/local/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/local/emsdk/node/14.18.2_64bit/bin/node;--experimental-wasm-threads
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
CMake Warning at builds/cmake/FindHarfBuzz.cmake:99 (message):
Required version (2.0.0) is higher than found version ()
Call Stack (most recent call first):
CMakeLists.txt:253 (find_package)
-- Found ZLIB: /local/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libz.a (found version "1.2.12")
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
-- Could NOT find BrotliDec (missing: BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES)
-- Looking for unistd.h
-- Looking for unistd.h - not found
Traceback (most recent call last):
File "/local/emsdk/upstream/emscripten/emcc.py", line 4145, in
sys.exit(main(sys.argv))
File "/usr/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/local/emsdk/upstream/emscripten/emcc.py", line 4138, in main
ret = run(args)
File "/local/emsdk/upstream/emscripten/emcc.py", line 1192, in run
phase_calculate_system_libraries(state, linker_arguments, linker_inputs, newargs)
File "/usr/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/local/emsdk/upstream/emscripten/emcc.py", line 2860, in phase_calculate_system_libraries
extra_files_to_link += system_libs.calculate(all_linker_inputs, newargs, forced=state.forced_stdlibs)
File "/local/emscripten/tools/system_libs.py", line 2132, in calculate
libs_to_link = get_libs_to_link(args, forced, only_forced)
File "/local/emscripten/tools/system_libs.py", line 2068, in get_libs_to_link
add_library('libGL')
File "/local/emscripten/tools/system_libs.py", line 2014, in add_library
libs_to_link.append((lib.get_link_flag(), need_whole_archive))
File "/local/emscripten/tools/system_libs.py", line 379, in get_link_flag
fullpath = self.build()
File "/local/emscripten/tools/system_libs.py", line 371, in build
return shared.Cache.get(self.get_path(), self.do_build, force=USE_NINJA == 2, quiet=USE_NINJA)
File "/local/emscripten/tools/cache.py", line 145, in get
with self.lock(shortname):
File "/usr/lib/python3.8/contextlib.py", line 113, in enter
return next(self.gen)
File "/local/emscripten/tools/cache.py", line 65, in lock
self.acquire_cache_lock(reason)
File "/local/emscripten/tools/cache.py", line 42, in acquire_cache_lock
assert 'EM_CACHE_IS_LOCKED' not in os.environ, f'attempt to lock the cache while a parent process is holding the lock ({reason})'
AssertionError: attempt to lock the cache while a parent process is holding the lock (sysroot/lib/wasm32-emscripten/libGL.a)
make[1]: *** [CMakeFiles/cmTC_d8893.dir/build.make:88: cmTC_d8893.js] Error 1
make[1]: Leaving directory '/local/emscripten/cache/ports-builds/freetype/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_d8893/fast] Error 2