[llvm-bugs] [Bug 45461] New: clang-11: error: clang frontend command failed with exit code 70 (use -v to see invocation)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 7 06:56:44 PDT 2020


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

            Bug ID: 45461
           Summary: clang-11: error: clang frontend command failed with
                    exit code 70 (use -v to see invocation)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: oeysymontt at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 23319
  --> https://bugs.llvm.org/attachment.cgi?id=23319&action=edit
Sources folder

When transpiling to JS with emscripten a fmu model code generated by
OpenModelica and including events in the model, clang fails. Here the stack
trace:

/home/olgierd/dev/emsdk/emscripten/master/emcc -g -O2
-I/usr/local/include/omc/fmil/FMI2/ -fdollars-in-identifiers
-DCMINPACK_NO_DLL=1   -c -o simulation/solver/nonlinearSolverHomotopy.o
simulation/solver/nonlinearSolverHomotopy.c
In file included from simulation/solver/nonlinearSolverHomotopy.c:46:
In file included from simulation/solver/../simulation_info_json.h:34:
In file included from simulation/solver/../../simulation_data.h:39:
In file included from simulation/solver/../../openmodelica.h:71:
In file included from simulation/solver/../../gc/../openmodelica_types.h:111:
simulation/solver/../../gc/omc_gc.h:217:28: warning: expression result unused
[-Wunused-value]
  GC_register_displacement(0);
                           ^
simulation/solver/../../gc/omc_gc.h:221:34: warning: expression result unused
[-Wunused-value]
  GC_set_force_unmap_on_gcollect(1);
                                 ^
inlinable function call in a function with debug info must have a !dbg location
  tail call void @free(i8* %556)
inlinable function call in a function with debug info must have a !dbg location
  tail call void @free(i8* %1347)
inlinable function call in a function with debug info must have a !dbg location
  tail call void @free(i8* %558)
inlinable function call in a function with debug info must have a !dbg location
  tail call void @free(i8* %1160)
fatal error: error in backend: Broken module found, compilation aborted!
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: /home/olgierd/dev/llvm/build/bin/clang -target
wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39
-D__EMSCRIPTEN_tiny__=11 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__
-Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/libcxx -Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/lib/libcxxabi/include
-Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/lib/libunwind/include
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/compat
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/include
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/libc
-Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/lib/libc/musl/arch/emscripten
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/local/include
-Xclang -isystem/home/olgierd/.emscripten_cache/wasm/include -g -O2
-I/usr/local/include/omc/fmil/FMI2/ -fdollars-in-identifiers
-DCMINPACK_NO_DLL=1 -c -DEMSCRIPTEN -fignore-exceptions
simulation/solver/nonlinearSolverHomotopy.c -Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/SDL -c -o
simulation/solver/nonlinearSolverHomotopy.o -mllvm
-combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm
-disable-lsr 
1.      <eof> parser at end of file
2.      Code generation
 #0 0x0000559418ce0e6b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/Unix/Signals.inc:564:22
 #1 0x0000559418ce0f02 PrintStackTraceSignalHandler(void*)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/Unix/Signals.inc:625:1
 #2 0x0000559418cdec4b llvm::sys::RunSignalHandlers()
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/Signals.cpp:68:20
 #3 0x0000559418ce0671 llvm::sys::CleanupOnSignal(unsigned long)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/Unix/Signals.inc:361:31
 #4 0x0000559418c28606 (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/CrashRecoveryContext.cpp:77:5
 #5 0x0000559418c28d70 llvm::CrashRecoveryContext::HandleExit(int)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/CrashRecoveryContext.cpp:436:3
 #6 0x0000559418cda6f6 llvm::sys::Process::Exit(int)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/Process.cpp:96:9
 #7 0x00005594173c11f8 ensureStackAddressSpace()
/home/olgierd/dev/llvm/llvm/clang/tools/driver/cc1_main.cpp:132:39
 #8 0x0000559418c304af llvm::report_fatal_error(llvm::Twine const&, bool)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/ErrorHandling.cpp:108:36
 #9 0x0000559418c30345
llvm::report_fatal_error(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/ErrorHandling.cpp:86:77
#10 0x00005594184b6f0d (anonymous
namespace)::VerifierLegacyPass::doFinalization(llvm::Module&)
/home/olgierd/dev/llvm/llvm/llvm/lib/IR/Verifier.cpp:5252:12
#11 0x00005594183e9d5d llvm::FPPassManager::doFinalization(llvm::Module&)
/home/olgierd/dev/llvm/llvm/llvm/lib/IR/LegacyPassManager.cpp:1536:13
#12 0x00005594183ea341 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/olgierd/dev/llvm/llvm/llvm/lib/IR/LegacyPassManager.cpp:1612:13
#13 0x00005594183ea8f4 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/olgierd/dev/llvm/llvm/llvm/lib/IR/LegacyPassManager.cpp:1695:13
#14 0x00005594183eab05 llvm::legacy::PassManager::run(llvm::Module&)
/home/olgierd/dev/llvm/llvm/llvm/lib/IR/LegacyPassManager.cpp:1727:1
#15 0x000055941903d7b2 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/home/olgierd/dev/llvm/llvm/clang/lib/CodeGen/BackendUtil.cpp:938:51
#16 0x0000559419042378 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/home/olgierd/dev/llvm/llvm/clang/lib/CodeGen/BackendUtil.cpp:1626:27
#17 0x000055941a1bd8c2
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/olgierd/dev/llvm/llvm/clang/lib/CodeGen/CodeGenAction.cpp:335:24
#18 0x000055941b8f888f clang::ParseAST(clang::Sema&, bool, bool)
/home/olgierd/dev/llvm/llvm/clang/lib/Parse/ParseAST.cpp:178:14
#19 0x00005594198927d1 clang::ASTFrontendAction::ExecuteAction()
/home/olgierd/dev/llvm/llvm/clang/lib/Frontend/FrontendAction.cpp:1047:11
#20 0x000055941a1bab65 clang::CodeGenAction::ExecuteAction()
/home/olgierd/dev/llvm/llvm/clang/lib/CodeGen/CodeGenAction.cpp:1180:1
#21 0x0000559419892128 clang::FrontendAction::Execute()
/home/olgierd/dev/llvm/llvm/clang/lib/Frontend/FrontendAction.cpp:944:38
#22 0x00005594198243ca
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/olgierd/dev/llvm/llvm/clang/lib/Frontend/CompilerInstance.cpp:973:42
#23 0x0000559419a0d3a4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/olgierd/dev/llvm/llvm/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:282:38
#24 0x00005594173c1a1a cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/olgierd/dev/llvm/llvm/clang/tools/driver/cc1_main.cpp:240:40
#25 0x00005594173b65b3 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
/home/olgierd/dev/llvm/llvm/clang/tools/driver/driver.cpp:330:20
#26 0x0000559419720bc3
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()::operator()() const
/home/olgierd/dev/llvm/llvm/clang/lib/Driver/Job.cpp:417:32
#27 0x000055941972145a void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
/home/olgierd/dev/llvm/llvm/llvm/include/llvm/ADT/STLExtras.h:109:40
#28 0x0000559418c29262 llvm::function_ref<void ()>::operator()() const
/home/olgierd/dev/llvm/llvm/llvm/include/llvm/ADT/STLExtras.h:126:62
#29 0x0000559418c28d0a
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
/home/olgierd/dev/llvm/llvm/llvm/lib/Support/CrashRecoveryContext.cpp:419:10
#30 0x0000559419720deb
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
/home/olgierd/dev/llvm/llvm/clang/lib/Driver/Job.cpp:417:7
#31 0x00005594196d4eb1
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
/home/olgierd/dev/llvm/llvm/clang/lib/Driver/Compilation.cpp:195:22
#32 0x00005594196d5214
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
/home/olgierd/dev/llvm/llvm/clang/lib/Driver/Compilation.cpp:246:53
#33 0x00005594196e4c56
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
/home/olgierd/dev/llvm/llvm/clang/lib/Driver/Driver.cpp:1483:28
#34 0x00005594173b7587 main
/home/olgierd/dev/llvm/llvm/clang/tools/driver/driver.cpp:502:39
#35 0x00007f6d57de11e3 __libc_start_main
/build/glibc-t7JzpG/glibc-2.30/csu/../csu/libc-start.c:342:3
#36 0x00005594173b4c4e _start
(/home/olgierd/dev/llvm/build/bin/clang+0x23c7c4e)
clang-11: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 11.0.0 (https://github.com/llvm/llvm-project
7d572ef2dd9bf68d56c0fa3152c2dea2f778f147)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/olgierd/dev/llvm/build/bin
clang-11: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/nonlinearSolverHomotopy-3bd444.c
clang-11: note: diagnostic msg: /tmp/nonlinearSolverHomotopy-3bd444.sh
clang-11: note: diagnostic msg: 

********************
emcc: error: '/home/olgierd/dev/llvm/build/bin/clang -target
wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39
-D__EMSCRIPTEN_tiny__=11 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__
-Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/libcxx -Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/lib/libcxxabi/include
-Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/lib/libunwind/include
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/compat
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/include
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/libc
-Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/lib/libc/musl/arch/emscripten
-Xclang -isystem/home/olgierd/dev/emsdk/emscripten/master/system/local/include
-Xclang -isystem/home/olgierd/.emscripten_cache/wasm/include -g -O2
-I/usr/local/include/omc/fmil/FMI2/ -fdollars-in-identifiers
-DCMINPACK_NO_DLL=1 -c -DEMSCRIPTEN -fignore-exceptions
simulation/solver/nonlinearSolverHomotopy.c -Xclang
-isystem/home/olgierd/dev/emsdk/emscripten/master/system/include/SDL -c -o
simulation/solver/nonlinearSolverHomotopy.o -mllvm
-combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm
-disable-lsr' failed (70)
make: *** [<builtin>: simulation/solver/nonlinearSolverHomotopy.o] Error 1


clang was compiled by source yesterday, same as emscripten:
clang --version
clang version 11.0.0 (https://github.com/llvm/llvm-project
7d572ef2dd9bf68d56c0fa3152c2dea2f778f147)
Target: x86_64-unknown-linux-gnu
Thread model: posix

emcc --version
emcc (Emscripten gcc/clang-like replacement) 1.39.11
(6c55301b4b03e836ae1f468547ac42130fe0dc1c)

Command line:
emconfigure ./configure
emmake make

I've tried several LLVM and emscripten versions, I've tried also with several
variables compiling LLVM but I get this same error every time.

If I compile the code in native C with ./configure and make, it compiles
successfully.

Thanks!

-- 
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/20200407/3cefea9e/attachment-0001.html>


More information about the llvm-bugs mailing list