emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
3.04k stars 694 forks source link

Building zlib fails #522

Closed andypotato closed 4 years ago

andypotato commented 4 years ago

Error description

Using emscripten v1.39.17 on Ubuntu 18.04 results in a Permission error when trying to build zlib on first usage.

It seems the error is not related to file system permissions. I went as far as making the whole emsdk directory world readable/writable and running emcc as root. The error will still occur.

Full error log

system_libs:INFO: retrieving port: zlib from https://github.com/emscripten-ports/zlib/archive/version_1.zip
system_libs:INFO: unpacking port: zlib
cache:INFO: generating port: libz.a... (this will be cached in "/opt/emsdk/upstream/emscripten/cache/wasm/libz.a" for subsequent builds)
Traceback (most recent call last):
  File "/opt/emsdk/upstream/emscripten/emcc.py", line 3930, in <module>
    sys.exit(run(sys.argv))
  File "/opt/emsdk/upstream/emscripten/emcc.py", line 2205, in run
    compile_source_file(i, input_file)
  File "/opt/emsdk/upstream/emscripten/emcc.py", line 2181, in compile_source_file
    cmd = get_clang_command(input_file)
  File "/opt/emsdk/upstream/emscripten/emcc.py", line 2146, in get_clang_command
    return system_libs.process_args(cmd, shared.Settings)
  File "/opt/emsdk/upstream/emscripten/tools/system_libs.py", line 1999, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/opt/emsdk/upstream/emscripten/tools/ports/zlib.py", line 55, in process_args
    get(ports, settings, shared)
  File "/opt/emsdk/upstream/emscripten/tools/ports/zlib.py", line 46, in get
    return [shared.Cache.get('libz.a', create, what='port')]
  File "/opt/emsdk/upstream/emscripten/tools/cache.py", line 125, in get
    temp = creator()
  File "/opt/emsdk/upstream/emscripten/tools/ports/zlib.py", line 27, in create
    shutil.copytree(source_path, dest_path)
  File "/usr/lib/python3.6/shutil.py", line 365, in copytree
    raise Error(errors)
shutil.Error: [('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/amiga', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/amiga', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/amiga'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/as400', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/as400', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/as400'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/ada', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/ada', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/ada'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/amd64', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/amd64', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/amd64'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/asm686', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/asm686', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/asm686'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/blast', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/blast', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/blast'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/delphi', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/delphi', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/delphi'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/dotzlib/DotZLib', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/dotzlib/DotZLib', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/dotzlib/DotZLib'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/dotzlib', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/dotzlib', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/dotzlib'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/gcc_gvmat64', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/gcc_gvmat64', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/gcc_gvmat64'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/infback9', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/infback9', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/infback9'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/inflate86', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/inflate86', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/inflate86'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/iostream', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/iostream', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/iostream'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/iostream2', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/iostream2', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/iostream2'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/iostream3', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/iostream3', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/iostream3'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/masmx64', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/masmx64', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/masmx64'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/masmx86', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/masmx86', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/masmx86'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/minizip', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/minizip', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/minizip'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/pascal', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/pascal', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/pascal'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/puff', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/puff', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/puff'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/testzlib', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/testzlib', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/testzlib'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/untgz', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/untgz', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/untgz'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/vstudio/vc10', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio/vc10', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio/vc10'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/vstudio/vc11', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio/vc11', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio/vc11'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/vstudio/vc9', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio/vc9', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio/vc9'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib/vstudio', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib/vstudio'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/contrib', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/contrib'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/doc', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/doc', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/doc'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/examples', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/examples', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/examples'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/msdos', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/msdos', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/msdos'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/nintendods', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/nintendods', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/nintendods'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/old/os2', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/old/os2', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/old/os2'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/old', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/old', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/old'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/qnx', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/qnx', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/qnx'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/test', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/test', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/test'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/watcom', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/watcom', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/watcom'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1/win32', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/win32', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib/win32'"), ('/opt/emsdk/upstream/emscripten/cache/ports/zlib/zlib-version_1', '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib', "[Errno 13] Permission denied: '/opt/emsdk/upstream/emscripten/cache/wasm/ports-builds/zlib'")]
andypotato commented 4 years ago

Error does no longer occur on a clean checkout of emsdk.