Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10236

Builtin LLVM fails to build (llvm-tblgen) after update of ncurses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Not a Bug
    • Affects Version/s: 6.19/01
    • Fix Version/s: None
    • Component/s: Other
    • Labels:
      None
    • Environment:

      Linux, ncurses 6.1

    • Development:

      Description

       master $ ninja
      [1/6813] Linking CXX executable interpreter/llvm/src/bin/llvm-tblgen
      FAILED: interpreter/llvm/src/bin/llvm-tblgen 
      : && /usr/lib/ccache/bin/g++-8.3.0  -O2 -march=native -fno-omit-frame-pointer -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -fvisibility=hidden -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++1z -w -ffunction-sections -fdata-sections -O3  -rdynamic -Wl,-allow-shlib-undefined    -Wl,-rpath-link,/home/amadio/build/master/interpreter/llvm/src/./lib  -Wl,-O3 -Wl,--gc-sections interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterInst.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/Attributes.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CallingConvEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeEmitterGen.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenInstruction.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenMapTable.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenRegisters.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenSchedule.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenTarget.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherGen.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcher.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/DisassemblerEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/FastISelEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/FixedLenDecoderEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/GlobalISelEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/InstrInfoEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/IntrinsicEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/RegisterBankEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/RegisterInfoEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/SearchableTableEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/SubtargetEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/SubtargetFeatureInfo.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/TableGen.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/Types.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86EVEX2VEXTablesEmitter.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o  -o interpreter/llvm/src/bin/llvm-tblgen  interpreter/llvm/src/lib/libLLVMSupport.a interpreter/llvm/src/lib/libLLVMTableGen.a interpreter/llvm/src/lib/libLLVMSupport.a -lrt -ldl -lcurses -lz -lm interpreter/llvm/src/lib/libLLVMDemangle.a && :
      /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: interpreter/llvm/src/lib/libLLVMSupport.a(Process.cpp.o): in function `llvm::sys::Process::FileDescriptorHasColors(int) [clone .part.39]':
      Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi.part.39+0x4d): undefined reference to `setupterm'
      /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi.part.39+0x88): undefined reference to `tigetnum'
      /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi.part.39+0x92): undefined reference to `set_curterm'
      /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: Process.cpp:(.text._ZN4llvm3sys7Process23FileDescriptorHasColorsEi.part.39+0x9a): undefined reference to `del_curterm'
      collect2: error: ld returned 1 exit status
      [10/6813] Building CXX object interpreter/llvm/src/lib/MC/CMakeFiles/LLVMMC.dir/MCStreamer.cpp.o
      ninja: build stopped: subcommand failed.
      

      LLVM links only with -lcurses, but should link also with tinfo, as ncurses6-config says:

      $ ncurses6-config --libs
      -L/usr/lib64 -lncurses -ltinfo -ldl
      

      Adding -ltinfo by hand makes it compile again.

      The problematic setup is in interpreter/llvm/src/cmake/config-ix.cmake around line 150, where an ad-hoc foreach fails to add tinfo in addition to curses into ${TERMINFO_LIBS}.

        Attachments

          Activity

            People

            • Assignee:
              amadio Guilherme Amadio
              Reporter:
              amadio Guilherme Amadio
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual End: