[llvm-dev] llvm-trunk errors with gcc-5.3.0 on SuSE Linux

Siegmar Gross via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 1 23:44:53 PDT 2017


Hi,

I try to build llvm-trunk with Cmake (gcc-5.3.0 is necessary for CUDA)
on my "SUSE Linux Enterprise Server 12.2 (x86_64)".

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://llvm.org/svn/llvm-project/polly/trunk polly
cd clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk/ extra
cd ../../../projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp
svn co https://github.com/clang-ykt/openmp libomptarget

rm -r build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/llvm-trunk \
   -DCMAKE_BUILD_TYPE:STRING="Release" \
   -DLLVM_PARALLEL_COMPILE_JOBS:STRING="4" \
   -DLLVM_PARALLEL_LINK_JOBS:STRING="4" \
   -DLLVM_TARGETS_TO_BUILD:STRING="NVPTX;X86" \
   -DLLVM_ENABLE_SPHINX=true \
   -DSPHINX_OUTPUT_MAN=true \
   -DCMAKE_C_COMPILER:STRING="/usr/local/gcc-5.3.0/bin/gcc" \
   -DCMAKE_C_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
   -DCMAKE_CXX_COMPILER:STRING="/usr/local/gcc-5.3.0/bin/g++" \
   -DCMAKE_CXX_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
   -DCMAKE_EXE_LINKER_FLAGS:STRING="-m64" \
   -DLLVM_LIBDIR_SUFFIX:STRING="64" \
   -DLLVM_POLLY_LINK_INTO_TOOLS:BOOL=ON \
 
-DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:STRING="/usr/local/elfutils-0.169/include" \
 
-DLIBOMPTARGET_DEP_LIBELF_LIBRARIES:STRING="/usr/local/elfutils-0.169/lib64/libelf.so" 
\
   -DLIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR:STRING="/usr/include" \
   -DLIBOMPTARGET_DEP_LIBFFI_LIBRARIES:STRING="/usr/lib64/libffi.so" \
   -DCUDA_INCLUDE_DIRS:STRING="/usr/local/cuda/include" \
   -DCUDA_LIBRARIES:STRING="/usr/local/cuda/lib64/libcudart.so" \
   -DBUILD_SHARED_LIBS:BOOL=ON \
   ../llvm \
   |& tee log.cmake
cmake --build . |& tee log.cmake-build


Unfortunately I get the following errors. Is it necessary to change my
configuration to avoid the errors?

...
[ 66%] Building CXX object 
tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/TargetInfo.cpp.o
[ 66%] Building CXX object 
tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5133:23: error: 
'AK_ARMV4T' is not a member of 'llvm::ARM'
    unsigned ArchKind = llvm::ARM::AK_ARMV4T;
                        ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'void {anonymous}::ARMTargetInfo::setABIAAPCS()':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5180:22: error: 
'Bitrig' is not a member of 'llvm::Triple'
          T.getOS() == llvm::Triple::Bitrig)
                       ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'void {anonymous}::ARMTargetInfo::setArchInfo()':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5280:17: error: 
cannot convert 'llvm::ARM::ISAKind' to 'unsigned int' in assignment
      ArchISA     = llvm::ARM::parseArchISA(ArchName);
                  ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5282:48: error: 
cannot convert 'llvm::ARM::ArchKind' to 'unsigned int' in initialization
      unsigned AK = llvm::ARM::parseArch(ArchName);
                                                 ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5283:15: error: 
'AK_INVALID' is not a member of 'llvm::ARM'
      if (AK != llvm::ARM::AK_INVALID)
                ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'void {anonymous}::ARMTargetInfo::setArchInfo(unsigned int)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5293:49: error: 
cannot convert 'unsigned int' to 'llvm::ARM::ArchKind' for argument '1' to 
'llvm::StringRef llvm::ARM::getSubArch(llvm::ARM::ArchKind)'
      SubArch     = llvm::ARM::getSubArch(ArchKind);
                                                  ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5294:17: error: 
cannot convert 'llvm::ARM::ProfileKind' to 'unsigned int' in assignment
      ArchProfile = llvm::ARM::parseArchProfile(SubArch);
                  ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'void {anonymous}::ARMTargetInfo::setAtomic()':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5306:32: error: 
'IK_ARM' is not a member of 'llvm::ARM'
                     (ArchISA == llvm::ARM::IK_ARM   && ArchVersion >= 6) ||
                                 ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5307:32: error: 
'IK_THUMB' is not a member of 'llvm::ARM'
                     (ArchISA == llvm::ARM::IK_THUMB && ArchVersion >= 7);
                                 ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5309:24: error: 
'PK_M' is not a member of 'llvm::ARM'
      if (ArchProfile == llvm::ARM::PK_M) {
                         ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'bool {anonymous}::ARMTargetInfo::isThumb() const':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5322:24: error: 
'IK_THUMB' is not a member of 'llvm::ARM'
      return (ArchISA == llvm::ARM::IK_THUMB);
                         ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'llvm::StringRef {anonymous}::ARMTargetInfo::getCPUAttr() const':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5339:44: error: 
cannot convert 'const unsigned int' to 'llvm::ARM::ArchKind' for argument '1' to 
'llvm::StringRef llvm::ARM::getCPUAttr(llvm::ARM::ArchKind)'
        return llvm::ARM::getCPUAttr(ArchKind);
                                             ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5340:10: error: 
'AK_ARMV6M' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV6M:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5342:10: error: 
'AK_ARMV7S' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV7S:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5344:10: error: 
'AK_ARMV7A' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV7A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5346:10: error: 
'AK_ARMV7R' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV7R:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5348:10: error: 
'AK_ARMV7M' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV7M:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5350:10: error: 
'AK_ARMV7EM' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV7EM:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5352:10: error: 
'AK_ARMV7VE' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV7VE:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5354:10: error: 
'AK_ARMV8A' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5356:10: error: 
'AK_ARMV8_1A' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8_1A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5358:10: error: 
'AK_ARMV8_2A' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8_2A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5360:10: error: 
'AK_ARMV8MBaseline' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8MBaseline:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5362:10: error: 
'AK_ARMV8MMainline' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8MMainline:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5364:10: error: 
'AK_ARMV8R' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8R:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'llvm::StringRef {anonymous}::ARMTargetInfo::getCPUProfile() const':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5371:10: error: 
'PK_A' is not a member of 'llvm::ARM'
      case llvm::ARM::PK_A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5373:10: error: 
'PK_R' is not a member of 'llvm::ARM'
      case llvm::ARM::PK_R:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5375:10: error: 
'PK_M' is not a member of 'llvm::ARM'
      case llvm::ARM::PK_M:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In constructor 
'{anonymous}::ARMTargetInfo::ARMTargetInfo(const llvm::Triple&, const 
clang::TargetOptions&)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5412:26: error: 
'PK_M' is not a member of 'llvm::ARM'
            ArchProfile == llvm::ARM::PK_M) {
                           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual bool 
{anonymous}::ARMTargetInfo::initFeatureMap(llvm::StringMap<bool>&, 
clang::DiagnosticsEngine&, llvm::StringRef, const 
std::vector<std::__cxx11::basic_string<char> >&) const':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5499:67: error: 
cannot convert 'llvm::ARM::ArchKind' to 'unsigned int' in initialization
      unsigned Arch = llvm::ARM::parseArch(getTriple().getArchName());
                                                                    ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5502:58: error: 
cannot convert 'unsigned int' to 'llvm::ARM::ArchKind' for argument '2' to 
'unsigned int llvm::ARM::getDefaultFPU(llvm::StringRef, llvm::ARM::ArchKind)'
      unsigned FPUKind = llvm::ARM::getDefaultFPU(CPU, Arch);
                                                           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5506:68: error: 
cannot convert 'unsigned int' to 'llvm::ARM::ArchKind' for argument '2' to 
'unsigned int llvm::ARM::getDefaultExtensions(llvm::StringRef, llvm::ARM::ArchKind)'
      unsigned Extensions = llvm::ARM::getDefaultExtensions(CPU, Arch);
                                                                     ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual bool 
{anonymous}::ARMTargetInfo::handleTargetFeatures(std::vector<std::__cxx11::basic_string<char> 
 >&, clang::DiagnosticsEngine&)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5588:26: error: 
'PK_M' is not a member of 'llvm::ARM'
        if (ArchProfile == llvm::ARM::PK_M)
                           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5590:28: error: 
'AK_ARMV6K' is not a member of 'llvm::ARM'
        else if (ArchKind == llvm::ARM::AK_ARMV6K)
                             ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5596:26: error: 
'PK_M' is not a member of 'llvm::ARM'
        if (ArchProfile == llvm::ARM::PK_M)
                           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual bool {anonymous}::ARMTargetInfo::setCPU(const string&)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5639:48: error: 
no matching function for call to 
'{anonymous}::ARMTargetInfo::setArchInfo(llvm::ARM::ArchKind)'
        setArchInfo(llvm::ARM::parseCPUArch(Name));
                                                 ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5277:8: note: 
candidate: void {anonymous}::ARMTargetInfo::setArchInfo()
    void setArchInfo() {
         ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5277:8: note: 
candidate expects 0 arguments, 1 provided
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5288:8: note: 
candidate: void {anonymous}::ARMTargetInfo::setArchInfo(unsigned int)
    void setArchInfo(unsigned Kind) {
         ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5288:8: note: 
no known conversion for argument 1 from 'llvm::ARM::ArchKind' to 'unsigned int'
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5641:21: error: 
'AK_INVALID' is not a member of 'llvm::ARM'
      if (ArchKind == llvm::ARM::AK_INVALID)
                      ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual void {anonymous}::ARMTargetInfo::getTargetDefines(const 
clang::LangOptions&, clang::MacroBuilder&) const':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5704:46: error: 
'PK_M' is not a member of 'llvm::ARM'
      if (CPUProfile.empty() || ArchProfile != llvm::ARM::PK_M)
                                               ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5778:21: error: 
'AK_XSCALE' is not a member of 'llvm::ARM'
      if (ArchKind == llvm::ARM::AK_XSCALE)
                      ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5861:10: error: 
'AK_ARMV8_1A' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8_1A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:5864:10: error: 
'AK_ARMV8_2A' is not a member of 'llvm::ARM'
      case llvm::ARM::AK_ARMV8_2A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual bool {anonymous}::AArch64TargetInfo::setCPU(const string&)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:6325:34: error: 
'AK_INVALID' is not a member of 'llvm::AArch64::ArchKind'
             static_cast<unsigned>(llvm::AArch64::ArchKind::AK_INVALID);
                                   ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual void {anonymous}::AArch64TargetInfo::getTargetDefines(const 
clang::LangOptions&, clang::MacroBuilder&) const':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:6408:10: error: 
'AK_ARMV8_1A' is not a member of 'llvm::AArch64::ArchKind'
      case llvm::AArch64::ArchKind::AK_ARMV8_1A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:6411:10: error: 
'AK_ARMV8_2A' is not a member of 'llvm::AArch64::ArchKind'
      case llvm::AArch64::ArchKind::AK_ARMV8_2A:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In member 
function 'virtual bool 
{anonymous}::AArch64TargetInfo::handleTargetFeatures(std::vector<std::__cxx11::basic_string<char> 
 >&, clang::DiagnosticsEngine&)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:6443:16: error: 
'AK_ARMV8A' is not a member of 'llvm::AArch64::ArchKind'
      ArchKind = llvm::AArch64::ArchKind::AK_ARMV8A;
                 ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:6457:20: error: 
'AK_ARMV8_1A' is not a member of 'llvm::AArch64::ArchKind'
          ArchKind = llvm::AArch64::ArchKind::AK_ARMV8_1A;
                     ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:6459:20: error: 
'AK_ARMV8_2A' is not a member of 'llvm::AArch64::ArchKind'
          ArchKind = llvm::AArch64::ArchKind::AK_ARMV8_2A;
                     ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp: In function 
'clang::TargetInfo* AllocateTarget(const llvm::Triple&, const 
clang::TargetOptions&)':
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:9570:10: error: 
'Bitrig' is not a member of 'llvm::Triple'
      case llvm::Triple::Bitrig:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:9606:10: error: 
'Bitrig' is not a member of 'llvm::Triple'
      case llvm::Triple::Bitrig:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:9838:10: error: 
'Bitrig' is not a member of 'llvm::Triple'
      case llvm::Triple::Bitrig:
           ^
/export2/src/llvm-trunk/llvm/tools/clang/lib/Basic/Targets.cpp:9895:10: error: 
'Bitrig' is not a member of 'llvm::Triple'
      case llvm::Triple::Bitrig:
           ^
tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/build.make:572: recipe for 
target 'tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o' failed
gmake[2]: *** [tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o] 
Error 1
CMakeFiles/Makefile2:18931: recipe for target 
'tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/all' failed
gmake[1]: *** [tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
gmake: *** [all] Error 2
loki build 310


I would be grateful if somebody can fix the problem. Please let me know
if you need anything else. Thank you very much for any help in advance.


Kind regards

Siegmar


More information about the llvm-dev mailing list