ROCm / hcc

HCC is an Open Source, Optimizing C++ Compiler for Heterogeneous Compute currently for the ROCm GPU Computing Platform
https://github.com/RadeonOpenCompute/hcc/wiki
Other
433 stars 108 forks source link

compile error from source code #1428

Open 0hanghang opened 4 years ago

0hanghang commented 4 years ago

I've been compiling the hcc(default branch) with llvm(amd-stg-open branch) on arm64 platform ,ROCT-THUNK-INTERFACE ROCR-RUNTIME, ROCM-DEVICE-LIBS have been compiled and make install .but when got to the hcc ,I follow the step : 1.cmake -DCMAKE_BUILD_TYPE=Release ..

  1. make Log is bellow: [ 44%] Built target LTO_exports Scanning dependencies of target LTO [ 44%] Building CXX object llvm-project/llvm/tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o [ 44%] Building CXX object llvm-project/llvm/tools/lto/CMakeFiles/LTO.dir/lto.cpp.o [ 44%] Linking CXX shared library ../../lib/libLTO.so ../../lib/libLLVMAMDGPUCodeGen.a(AMDGPUTargetMachine.cpp.o): In function (anonymous namespace)::GCNPassConfig::addFastRegAlloc()': AMDGPUTargetMachine.cpp:(.text._ZN12_GLOBAL__N_113GCNPassConfig15addFastRegAllocEv+0x4): undefined reference tollvm::PHIEliminationID' AMDGPUTargetMachine.cpp:(.text._ZN12_GLOBALN_113GCNPassConfig15addFastRegAllocEv+0x14): undefined reference to llvm::PHIEliminationID' ../../lib/libLLVMAMDGPUCodeGen.a(AMDGPUTargetMachine.cpp.o): In function(anonymous namespace)::GCNPassConfig::addOptimizedRegAlloc()': AMDGPUTargetMachine.cpp:(.text._ZN12_GLOBAL__N_113GCNPassConfig20addOptimizedRegAllocEv+0x78): undefined reference to `llvm::PHIEliminationID' AMDGPUTargetMachine.cpp:(.text._ZN12_GLOBALN_113GCNPassConfig20addOptimizedRegAllocEv+0x88): undefined reference to llvm::PHIEliminationID' ../../lib/libLLVMAArch64CodeGen.a(AArch64TargetMachine.cpp.o): In function(anonymous namespace)::AArch64PassConfig::addPreRegAlloc()': AArch64TargetMachine.cpp:(.text._ZN12_GLOBAL__N_117AArch64PassConfig14addPreRegAllocEv+0x64): undefined reference to llvm::PeepholeOptimizerID' AArch64TargetMachine.cpp:(.text._ZN12_GLOBAL__N_117AArch64PassConfig14addPreRegAllocEv+0x74): undefined reference tollvm::PeepholeOptimizerID' ../../lib/libLLVMCodeGen.a(TargetPassConfig.cpp.o): In function llvm::TargetPassConfig::addMachineSSAOptimization()': TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig25addMachineSSAOptimizationEv+0x108): undefined reference tollvm::PeepholeOptimizerID' TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig25addMachineSSAOptimizationEv+0x118): undefined reference to llvm::PeepholeOptimizerID' ../../lib/libLLVMCodeGen.a(TargetPassConfig.cpp.o): In functionllvm::TargetPassConfig::addFastRegAlloc()': TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig15addFastRegAllocEv+0x4): undefined reference to llvm::PHIEliminationID' TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig15addFastRegAllocEv+0x14): undefined reference tollvm::PHIEliminationID' ../../lib/libLLVMCodeGen.a(TargetPassConfig.cpp.o): In function llvm::TargetPassConfig::addOptimizedRegAlloc()': TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig20addOptimizedRegAllocEv+0x7c): undefined reference tollvm::PHIEliminationID' TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig20addOptimizedRegAllocEv+0x8c): undefined reference to llvm::PHIEliminationID' ../../lib/libLLVMCodeGen.a(TargetPassConfig.cpp.o): In functionllvm::TargetPassConfig::addMachinePasses()': TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig16addMachinePassesEv+0x378): undefined reference to llvm::PHIEliminationID' ../../lib/libLLVMCodeGen.a(TargetPassConfig.cpp.o):TargetPassConfig.cpp:(.text._ZN4llvm16TargetPassConfig16addMachinePassesEv+0x388): more undefined references tollvm::PHIEliminationID' follow ../../lib/libLLVMCodeGen.a(CodeGen.cpp.o): In function llvm::initializeCodeGen(llvm::PassRegistry&)': CodeGen.cpp:(.text._ZN4llvm17initializeCodeGenERNS_12PassRegistryE+0x1e8): undefined reference tollvm::initializePHIEliminationPass(llvm::PassRegistry&)' CodeGen.cpp:(.text._ZN4llvm17initializeCodeGenERNS_12PassRegistryE+0x1f8): undefined reference to `llvm::initializePeepholeOptimizerPass(llvm::PassRegistry&)' collect2: error: ld returned 1 exit status llvm-project/llvm/tools/lto/CMakeFiles/LTO.dir/build.make:181: recipe for target 'llvm-project/llvm/lib/libLTO.so.11git' failed make[2]: [llvm-project/llvm/lib/libLTO.so.11git] Error 1 CMakeFiles/Makefile2:19886: recipe for target 'llvm-project/llvm/tools/lto/CMakeFiles/LTO.dir/all' failed make[1]: [llvm-project/llvm/tools/lto/CMakeFiles/LTO.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error

Does anyone have some ideas? thanks in advance!