ROCm / ROCm-CompilerSupport

The compiler support repository provides various Lightning Compiler related services.
47 stars 31 forks source link

Comgr Won't compile #34

Closed UltraBlackLinux closed 2 years ago

UltraBlackLinux commented 3 years ago

Hey there, I got some compilation problems:

-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:61 (find_package):
  Could not find a package configuration file provided by "LLD" with any of
  the following names:

    LLDConfig.cmake
    lld-config.cmake

  Add the installation prefix of "LLD" to CMAKE_PREFIX_PATH or set "LLD_DIR"
  to a directory containing one of the above files.  If "LLD" provides a
  separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!
See also "/tmp/trizen-maus/comgr/src/build/CMakeFiles/CMakeOutput.log".

What should I do about this? I am not that much into solving compilation errors... Thanks!

xuhuisheng commented 3 years ago

LLDConfig.cmake is provided by llvm-amdgpu. sudo apt install llvm-amdgpu first. or build https://github.com/RadeonOpenCompute/llvm-project , may cost 1 hours. Can refer my build scripts : https://github.com/xuhuisheng/rocm-build/

UltraBlackLinux commented 3 years ago

I tried to compile llvm-amdgpu - I also have it installed aready, and got an updating error

UltraBlackLinux commented 3 years ago

@xuhuisheng always get this error while compiling:

In Datei, eingebunden von /tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/include/llvm/ADT/ArrayRef.h:14,
                 von /tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/include/llvm/ADT/DenseMapInfo.h:17,
                 von /tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/include/llvm/ADT/DenseMap.h:16,
                 von /tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/tools/llvm-xray/func-id-helper.h:15,
                 von /tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/tools/llvm-xray/xray-stacks.cpp:20:
/tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/include/llvm/ADT/SmallVector.h: In Funktion »void StackTrie::print(llvm::raw_ostream&, llvm::xray::FuncIdConversionHelper&, StackTrie::RootVector)«:
/tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/include/llvm/ADT/SmallVector.h:537:7: Warnung: Arrayindex 2 ist außerhalb der Arraygrenzen von »std::pair<const TrieNode<StackDuration>*, long unsigned int> [1]« [-Warray-bounds]
  537 |       ++EltPtr;
      |       ^~
/tmp/trizen-maus/llvm-amdgpu/src/llvm-project-rocm-3.9.0/llvm/tools/llvm-xray/xray-stacks.cpp:634:72: Anmerkung: beim Referenzieren von »<anonym>«
  634 |                 llvm::lower_bound(TopStacksBySum, E, greater_second), E);
      |                                                                        ^
make[1]: *** [CMakeFiles/Makefile2:16834: lib/Analysis/CMakeFiles/LLVMAnalysis.dir/all] Fehler 2
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
[ 74%] Linking CXX executable ../../bin/llvm-xray
[ 74%] Linking CXX executable ../../bin/llvm-cfi-verify
[ 74%] Built target llvm-xray
[ 74%] Built target llvm-cfi-verify
[ 74%] Linking CXX executable ../../bin/llvm-readobj
[ 74%] Built target llvm-readobj
make: *** [Makefile:171: all] Fehler 2
==> FEHLER: Ein Fehler geschah in build().
    Breche ab...
:: Unable to build llvm-amdgpu - makepkg exited with code: 4
xuhuisheng commented 3 years ago

Could be out of memory

UltraBlackLinux commented 3 years ago

it's not, I've got 32 gigs of ram, the only thing that is 99% used is the processor.

UltraBlackLinux commented 3 years ago

I just looked at the logs, and it seems to be a problem with a missing library

/home/maus/.cache/yay/comgr/src/ROCm-CompilerSupport-rocm-3.10.0/lib/comgr/src/comgr-metadata.cpp: In Funktion »amd_comgr_status_t COMGR::metadata::getElfIsaNameV3(const llvm::object::ELFObjectFile<ELFT>*, size_t*, char*)«:
/home/maus/.cache/yay/comgr/src/ROCm-CompilerSupport-rocm-3.10.0/lib/comgr/src/comgr-metadata.cpp:592:13: Fehler: »EF_AMDGPU_MACH_AMDGCN_GFX1031« ist kein Element von »llvm::ELF«; meinten Sie »EF_AMDGPU_MACH_AMDGCN_GFX1030«?
  592 |   case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1031:
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             EF_AMDGPU_MACH_AMDGCN_GFX1030
jpsamaroo commented 3 years ago

The error you're getting is because your versions of llvm-amdgpu and ROCm-CompilerSupport are out of sync. Make sure you're building with the same release versions of each.

UltraBlackLinux commented 2 years ago

The error you're getting is because your versions of llvm-amdgpu and ROCm-CompilerSupport are out of sync. Make sure you're building with the same release versions of each.

Hmm Okay, there wasn't an update for that at the time...