taichi: [PyPI] install with pip, libtinfo.so.5 not found

Describe the bug I installed taichi using pip install --user taichi.

Log/Screenshots

[bate@archit gpu]$ pydoc taichi.GUI.is_pressed
[Taichi] mode=release
Share object taichi_core import failed. If you are on Windows, please consider installing "Microsoft Visual C++ Redistributable" (https://aka.ms/vs/16/release/vc_redist.x64.exe)
problem in taichi - ImportError: libtinfo.so.5: cannot open shared object file: No such file or directory

To Reproduce A linux environment without libtinfo5, then python -c 'import taichi'.

If you have local commits (e.g. compile fixes before you reproduce the bug), please make sure you first make a PR to fix the build errors and then report the bug. See #790, I updated doc to tell them how to install, and ultimately we should remove this hard dep (#782)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

I found where it is!!! We should use objdump, not readelf:

(804) [bate@archit taichi]$ objdump -D build/libtaichi_core.so | grep set_curterm
0000000000568620 <set_curterm@plt>:
  568620:       ff 25 ea 5c 9c 02       jmpq   *0x29c5cea(%rip)        # 2f2e310 <set_curterm>
  e50a48:       e8 d3 7b 71 ff          callq  568620 <set_curterm@plt>
  5685b6:       77 72                   ja     56862a <set_curterm@plt+0xa>
  5685e5:       74 3a                   je     568621 <set_curterm@plt+0x1>
  5685bc:       36 64 65 74 61          ss fs gs je 568622 <set_curterm@plt+0x2>
  5685b0:       73 74                   jae    568626 <set_curterm@plt+0x6>
  5685b8:       73 68                   jae    568622 <set_curterm@plt+0x2>
  5685ca:       70 61                   jo     56862d <set_curterm@plt+0xd>

Even you don’t know it’s source? Well…I guess it’s related to spdlog, it would be great if we could tweak this statically-linked.

I already figure out how to install this dep, but some users may not, I hope they could run taichi codes as soon as they run pip install taichi, rather than an ImportError.

I mean, when releasing the prebuilt LLVM 10 we simply disable LLVM_ENABLE_TERM_INFO. It’s gonna take a while for us to migrate, so we have to do the symlink for now…

I have to run for a meeting - good night!

Ok, so we have to abandon LLVM 8 and 9 support now? Fine, just tell 8&9 users to manually do that symlink, not a big deal after all.

But ultimately can we specify some cmake arguments to make llvm not detecting-file-color? It’s really ridiculous and taichi don’t need that after all…

Right, not sure how easy that is though… LLVM does seem to have a related cmake option.

We can do it while upgrading to LLVM 10 #655

Screenshot from 2020-04-17 13-14-07

Thanks for the hard work - to be honest, I have no idea on that, but I believe you can figure out a nice solution in the end. Take care and don’t sleep too late! 😃

spdlog seems to be header-only so I guess it should not introduce any dependency…

But how could spdlog print colorful log like colorama does? Also catch.hpp can. Have to sleep now, go back to solve this tmr. See catch.hpp:6022, they use ANSI, no libtinfo.

Clearly, now you know this dependency better than I do, so I’ll trust your decision.

(master) [bate@archit taichi]$ readelf -s /usr/lib/libtinfo.so.5 | awk '{print $8}' | grep term
termname
_nc_init_termtype
_nc_copy_termtype
_nc_align_termtype
setupterm
_nc_setupterm
_nc_home_terminfo
termattrs
_nc_read_termtype
restartterm
_nc_check_termtype2
term_attrs
del_curterm
resize_term
set_curterm
_nc_free_termtype
resizeterm
is_term_resized
set_term
cur_term
_nc_read_termcap
newterm
(master) [bate@archit taichi]$ readelf -s build/libtaichi_core.so | awk '{print $8}' | grep -v _Z | grep -v LLVM | grep -v gl | grep term
set_curterm
del_curterm
setupterm
terminator.9283
terminate
__clang_call_terminate
set_curterm
del_curterm
setupterm
(master) [bate@archit taichi]$ 

It’s alias of libcurses, I confirmed.