ROCm-CompilerSupport icon indicating copy to clipboard operation
ROCm-CompilerSupport copied to clipboard

Errror building comgr

Open joelandman opened this issue 3 years ago • 0 comments

From my build log:

ROCm-CompilerSupport/lib/comgr/src/comgr-env.h:49:7: error: ‘Optional’ in namespace ‘llvm’ does not name a template type

This is on Debian 11

~/amdbuild/rocm-build/build/rocm-compilersupport ~/amdbuild/rocm-build/build/rocm-compilersupport
HEAD is now at 1132106 merge amd-stg-open into amd-mainline-open
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- 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
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib/x86_64-linux-gnu/libtinfo.so  
-- Found ZLIB: /usr/local/lib/libz.so (found version "1.2.12") 
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.10") 

------------LLVM_DIR: /opt/rocm/llvm/lib/cmake/llvm
---LLVM_INCLUDE_DIRS: /opt/rocm/llvm/include
---LLVM_LIBRARY_DIRS: /opt/rocm/llvm/lib
-----------Clang_DIR: /opt/rocm/llvm/lib/cmake/clang
--CLANG_INCLUDE_DIRS: /opt/rocm/llvm/include
----LLD_INCLUDE_DIRS: /opt/rocm/llvm/include
---AMDDeviceLibs_DIR: /opt/rocm/lib/cmake/AMDDeviceLibs
------------ROCM_DIR: /opt/rocm/share/rocm/cmake

-- hip::amdhip64 is SHARED_LIBRARY
-- Configuring done
-- Generating done

The error message in full

/data/home/joe/ROCm/ROCm-CompilerSupport/lib/comgr/src/comgr-env.h:49:7: error: ‘Optional’ in namespace ‘llvm’ does not name a template type
   49 | llvm::Optional<llvm::StringRef> getRedirectLogs();
      |       ^~~~~~~~
/data/home/joe/ROCm/ROCm-CompilerSupport/lib/comgr/src/time-stat/time-stat.cpp: In function ‘void TimeStatistics::GetLogFile(std::string&)’:
/data/home/joe/ROCm/ROCm-CompilerSupport/lib/comgr/src/time-stat/time-stat.cpp:32:47: error: ‘getRedirectLogs’ is not a member of ‘COMGR::env’
   32 |   if (Optional<StringRef> RedirectLogs = env::getRedirectLogs()) {
      |                                               ^~~~~~~~~~~~~~~

Additional errors in compilation

/data/home/joe/ROCm/ROCm-CompilerSupport/lib/comgr/src/comgr-compiler.cpp:608:41: error: invalid initialization of non-const reference of type ‘llvm::raw_ostream&’ from an rvalue of type ‘bool’
  608 |   bool LLDRet = lld::elf::link(ArgRefs, false, LogS, LogE);
      |                                         ^~~~~

joelandman avatar Jul 08 '22 15:07 joelandman