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

Compile error #2

Closed
id4liubin opened this issue May 24, 2024 · 1 comment
Closed

Compile error #2

id4liubin opened this issue May 24, 2024 · 1 comment

Comments

@id4liubin
Copy link

hi guys,

I meet such compile errors when I try this project, please give me some help! Thanks!

compile log:
| LLVM | running "/home/binliu/tools/llvm-vortex/bin/clang -march=rv32imaf -mabi=ilp32f -v -O3 --sysroot=/home/binliu/tools/riscv-gnu-toolchain/riscv32-unknown-elf --gcc-toolchain=/home/binliu/tools/riscv-gnu-toolchain -Xclang -target-feature -Xclang +vortex -fno-rtti -fno-exceptions -nostartfiles -fdata-sections -ffunction-sections -I/home/binliu/skybox/kernel/include -DNDEBUG -DLLVM_VOTEX /home/binliu/.cache/pocl/kcache/GC/DNMPOCKDDNCBONENDONHGPCJPBCELLFJPKGOG/vecadd/0-0-0/parallel.bc -c -o /home/binliu/.cache/pocl/kcache/tempfile_8TnAvV.so.o"
clang version 16.0.6 (https://github.com/vortexgpgpu/llvm.git 5828d24a5b9270b7538854d28fa4cc14827da89c)
Target: riscv32-unknown-unknown-elf
Thread model: posix
InstalledDir: /home/binliu/tools/llvm-vortex/bin
Found candidate GCC installation: /home/binliu/tools/riscv-gnu-toolchain/lib/gcc/riscv32-unknown-elf/12.2.0
Selected GCC installation: /home/binliu/tools/riscv-gnu-toolchain/lib/gcc/riscv32-unknown-elf/12.2.0
clang-16: warning: argument unused during compilation: '-nostartfiles' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-I /home/binliu/skybox/kernel/include' [-Wunused-command-line-argument]
(in-process)
"/home/binliu/tools/llvm-vortex/bin/clang-16" -cc1 -triple riscv32-unknown-unknown-elf -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name parallel.bc -mrelocation-model static -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -nostdsysteminc -target-cpu generic-rv32 -target-feature +m -target-feature +a -target-feature +f -target-feature -e -target-feature -d -target-feature -c -target-feature -h -target-feature -zihintpause -target-feature -zfhmin -target-feature -zfh -target-feature -zfinx -target-feature -zdinx -target-feature -zhinxmin -target-feature -zhinx -target-feature -zba -target-feature -zbb -target-feature -zbc -target-feature -zbs -target-feature -zbkb -target-feature -zbkc -target-feature -zbkx -target-feature -zknd -target-feature -zkne -target-feature -zknh -target-feature -zksed -target-feature -zksh -target-feature -zkr -target-feature -zkn -target-feature -zks -target-feature -zkt -target-feature -zk -target-feature -zmmul -target-feature -v -target-feature -zvl32b -target-feature -zvl64b -target-feature -zvl128b -target-feature -zvl256b -target-feature -zvl512b -target-feature -zvl1024b -target-feature -zvl2048b -target-feature -zvl4096b -target-feature -zvl8192b -target-feature -zvl16384b -target-feature -zvl32768b -target-feature -zvl65536b -target-feature -zve32x -target-feature -zve32f -target-feature -zve64x -target-feature -zve64f -target-feature -zve64d -target-feature -zicbom -target-feature -zicboz -target-feature -zicbop -target-feature -svnapot -target-feature -svpbmt -target-feature -svinval -target-feature -xventanacondops -target-feature -xtheadvdot -target-feature -experimental-zihintntl -target-feature -experimental-zca -target-feature -experimental-zcd -target-feature -experimental-zcf -target-feature -experimental-zvfh -target-feature -experimental-zawrs -target-feature -experimental-ztso -target-feature +relax -target-feature -save-restore -target-abi ilp32f -msmall-data-limit 8 -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/home/binliu/skybox/tests/opencl/vecadd -resource-dir /home/binliu/tools/llvm-vortex/lib/clang/16 -O3 -fdebug-compilation-dir=/home/binliu/skybox/tests/opencl/vecadd -ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -target-feature +vortex -faddrsig -o /home/binliu/.cache/pocl/kcache/tempfile_8TnAvV.so.o -x ir /home/binliu/.cache/pocl/kcache/GC/DNMPOCKDDNCBONENDONHGPCJPBCELLFJPKGOG/vecadd/0-0-0/parallel.bc
clang -cc1 version 16.0.6 based upon LLVM 16.0.6 default target riscv32-unknown-elf
warning: overriding the module target triple with riscv32-unknown-unknown-elf [-Woverride-module]
fatal error: error in backend: -target-abi option != target-abi module flag
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/binliu/tools/llvm-vortex/bin/clang -march=rv32imaf -mabi=ilp32f -v -O3 --sysroot=/home/binliu/tools/riscv-gnu-toolchain/riscv32-unknown-elf --gcc-toolchain=/home/binliu/tools/riscv-gnu-toolchain -Xclang -target-feature -Xclang +vortex -fno-rtti -fno-exceptions -nostartfiles -fdata-sections -ffunction-sections -I/home/binliu/skybox/kernel/include -DNDEBUG -DLLVM_VOTEX /home/binliu/.cache/pocl/kcache/GC/DNMPOCKDDNCBONENDONHGPCJPBCELLFJPKGOG/vecadd/0-0-0/parallel.bc -c -o /home/binliu/.cache/pocl/kcache/tempfile_8TnAvV.so.o

  1. Optimizer
    #0 0x00007f5bbcdc946f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0x1c946f)
    Cannot build skybox. #1 0x00007f5bbcdc749c llvm::sys::CleanupOnSignal(unsigned long) (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0x1c749c)
    Compile error #2 0x00007f5bbccb6a87 llvm::CrashRecoveryContext::HandleExit(int) (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0xb6a87)
    compile hw/unit_test failed #3 0x00007f5bbcdbefa2 llvm::sys::Process::Exit(int, bool) (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0x1befa2)
    #4 0x0000629fbb5c986f (/home/binliu/tools/llvm-vortex/bin/clang+0x1586f)
    #5 0x00007f5bbccc91da llvm::report_fatal_error(llvm::Twine const&, bool) (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0xc91da)
    #6 0x00007f5bbccc936e (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0xc936e)
    #7 0x00007f5bc12ff017 llvm::RISCVTargetMachine::getSubtargetImpl(llvm::Function const&) const (/home/binliu/tools/llvm-vortex/lib/libLLVMRISCVCodeGen.so.16+0xff017)
    #8 0x00007f5bc12fe461 llvm::RISCVTargetMachine::getTargetTransformInfo(llvm::Function const&) const (/home/binliu/tools/llvm-vortex/lib/libLLVMRISCVCodeGen.so.16+0xfe461)
    #9 0x00007f5bc1028d0a std::_Function_handler<llvm::TargetTransformInfo (llvm::Function const&), llvm::TargetMachine::getTargetIRAnalysis() const::'lambda'(llvm::Function const&)>::_M_invoke(std::_Any_data const&, llvm::Function const&) TargetMachine.cpp:0:0
    #10 0x00007f5bbe42fc17 llvm::TargetIRAnalysis::run(llvm::Function const&, llvm::AnalysisManagerllvm::Function&) (/home/binliu/tools/llvm-vortex/lib/libLLVMAnalysis.so.16+0x42fc17)
    #11 0x00007f5bbcad4097 llvm::detail::AnalysisPassModel<llvm::Function, llvm::TargetIRAnalysis, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function::Invalidator>::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/home/binliu/tools/llvm-vortex/lib/libLLVMPasses.so.16+0x5f097)
    #12 0x00007f5bbdca5b29 llvm::AnalysisManagerllvm::Function::getResultImpl(llvm::AnalysisKey*, llvm::Function&) (/home/binliu/tools/llvm-vortex/lib/libLLVMCore.so.16+0x2a5b29)
    #13 0x00007f5bbed5ee4f llvm::SimplifyCFGPass::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/home/binliu/tools/llvm-vortex/lib/libLLVMScalarOpts.so.16+0x35ee4f)
    #14 0x00007f5bbcad6666 llvm::detail::PassModel<llvm::Function, llvm::SimplifyCFGPass, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function>::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/home/binliu/tools/llvm-vortex/lib/libLLVMPasses.so.16+0x61666)
    #15 0x00007f5bc06e074a llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManagerllvm::Function>, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function>::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/home/binliu/tools/llvm-vortex/lib/libclangCodeGen.so.16+0xe074a)
    #16 0x00007f5bbdc9fe8d llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/home/binliu/tools/llvm-vortex/lib/libLLVMCore.so.16+0x29fe8d)
    #17 0x00007f5bc06d9ee6 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/home/binliu/tools/llvm-vortex/lib/libclangCodeGen.so.16+0xd9ee6)
    #18 0x00007f5bbdca1e99 llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module>::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/home/binliu/tools/llvm-vortex/lib/libLLVMCore.so.16+0x2a1e99)
    #19 0x00007f5bc06ed454 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream>&, std::unique_ptr<llvm::ToolOutputFile, std::default_deletellvm::ToolOutputFile>&) BackendUtil.cpp:0:0
    #20 0x00007f5bc06f04c6 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream>) (/home/binliu/tools/llvm-vortex/lib/libclangCodeGen.so.16+0xf04c6)
    #21 0x00007f5bc0b62530 clang::CodeGenAction::ExecuteAction() (/home/binliu/tools/llvm-vortex/lib/libclangCodeGen.so.16+0x562530)
    #22 0x00007f5bbf73c851 clang::FrontendAction::Execute() (/home/binliu/tools/llvm-vortex/lib/libclangFrontend.so.16+0x13c851)
    #23 0x00007f5bbf6b7073 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/binliu/tools/llvm-vortex/lib/libclangFrontend.so.16+0xb7073)
    #24 0x00007f5bc174e06b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/binliu/tools/llvm-vortex/lib/libclangFrontendTool.so.16+0x506b)
    #25 0x0000629fbb5caaec cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/binliu/tools/llvm-vortex/bin/clang+0x16aec)
    #26 0x0000629fbb5c650c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
    #27 0x00007f5bbf2c15b9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optionalllvm::StringRef>, std::__cxx11::basic_string<char, std::char_traits, std::allocator>, bool) const::'lambda'()>(long) Job.cpp:0:0
    #28 0x00007f5bbccb6977 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/binliu/tools/llvm-vortex/lib/libLLVMSupport.so.16+0xb6977)
    #29 0x00007f5bbf2c17ec clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optionalllvm::StringRef>, std::__cxx11::basic_string<char, std::char_traits, std::allocator>, bool) const (.part.0) Job.cpp:0:0
    #30 0x00007f5bbf285e1c clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/binliu/tools/llvm-vortex/lib/libclangDriver.so.16+0x85e1c)
    #31 0x00007f5bbf28680d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/home/binliu/tools/llvm-vortex/lib/libclangDriver.so.16+0x8680d)
    #32 0x00007f5bbf2932dc clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/binliu/tools/llvm-vortex/lib/libclangDriver.so.16+0x932dc)
    #33 0x0000629fbb5c8da3 clang_main(int, char**) (/home/binliu/tools/llvm-vortex/bin/clang+0x14da3)
    #34 0x00007f5bbc429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
    #35 0x00007f5bbc429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
    #36 0x0000629fbb5c264e _start (/home/binliu/tools/llvm-vortex/bin/clang+0xe64e)
    clang-16: error: clang frontend command failed with exit code 70 (use -v to see invocation)
    clang version 16.0.6 (https://github.com/vortexgpgpu/llvm.git 5828d24a5b9270b7538854d28fa4cc14827da89c)
    Target: riscv32-unknown-unknown-elf
    Thread model: posix
    InstalledDir: /home/binliu/tools/llvm-vortex/bin
    clang-16: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
    [2024-05-24 06:18:52.934871415]POCL: in fn int pocl_llvm_build_vortex_program(cl_kernel, unsigned int, cl_device_id, const char*, const char*, const char*, int) at line 131:
    | ERROR |
    [2024-05-24 06:18:52.934940647]POCL: in fn llvm_codegen at line 543:
    | LLVM | Vortex compilation kernel.o -> kernel.hex has failed
    [2024-05-24 06:18:52.935058773]POCL: in fn llvm_codegen at line 616:
    | TIMING | >>> 342.913 ms API: llvm_codegen
    Final linking of kernel vecadd failed.
    Aborted (core dumped)
    make[3]: *** [../common.mk:76: kernel.pocl] Error 134
    make[3]: Leaving directory '/home/binliu/skybox/tests/opencl/vecadd'
    make[2]: *** [Makefile:2: all] Error 2
    make[2]: Leaving directory '/home/binliu/skybox/tests/opencl'
    make[1]: *** [Makefile:11: opencl] Error 2
    make[1]: Leaving directory '/home/binliu/skybox/tests'
    make: *** [Makefile:7: all] Error 2
@id4liubin
Copy link
Author

Because error tool chain version, please ignore it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant