Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to compile gpac with clang frontend error #148

Open
17ssDP opened this issue Nov 2, 2023 · 1 comment
Open

Fail to compile gpac with clang frontend error #148

17ssDP opened this issue Nov 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@17ssDP
Copy link

17ssDP commented Nov 2, 2023

I want to compile gpac with symcc in the docker container, however, I get the following error:

Stack dump:
0.	Program arguments: /usr/lib/llvm-10/bin/clang -Xclang -load -Xclang /symcc_build/libSymbolize.so -I/home/ubuntu/gpac/include -O3 -Wall -fno-strict-aliasing -Wno-pointer-sign -fPIC -DPIC -msse2 -DNDEBUG -std=gnu99 -Wno-deprecated -Wno-deprecated-declarations -Wno-int-in-bool-context -DGPAC_HAVE_CONFIG_H -I/home/ubuntu/gpac -fvisibility=hidden -c -o utils/math.o utils/math.c -L/symcc_build/SymRuntime-prefix/src/SymRuntime-build -lSymRuntime -Wl,-rpath,/symcc_build/SymRuntime-prefix/src/SymRuntime-build -Qunused-arguments
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Function Pass Manager' on module 'utils/math.c'.
4.	Running pass 'Symbolization Pass' on function '@gf_vec_scale_p'
 #0 0x00007ffff17e74ff llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0x9814ff)
 #1 0x00007ffff17e57b0 llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0x97f7b0)
 #2 0x00007ffff17e6c4d llvm::sys::CleanupOnSignal(unsigned long) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0x980c4d)
 #3 0x00007ffff173ce60 (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0x8d6e60)
 #4 0x00007ffff7fb6420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #5 0x00007ffff193097a llvm::Value::setNameImpl(llvm::Twine const&) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0xaca97a)
 #6 0x00007ffff1930dc9 llvm::Value::setName(llvm::Twine const&) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0xacadc9)
 #7 0x00007ffff084cc66 llvm::ExtractValueInst* llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>::Insert<llvm::ExtractValueInst>(llvm::ExtractValueInst*, llvm::Twine const&) const /usr/include/llvm-10/llvm/IR/IRBuilder.h:918:5
 #8 0x00007ffff084cc66 llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>::CreateExtractValue(llvm::Value*, llvm::ArrayRef<unsigned int>, llvm::Twine const&) /usr/include/llvm-10/llvm/IR/IRBuilder.h:2567:60
 #9 0x00007ffff084cc66 Symbolizer::createValueExpression(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&) (.localalias) /symcc_source/compiler/Symbolizer.cpp:1030:52
#10 0x00007ffff084c612 Symbolizer::createValueExpression(llvm::Value*, llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>&) (.localalias) /symcc_source/compiler/Symbolizer.cpp:1036:76
#11 0x00007ffff084d5c3 Symbolizer::shortCircuitExpressionUses() /symcc_source/compiler/Symbolizer.cpp:147:32
#12 0x00007ffff085a584 std::vector<Symbolizer::SymbolicComputation, std::allocator<Symbolizer::SymbolicComputation> >::~vector() /usr/include/c++/9/bits/stl_vector.h:677:15
#13 0x00007ffff085a584 Symbolizer::~Symbolizer() /symcc_source/compiler/Symbolizer.h:27:7
#14 0x00007ffff085a584 (anonymous namespace)::instrumentFunction(llvm::Function&) /symcc_source/compiler/Pass.cpp:190:39
#15 0x00007ffff18ecd76 llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0xa86d76)
#16 0x00007ffff18ecff3 llvm::FPPassManager::runOnModule(llvm::Module&) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0xa86ff3)
#17 0x00007ffff18ed4a0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0xa874a0)
#18 0x00007ffff68e23a9 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> >) (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x13e83a9)
#19 0x00007ffff6b61e1c (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x1667e1c)
#20 0x00007ffff5d4fc13 clang::ParseAST(clang::Sema&, bool, bool) (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x855c13)
#21 0x00007ffff71c5e58 clang::FrontendAction::Execute() (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x1ccbe58)
#22 0x00007ffff717e8a1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x1c848a1)
#23 0x00007ffff7229daf clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x1d2fdaf)
#24 0x000000000041229d cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-10/bin/clang+0x41229d)
#25 0x00000000004105b1 (/usr/lib/llvm-10/bin/clang+0x4105b1)
#26 0x00007ffff6ecf8f2 (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x19d58f2)
#27 0x00007ffff173cc67 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/lib/x86_64-linux-gnu/libLLVM-10.so.1+0x8d6c67)
#28 0x00007ffff6ecee2f clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x19d4e2f)
#29 0x00007ffff6ea752f clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x19ad52f)
#30 0x00007ffff6ea76da clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x19ad6da)
#31 0x00007ffff6eba93c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/lib/x86_64-linux-gnu/libclang-cpp.so.10+0x19c093c)
#32 0x000000000041002f main (/usr/lib/llvm-10/bin/clang+0x41002f)
#33 0x00007ffff094a083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#34 0x000000000040d7ce _start (/usr/lib/llvm-10/bin/clang+0x40d7ce)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-10/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************

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

********************
make[1]: *** [../config.mak:177: utils/math.o] Error 254
make[1]: Leaving directory '/home/ubuntu/gpac/src'
make: *** [Makefile:13: all] Error 2
@sebastianpoeplau
Copy link
Collaborator

Looks like a bug in the instrumentation pass 🤔

@sebastianpoeplau sebastianpoeplau added the bug Something isn't working label Jan 29, 2024
@sebastianpoeplau sebastianpoeplau self-assigned this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants