# ROOT cannot find -lterminfo during Install

**URL:** <https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979>\
**Category:** Newbie\
**Tags:** installation\
**Created:** [July 22, 2021, 5:02pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979 "2021-07-22T17:02:46Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 22, 2021, 5:02pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/1 "2021-07-22T17:02:46Z")

</div>

* * *

_ROOT Version:_ 6.24/02  
_Platform:_ Linux  
_Compiler:_ gcc/g++ 4.8.5

* * *

I’m trying to install ROOT with Pythia8 enabled, but the `cmake --build . -- install -j1` step fails at the following step:

```auto
[28%] Built target move_headers
Consolidate compiler generated dependencies of target Foundation_Stage1
[28%] Built target Foundation_Stage1
Consolidate compiler generated dependencies of target LLVMDemangle
[28%] Built target LLVMDemangle
Consolidate compiler generated dependencies of target LLVMSupport
[29%] Built target LLVMSupport
Consolidate compiler generated dependencies of target obj.llvm-tblgen
[29%] Built target obj.llvm-tblgen
Consolidate compiler generated dependencies of target LLVMTableGen
[29%] Built target LLVMTableGen
[29%] Linking CXX executable ../../bin/llvm-tblgen
/usr/bin/ld: cannot find -lterminfo
collect2: error: ld returned 1 exit status
gmake[2]: *** [interpreter/llvm/src/bin/llvm-tblgen] Error 1
gmake[1]: *** [interpreter/llvm/src/utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
gmake: *** [all] Error 2
srun: error: srvcnthpc106: task 0: Exited with exit code 2

```

My configuration step is as follows:

`../../cmake/bin/cmake -DCMAKE_INSTALL_DIR=root_install ../root_src -DPYTHIA8_DIR=/opt/exp_soft/cern/pythia/pythia8306 -DPYTHIA8_INCLUDE=$PYTHIA8/include -DPYTHIA8_LIBRARY=$PYTHIA8/lib/libpythia8.so -Dxrootd=OFF`  
I disabled xrootd as this was causing errors earlier in the install step.

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 22, 2021, 10:10pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/2 "2021-07-22T22:10:34Z")

</div>

You might be missing the `ncurses-devel` package. Which distribution are you using?

---

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 23, 2021, 9:23am UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/3 "2021-07-23T09:23:33Z")

</div>

My Linux version is CentOS 7.7.1908. There is a version 5.9 of in my usr file of ncurses (also of ncursesw, not sure if this could cause any issues). I have both usr/bin and usr/include in my path, is there any other directories I should put in the path assuming ncurses was normally installed?

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 24, 2021, 4:45pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/4 "2021-07-24T16:45:55Z")

</div>

Since the error is in the LLVM part, I wonder if @vvassilev has seen it before?

It seems that the compilation runs under SLURM. Could it be that the compilation runs on a remote machine without the necessary dependencies. You can find a list of necessary dependencies for building ROOT here: [Dependencies - ROOT](https://root.cern/install/dependencies/)

---

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 26, 2021, 10:39am UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/5 "2021-07-26T10:39:57Z")

</div>

I had the slurm script check if each of the available modules are there, all the necessary dependencies appear to be available on the main machine and the remote machine

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 26, 2021, 10:41am UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/6 "2021-07-26T10:41:49Z")

</div>

Could you attach the full output of the compilation log? Perhaps this provides a clue to the root cause of the issue.

---

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 26, 2021, 10:57am UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/7 "2021-07-26T10:57:57Z")

</div>

[errorlog.txt](https://root-forum.cern.ch/uploads/short-url/snhIEekDoT5gYt1s5SHOabAyvf7.txt) (18.1 KB)

Here is the log of the output, hope this helps

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 26, 2021, 12:30pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/8 "2021-07-26T12:30:41Z")

</div>

That looks all correct to me. @Axel @bellenot Did you see this linker error before?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 26, 2021, 12:31pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/9 "2021-07-26T12:31:29Z")

</div>

Well, at least not on Windows… 😉

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 26, 2021, 12:36pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/10 "2021-07-26T12:36:48Z")

</div>

One more thing: In your build script, could you run add `-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON` to your cmake invocation so that we get more debug output from the build script.

---

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 26, 2021, 1:08pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/11 "2021-07-26T13:08:54Z")

</div>

[errlog.txt](https://root-forum.cern.ch/uploads/short-url/a79IfL2Q6gWbFjFcNz7fHFy6qJs.txt) (183.9 KB)

This is the output when enabling verbose makefile. Thanks!

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 26, 2021, 3:17pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/12 "2021-07-26T15:17:49Z")

</div>

Just checked on lxplus (CentOS 7), and here linking `llvm-tblgen` correctly asks for `ltinfo` instead of `lterminfo`. It also uses `-std=c++1y` instead of `-std=c++11` (may or may not be related).

There are a bunch of `abc is newer than depends file xyz` warnings in the error log. A skewed clock can actually confuse `make`. I’d suggest to check if all the machines report the same date and time. And also if the files (e.g. ROOT source tarball) don’t have timestamps in the future.

---

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 26, 2021, 8:19pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/13 "2021-07-26T20:19:36Z")

</div>

The timestamp issue was because I didn’t properly clean the directory after each failed install, and that eventually caused the files to be out of sync. However, fixing this doesn’t fix the compile error.

I’m not too sure about the compiler version issues, I tried compiling it with C and C++ standards 14 and 17, but it still doesn’t compile. None of the compiler versions I tried supported 1y when it is included in the CMake file, are there any specific versions of gcc/g++ which support this standard?

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [July 28, 2021, 7:50pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/14 "2021-07-28T19:50:13Z")

</div>

I think my only remaining suggestion would be to try building ROOT on another (local) CentOS7 machine and to only copy the installation folder to the destination. This may work if the destination machine has similar system libraries installed.

Regarding the C++ standard, CentOS 7’s gcc 8 only support up to C++14 afaik. But that is in principle ok for ROOT 6.24.

---

<div class="post-metadata">

**Author:** ![DuToit](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/fbc32d/32.png) [@DuToit](https://root-forum.cern.ch/u/DuToit)\
**Post date:** [July 29, 2021, 9:42am UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/15 "2021-07-29T09:42:24Z")

</div>

I tried installing a slightly older version fo ROOT (6.22.08) and it installs perfectly. Not sure why that is, but this should be fine for now. Thanks for all the help!

---

<div class="post-metadata">

**Author:** ![vvassilev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/f0a364/32.png) [@vvassilev](https://root-forum.cern.ch/u/vvassilev)\
**Post date:** [July 30, 2021, 2:34pm UTC](https://root-forum.cern.ch/t/root-cannot-find-lterminfo-during-install/45979/16 "2021-07-30T14:34:35Z")

</div>

Ideally we should not need it. I have created a fix [Turn off the terminfo library. We have our own. by vgvassilev · Pull Request #8780 · root-project/root · GitHub](https://github.com/root-project/root/pull/8780)
