emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.67k stars 3.29k forks source link

install sdk-fastcomp-tag but not success #14991

Open ljdong-fy opened 3 years ago

ljdong-fy commented 3 years ago

command line in window10: emsdk install sdk-fastcomp-tag-1.38.11-64bit

error :

Installing SDK 'sdk-fastcomp-tag-1.38.11-64bit'.. Installing tool 'fastcomp-clang-tag-e1.38.11-64bit'.. The contents of file 'https://github.com/emscripten-core/emscripten-fastcomp/archive/1.38.11.zip' already exist in destination 'F:/MyWorkspace/svn_repo/Unity5_Workspace/emsdk/fastcomp-clang/tag-e1.38.11\src', skipping. The contents of file 'https://github.com/emscripten-core/emscripten-fastcomp-clang/archive/1.38.11.zip' already exist in destination 'F:/MyWorkspace/svn_repo/Unity5_Workspace/emsdk/fastcomp-clang/tag-e1.38.11\src\tools/clang', skipping. Running CMake: ['cmake', '-G', 'Visual Studio 16', '-DCMAKE_BUILD_TYPE=Release', '-DPYTHON_EXECUTABLE=F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\python\3.9.2-1_64bit\python.exe', '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11', '-A', 'x64', '-DLLVM_TARGETS_TO_BUILD=X86;JSBackend', '-DLLVM_INCLUDE_EXAMPLES=OFF', '-DCLANG_INCLUDE_EXAMPLES=OFF', '-DLLVM_INCLUDE_TESTS=OFF', '-DCLANG_INCLUDE_TESTS=OFF', '-DLLVM_ENABLE_ASSERTIONS=OFF', 'F:/MyWorkspace/svn_repo/Unity5_Workspace/emsdk/fastcomp-clang/tag-e1.38.11\src'] CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy): The OLD behavior for policy CMP0051 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

CMake Warning at CMakeLists.txt:39 (message): Visual Studio generators use the x86 host compiler by default, even for 64-bit targets. This can result in linker instability and out of memory errors. To use the 64-bit host compiler, pass -Thost=x64 on the CMake command line.

-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) -- Native target architecture is X86 -- Threads enabled. -- Doxygen disabled. -- Go bindings disabled. -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. -- Could NOT find Python module pygments -- Could NOT find Python module pygments.lexers.c_cpp -- Could NOT find Python module yaml -- LLVM host triple: x86_64-pc-win32 -- LLVM default target triple: x86_64-pc-win32 -- Using Debug VC++ CRT: MDd -- Using Release VC++ CRT: MD -- Using MinSizeRel VC++ CRT: MD -- Using RelWithDebInfo VC++ CRT: MD -- Using Release VC++ CRT: MD -- Constructing LLVMBuild project information -- LLVMHello ignored -- Loadable modules not supported on this platform. -- Targeting X86 -- Targeting JSBackend -- Clang version: 6.0.1 -- SampleAnalyzerPlugin ignored -- Loadable modules not supported on this platform. -- PrintFunctionNames ignored -- Loadable modules not supported on this platform. -- AnnotateFunctions ignored -- Loadable modules not supported on this platform. -- BugpointPasses ignored -- Loadable modules not supported on this platform. -- Configuring done -- Generating done -- Build files have been written to: F:/MyWorkspace/svn_repo/Unity5_Workspace/emsdk/fastcomp-clang/tag-e1.38.11/build_tag-e1.38.11_vs2019_64 Performing a parallel build with 3 cores. Traceback (most recent call last): File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 3262, in sys.exit(main(sys.argv[1:])) File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 3244, in main tool.install() File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 1970, in install return self.install_sdk() File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 1985, in install_sdk installed |= tool.install() File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 1972, in install return self.install_tool() File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 2020, in install_tool success = build_fastcomp(self) File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 1197, in build_fastcomp success = make_build(build_root, build_type, 'x64' if tool.bitness == 64 else 'Win32') File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 1016, in make_build generator_to_use = get_generator_for_sln_file(os.path.join(build_root, solution_name)) File "F:\MyWorkspace\svn_repo\Unity5_Workspace\emsdk\emsdk.py", line 969, in get_generator_for_sln_file contents = open(sln_file, 'r').read() UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence

sbc100 commented 3 years ago

It looks like the issue relates your default system encoding which is gbk. Can you try set PYTHONIOENCODING=utf8 to force the encoding to be utf8.

Out of interest why are trying to install such and old SDK? Installing the latest sdk using emsdk install latest will give you a much newer SDK which you won't need to build from source so it will install much faster with fewer dependencies.