emscripten-core / emsdk

Emscripten SDK
http://emscripten.org
Other
2.97k stars 676 forks source link

emsdk install sdk-upstream-main-64bit happened c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ #854

Open Alphabaijinde opened 3 years ago

Alphabaijinde commented 3 years ago

Installing tool 'binaryen-main-64bit'.. Cloning from https://github.com/WebAssembly/binaryen.git... Cloning into '/home/baijinde/study/3rdparty/emsdk/binaryen/main'... remote: Enumerating objects: 86039, done. remote: Counting objects: 100% (4074/4074), done. remote: Compressing objects: 100% (1429/1429), done. remote: Total 86039 (delta 3130), reused 3439 (delta 2640), pack-reused 81965 Receiving objects: 100% (86039/86039), 115.77 MiB | 309.00 KiB/s, done. Resolving deltas: 100% (73011/73011), done. Checking connectivity... done. Fetching latest changes to the branch/tag 'main' for '/home/baijinde/study/3rdparty/emsdk/binaryen/main'... refs/heads/main Already up-to-date. Successfully updated and checked out branch/tag 'main' on repository '/home/baijinde/study/3rdparty/emsdk/binaryen/main' Current repository version: "Thu, 1 Jul 2021 13:37:36 -0700 45703971dffbbb1e4bbf7b026ca01cabf18b989a" Running CMake: ['cmake', '-G', 'Unix Makefiles', '-DCMAKE_BUILD_TYPE=Release', '-DPYTHON_EXECUTABLE=/usr/local/bin/python3', '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11', '/home/baijinde/study/3rdparty/emsdk/binaryen/main'] -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building with -DBUILD_LLVM_DWARF -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE
-- Building with -std=c++14 -- Building with -Wall -- Building with -Werror -- Building with -Wextra -- Building with -Wno-unused-parameter -- Building with -fno-omit-frame-pointer -- Building with -fno-rtti -- Building with -Wno-implicit-int-float-conversion -- Building with -Wno-unknown-warning-option -- Building with -Wswitch -- Building with -Wimplicit-fallthrough -- Building with -Wnon-virtual-dtor -- Building with -fPIC -- Building with -O2 -- Building with -UNDEBUG -- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.5.2", minimum required is "3.5") -- Building libbinaryen as shared library. -- Configuring done -- Generating done -- Build files have been written to: /home/baijinde/study/3rdparty/emsdk/binaryen/main_64bit_binaryen Performing a parallel build with 3 cores. Running build: ['cmake', '--build', '.', '--', '-j3'] Scanning dependencies of target asmjs Scanning dependencies of target ir Scanning dependencies of target llvm_dwarf [ 1%] Building CXX object src/ir/CMakeFiles/ir.dir/ExpressionAnalyzer.cpp.o [ 1%] Building CXX object src/asmjs/CMakeFiles/asmjs.dir/asm_v_wasm.cpp.o c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ src/ir/CMakeFiles/ir.dir/build.make:81: recipe for target 'src/ir/CMakeFiles/ir.dir/ExpressionAnalyzer.cpp.o' failed make[2]: [src/ir/CMakeFiles/ir.dir/ExpressionAnalyzer.cpp.o] Error 1 CMakeFiles/Makefile2:624: recipe for target 'src/ir/CMakeFiles/ir.dir/all' failed make[1]: [src/ir/CMakeFiles/ir.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ src/asmjs/CMakeFiles/asmjs.dir/build.make:81: recipe for target 'src/asmjs/CMakeFiles/asmjs.dir/asm_v_wasm.cpp.o' failed make[2]: [src/asmjs/CMakeFiles/asmjs.dir/asm_v_wasm.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... [ 2%] Building CXX object src/asmjs/CMakeFiles/asmjs.dir/asmangle.cpp.o c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ src/asmjs/CMakeFiles/asmjs.dir/build.make:94: recipe for target 'src/asmjs/CMakeFiles/asmjs.dir/asmangle.cpp.o' failed make[2]: [src/asmjs/CMakeFiles/asmjs.dir/asmangle.cpp.o] Error 1 CMakeFiles/Makefile2:651: recipe for target 'src/asmjs/CMakeFiles/asmjs.dir/all' failed make[1]: [src/asmjs/CMakeFiles/asmjs.dir/all] Error 2 [ 3%] Building CXX object third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/Binary.cpp.o [ 3%] Building CXX object third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/ConvertUTF.cpp.o [ 3%] Building CXX object third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/DataExtractor.cpp.o c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/build.make:81: recipe for target 'third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/Binary.cpp.o' failed make[2]: [third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/Binary.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/build.make:94: recipe for target 'third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/ConvertUTF.cpp.o' failed make[2]: [third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/ConvertUTF.cpp.o] Error 1 c++: error: unrecognized command line option ‘-Wimplicit-fallthrough’ third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/build.make:107: recipe for target 'third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/DataExtractor.cpp.o' failed make[2]: [third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/DataExtractor.cpp.o] Error 1 CMakeFiles/Makefile2:813: recipe for target 'third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/all' failed make[1]: [third_party/llvm-project/CMakeFiles/llvm_dwarf.dir/all] Error 2 Makefile:148: recipe for target 'all' failed make: *** [all] Error 2 Build failed due to exception! Working directory: /home/baijinde/study/3rdparty/emsdk/binaryen/main_64bit_binaryen Command '['cmake', '--build', '.', '--', '-j3']' returned non-zero exit status 2 error: installation failed!

sbc100 commented 3 years ago

Looks like perhaps your system compiler (gcc 5.4.0 found in /usr/bin/c++) is maybe too old. What distro are you using? Can you upgrade your system compiler perhaps?

I'm not sure what the minimum compiler requirement are for building binaryen but I guess 5.4.0 is too old?

Alphabaijinde commented 3 years ago

Looks like perhaps your system compiler (gcc 5.4.0 found in /usr/bin/c++) is maybe too old. What distro are you using? Can you upgrade your system compiler perhaps?

I'm not sure what the minimum compiler requirement are for building binaryen but I guess 5.4.0 is too old?

ok! thank u! I will upgrade first