MCUSec / uEmu

A Universal MCU Firmware Emulator for Dynamic Analysis without Any Hardware Dependence.
Other
127 stars 22 forks source link

vagrant up failed with clang #25

Open DerZc opened 1 month ago

DerZc commented 1 month ago

I meet an error when run vagrant up, does anyone know how to solve this?

default: Stack dump:
    default: 0. Program arguments: /home/vagrant/uemu/build/opt/bin/clang++ -DHAVE_RPC_XDR_H=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/vagrant/uemu/build/llvm-release/projects/compiler-rt/lib/sanitizer_common -I/home/vagrant/uemu/build/llvm-10.0.0.src/projects/compiler-rt/lib/sanitizer_common -I/home/vagrant/uemu/build/llvm-release/include -I/home/vagrant/uemu/build/llvm-10.0.0.src/include -I/home/vagrant/uemu/build/llvm-10.0.0.src/projects/compiler-rt/lib/sanitizer_common/.. -march=native -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -ffunction-sections -fdata-sections -Wall -std=c++14 -Wno-unused-parameter -O3 -DNDEBUG -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -std=c++14 -o CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_common.cpp.o -c /home/vagrant/uemu/build/llvm-10.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cpp
    default: 1. <eof> parser at end of file
    default: 2. Code generation
    default: 3. Running pass 'Function Pass Manager' on module '/home/vagrant/uemu/build/llvm-10.0.0.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common.cpp'.
    default: 4. Running pass 'Machine Block Frequency Analysis' on function '@_ZN11__sanitizer17UpdateProcessNameEv'
    default: [ 18%] Building CXX object projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.i386.dir/sanitizer_deadlock_detector1.cpp.o
    default: [ 18%] Building CXX object projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.x86_64.dir/sanitizer_stacktrace_sparc.cpp.o
    default:  #0 0x0000000002048214 PrintStackTraceSignalHandler(void*) (/home/vagrant/uemu/build/opt/bin/clang+++0x2048214)
    default:  #1 0x0000000002045ffe llvm::sys::RunSignalHandlers() (/home/vagrant/uemu/build/opt/bin/clang+++0x2045ffe)
    default:  #2 0x00000000020474bd llvm::sys::CleanupOnSignal(unsigned long) (/home/vagrant/uemu/build/opt/bin/clang+++0x20474bd)
    default:  #3 0x0000000001fde5ca CrashRecoverySignalHandler(int) (/home/vagrant/uemu/build/opt/bin/clang+++0x1fde5ca)
    default:  #4 0x00007f3d58382420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
    default:  #5 0x00000000015768f4 llvm::BlockFrequencyInfoImplBase::addToDist(llvm::BlockFrequencyInfoImplBase::Distribution&, llvm::BlockFrequencyInfoImplBase::LoopData const*, llvm::BlockFrequencyInfoImplBase::BlockNode const&, llvm::BlockFrequencyInfoImplBase::BlockNode const&, unsigned long) (/home/vagrant/uemu/build/opt/bin/clang+++0x15768f4)
    default:  #6 0x00000000017db4e5 llvm::BlockFrequencyInfoImpl<llvm::MachineBasicBlock>::propagateMassToSuccessors(llvm::BlockFrequencyInfoImplBase::LoopData*, llvm::BlockFrequencyInfoImplBase::BlockNode const&) (/home/vagrant/uemu/build/opt/bin/clang+++0x17db4e5)
    default:  #7 0x00000000017d8956 llvm::BlockFrequencyInfoImpl<llvm::MachineBasicBlock>::calculate(llvm::MachineFunction const&, llvm::MachineBranchProbabilityInfo const&, llvm::MachineLoopInfo const&) (/home/vagrant/uemu/build/opt/bin/clang+++0x17d8956)
    default:  #8 0x00000000017d84ae llvm::MachineBlockFrequencyInfo::calculate(llvm::MachineFunction const&, llvm::MachineBranchProbabilityInfo const&, llvm::MachineLoopInfo const&) (/home/vagrant/uemu/build/opt/bin/clang+++0x17d84ae)
    default:  #9 0x00000000017d8b85 llvm::MachineBlockFrequencyInfo::runOnMachineFunction(llvm::MachineFunction&) (/home/vagrant/uemu/build/opt/bin/clang+++0x17d8b85)
    default: #10 0x00000000018140c8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/vagrant/uemu/build/opt/bin/clang+++0x18140c8)
    default: #11 0x0000000001aeb6f6 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/vagrant/uemu/build/opt/bin/clang+++0x1aeb6f6)
    default: #12 0x0000000001aeb973 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/vagrant/uemu/build/opt/bin/clang+++0x1aeb973)
    default: #13 0x0000000001aebfc8 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/vagrant/uemu/build/opt/bin/clang+++0x1aebfc8)
    default: #14 0x00000000021d5b3e 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/vagrant/uemu/build/opt/bin/clang+++0x21d5b3e)
    default: #15 0x0000000002c0d83c clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/vagrant/uemu/build/opt/bin/clang+++0x2c0d83c)
    default: #16 0x00000000035aa8d3 clang::ParseAST(clang::Sema&, bool, bool) (/home/vagrant/uemu/build/opt/bin/clang+++0x35aa8d3)
    default: #17 0x00000000026e7707 clang::FrontendAction::Execute() (/home/vagrant/uemu/build/opt/bin/clang+++0x26e7707)
    default: #18 0x0000000002685731 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/vagrant/uemu/build/opt/bin/clang+++0x2685731)
    default: #19 0x0000000002781d4c clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/vagrant/uemu/build/opt/bin/clang+++0x2781d4c)
    default: #20 0x0000000000934e19 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/vagrant/uemu/build/opt/bin/clang+++0x934e19)
    default: #21 0x0000000000933051 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/home/vagrant/uemu/build/opt/bin/clang+++0x933051)
    default: #22 0x000000000255d822 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::$_1>(long) (/home/vagrant/uemu/build/opt/bin/clang+++0x255d822)
    default: #23 0x0000000001fde3e7 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/vagrant/uemu/build/opt/bin/clang+++0x1fde3e7)
    default: #24 0x000000000255ce9f 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/vagrant/uemu/build/opt/bin/clang+++0x255ce9f)
    default: #25 0x000000000252f4ee clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/home/vagrant/uemu/build/opt/bin/clang+++0x252f4ee)
    default: #26 0x000000000252f69a clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/home/vagrant/uemu/build/opt/bin/clang+++0x252f69a)
    default: #27 0x0000000002545538 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/home/vagrant/uemu/build/opt/bin/clang+++0x2545538)
    default: #28 0x0000000000932ab8 main (/home/vagrant/uemu/build/opt/bin/clang+++0x932ab8)
    default: #29 0x00007f3d57e14083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
    default: #30 0x000000000093016a _start (/home/vagrant/uemu/build/opt/bin/clang+++0x93016a)
    default: clang-10: error: clang frontend command failed due to signal (use -v to see invocation)
    default: clang version 10.0.0
    default: Target: i386-unknown-linux-gnu
    default: Thread model: posix
    default: InstalledDir: /home/vagrant/uemu/build/opt/bin
    default: clang-10: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
    default: [ 18%] Building CXX object projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizerNoHooks.x86_64.dir/sanitizer_symbolizer.cpp.o
    default: clang-10: note: diagnostic msg:
    default: ********************
    default:
    default: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    default: Preprocessed source(s) and associated run script(s) are located at:
    default: clang-10: note: diagnostic msg: /tmp/sanitizer_common-4ecf09.cpp
    default: clang-10: note: diagnostic msg: /tmp/sanitizer_common-4ecf09.sh
    default: clang-10: note: diagnostic msg:
    default:
    default: ********************
    default: make[3]: Leaving directory '/home/vagrant/uemu/build/llvm-release'
    default: make[3]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/build.make:76: projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_common.cpp.o] Error 254
    default: make[2]: *** [CMakeFiles/Makefile2:17487: projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/all] Error 2
    default: make[2]: *** Waiting for unfinished jobs....
weizhou-chaojixx commented 2 days ago

Please check your Ubuntu version; currently, only up to 20.04 is supported.