[llvm-bugs] [Bug 51605] New: Failure to compile protobuf-lite with emscripten toolchain v2.0.28

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 24 10:11:56 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51605

            Bug ID: 51605
           Summary: Failure to compile protobuf-lite with emscripten
                    toolchain v2.0.28
           Product: clang
           Version: trunk
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: shanumante at snap.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Emscripten SDK :
https://github.com/emscripten-core/emsdk/commit/793557c61579ed51c5e8889e00d6ff8cfe944a1d
(v2.0.28)

Protobuf version : https://github.com/protocolbuffers/protobuf/tree/v3.12.4

OS: MacOS 11.5.2

Additional notes : The failure only happens when trying to build with -msimd128
flag. Failing file : src/google/protobuf/extension_set.cc

There is a message asking me to attach logs from
~/Library/Logs/DiagnosticReports/ but nothing is being generated in that
directory.

Trace: 

[27/29] Building CXX object
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o
FAILED:
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o
/usr/local/bin/ccache
/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/nlo-emscripten-installer/2.0.28/_/_/package/cb79a88d5f36e1d97eaa4399d6f47191be55e12f/emsdk/upstream/emscripten/em++
 -DHAVE_PTHREAD -Ipb-lite-source-headers/src -s DISABLE_EXCEPTION_CATCHING=1 -s
USE_PTHREADS=0  --bind -msimd128 -DNLO_BUILD -fcolor-diagnostics -O3 -DNDEBUG  
-fno-exceptions -std=gnu++17 -MD -MT
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o
-MF
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o.d
-o
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o
-c
/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/protobuf-lite/3.12.4-e37683ac71923b4f40adad16f17e31f04b066897/_/_/source/protobuf/src/google/protobuf/extension_set.cc
fatal error: error in backend: Cannot select: t148: v16i8 = BUILD_VECTOR
Constant:i32<255>, Constant:i32<255>, Constant:i32<255>, Constant:i32<255>,
Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>,
Constant:i32<0>, Constant:i32<0>, Constant:i32<0>, Constant:i32<0>
  t71: i32 = Constant<255>
  t71: i32 = Constant<255>
  t71: i32 = Constant<255>
  t71: i32 = Constant<255>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
  t117: i32 = Constant<0>
In function: _ZNK6google8protobuf8internal12ExtensionSet13NumExtensionsEv
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments:
/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/nlo-emscripten-installer/2.0.28/_/_/package/cb79a88d5f36e1d97eaa4399d6f47191be55e12f/emsdk/upstream/bin/clang++
-target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm
-combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm
-disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0
-D__EMSCRIPTEN_tiny__=28 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__
-Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL
--sysroot=/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/nlo-emscripten-installer/2.0.28/_/_/package/cb79a88d5f36e1d97eaa4399d6f47191be55e12f/emsdk/upstream/emscripten/cache/sysroot
-Xclang -iwithsysroot/include/compat -msimd128 -fcolor-diagnostics -O3
-fno-exceptions -std=gnu++17 -DHAVE_PTHREAD -Ipb-lite-source-headers/src
-DNLO_BUILD -DNDEBUG -c
/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/protobuf-lite/3.12.4-e37683ac71923b4f40adad16f17e31f04b066897/_/_/source/protobuf/src/google/protobuf/extension_set.cc
-o
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/protobuf-lite/3.12.4-e37683ac71923b4f40adad16f17e31f04b066897/_/_/source/protobuf/src/google/protobuf/extension_set.cc'.
4.      Running pass 'WebAssembly Instruction Selection' on function
'@_ZNK6google8protobuf8internal12ExtensionSet13NumExtensionsEv'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVM.dylib      0x0000000103114cba
llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 42
1  libLLVM.dylib      0x0000000103113a28 llvm::sys::RunSignalHandlers() + 248
2  libLLVM.dylib      0x00000001031140f0 llvm::sys::CleanupOnSignal(unsigned
long) + 208
3  libLLVM.dylib      0x000000010302f4da (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 106
4  libLLVM.dylib      0x000000010302f433
llvm::CrashRecoveryContext::HandleExit(int) + 19
5  libLLVM.dylib      0x00000001031104cc llvm::sys::Process::Exit(int, bool) +
44
6  clang++            0x0000000102f6d526 LLVMErrorHandler(void*,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, bool) + 86
7  libLLVM.dylib      0x00000001030415bd llvm::report_fatal_error(llvm::Twine
const&, bool) + 269
8  libLLVM.dylib      0x000000010304168b
llvm::report_fatal_error(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) + 27
9  libLLVM.dylib      0x0000000103abe0e8
llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) + 1000
10 libLLVM.dylib      0x0000000103abcbcc
llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*,
unsigned int) + 17788
11 libLLVM.dylib      0x0000000105340aa1 (anonymous
namespace)::WebAssemblyDAGToDAGISel::Select(llvm::SDNode*) + 1585
12 libLLVM.dylib      0x0000000103ab3ade
llvm::SelectionDAGISel::DoInstructionSelection() + 1486
13 libLLVM.dylib      0x0000000103ab287b
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 5803
14 libLLVM.dylib      0x0000000103ab082b
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 8123
15 libLLVM.dylib      0x0000000103aad45a
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 2474
16 libLLVM.dylib      0x0000000103562a6f
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 367
17 libLLVM.dylib      0x000000010329a287
llvm::FPPassManager::runOnFunction(llvm::Function&) + 919
18 libLLVM.dylib      0x00000001032a2bd1
llvm::FPPassManager::runOnModule(llvm::Module&) + 65
19 libLLVM.dylib      0x000000010329ae40
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 2416
20 libclang-cpp.dylib 0x000000010962b0cb (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 12091
21 libclang-cpp.dylib 0x0000000109625a6f
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions
const&, clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::StringRef, llvm::Module*,
clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 4895
22 libclang-cpp.dylib 0x00000001099839d6
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1158
23 libclang-cpp.dylib 0x00000001085aa664 clang::ParseAST(clang::Sema&, bool,
bool) + 564
24 libclang-cpp.dylib 0x0000000109f8e893 clang::FrontendAction::Execute() + 99
25 libclang-cpp.dylib 0x0000000109f052ff
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 847
26 libclang-cpp.dylib 0x000000010a013d9f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1455
27 clang++            0x0000000102f6d206 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2054
28 clang++            0x0000000102f6abbb
ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 283
29 libclang-cpp.dylib 0x0000000109bc9aa7 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
30 libLLVM.dylib      0x000000010302f3ec
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 236
31 libclang-cpp.dylib 0x0000000109bc9511
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*, bool*) const + 305
32 libclang-cpp.dylib 0x0000000109b942a4
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const + 756
33 libclang-cpp.dylib 0x0000000109b946cd
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&)
const + 125
34 libclang-cpp.dylib 0x0000000109bada4b
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) +
395
35 clang++            0x0000000102f6a41a main + 10378
36 libdyld.dylib      0x00007fff204f8f3d start + 1
37 libdyld.dylib      0x0000000000000025 start + 18446603339974078697
clang-13: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 14.0.0 (https://github.com/llvm/llvm-project
f3671a688db2625ef3736ff3603ef7a9fb78610f)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir:
/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/nlo-emscripten-installer/2.0.28/_/_/package/cb79a88d5f36e1d97eaa4399d6f47191be55e12f/emsdk/upstream/bin
clang-13: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg:
/var/folders/70/j6dv6jq15ml8729ps84cctl00000gp/T/extension_set-f1f180.cpp
clang-13: note: diagnostic msg:
/var/folders/70/j6dv6jq15ml8729ps84cctl00000gp/T/extension_set-f1f180.sh
clang-13: note: diagnostic msg: Crash backtrace is located in
clang-13: note: diagnostic msg:
/Users/sumant.hanumante/Library/Logs/DiagnosticReports/clang-13_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang-13: note: diagnostic msg: (choose the .crash file that corresponds to
your crash)
clang-13: note: diagnostic msg:

********************
em++: error:
'/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/nlo-emscripten-installer/2.0.28/_/_/package/cb79a88d5f36e1d97eaa4399d6f47191be55e12f/emsdk/upstream/bin/clang++
-target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm
-combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm
-disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0
-D__EMSCRIPTEN_tiny__=28 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__
-Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL
--sysroot=/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/nlo-emscripten-installer/2.0.28/_/_/package/cb79a88d5f36e1d97eaa4399d6f47191be55e12f/emsdk/upstream/emscripten/cache/sysroot
-Xclang -iwithsysroot/include/compat -msimd128 -fcolor-diagnostics -O3
-fno-exceptions -std=gnu++17 -DHAVE_PTHREAD -Ipb-lite-source-headers/src
-DNLO_BUILD -DNDEBUG -c
/Users/sumant.hanumante/Snapchat/Dev/_nlo_/cache/protobuf-lite/3.12.4-e37683ac71923b4f40adad16f17e31f04b066897/_/_/source/protobuf/src/google/protobuf/extension_set.cc
-o
CMakeFiles/libprotobuf-lite.dir/protobuf/src/google/protobuf/extension_set.cc.o'
failed (returned 70)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210824/77811dfd/attachment-0001.html>


More information about the llvm-bugs mailing list