Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/emsdk/fastcomp/fastcomp/bin/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory #252

Closed
soniakash1998 opened this issue May 30, 2019 · 16 comments · Fixed by WebAssembly/waterfall#539

Comments

@soniakash1998
Copy link

soniakash1998 commented May 30, 2019

Installed the latest version 1.38.33 of Emscripten. When I tried to compile a simple C++ file to javascript than it is showing this

emcc a.cpp -o a.html
cache:INFO: generating system asset: is_vanilla.txt... (this will be cached in "/home/ubuntu/.emscripten_cache/is_vanilla.txt" for subsequent builds)
/home/ubuntu/emsdk/fastcomp/fastcomp/bin/llc: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
cache:INFO: - ok
/home/ubuntu/emsdk/fastcomp/fastcomp/bin/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
shared:ERROR: '/home/ubuntu/emsdk/fastcomp/fastcomp/bin/clang++ --version' failed (127)

tried the emcc -v to know the other errors

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.38.33
/home/ubuntu/emsdk/fastcomp/fastcomp/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
/home/ubuntu/emsdk/fastcomp/fastcomp/bin/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
shared:ERROR: '/home/ubuntu/emsdk/fastcomp/fastcomp/bin/clang++ --version' failed (127)

@kripken
Copy link
Member

kripken commented May 30, 2019

Thanks for the bug report! This looks related to emscripten-core/emscripten#8697 , but with a much worse symptom. I'll try to raise the priority there.

@kripken
Copy link
Member

kripken commented May 30, 2019

Btw, what OS are you on?

@soniakash1998
Copy link
Author

I am currently using ubuntu 19.04

@soniakash1998
Copy link
Author

soniakash1998 commented May 31, 2019 via email

@dschuff
Copy link
Member

dschuff commented May 31, 2019

Can you try sudo apt-get install libtinfo5?

@soniakash1998
Copy link
Author

I tried sudo apt-get install libtinfo5 and it worked for me.
But it raised some shared error
shared:ERROR: Emscripten, llvm and clang build versions do not match, this is dangerous (1.38.33, 1.38.31, 1.38.31)

but then I executed ./emsdk install latest and this shared error removed.
Thanks @dschuff.

@Calinou
Copy link

Calinou commented Jun 4, 2019

I just stumbled upon this issue as well, so here's a note for Fedora users: this can be solved by installing the ncurses-compat-libs package (sudo dnf install ncurses-compat-libs) 🙂

However, this causes the terminal to print this every time clang++ is called:

/lib64/libtinfo.so.5: no version information available (required by /home/hugo/.local/opt/emsdk/fastcomp/fastcomp/bin/../lib/libLLVM-6.0.so)

Should I open a separate issue for this?

@kripken
Copy link
Member

kripken commented Jun 4, 2019

Thanks @Calinou, I'll add that Fedora note to our docs, I have a wip PR for this, emscripten-core/emscripten#8734

For that warning, we have emscripten-core/emscripten#8697 which tracks that I believe.

@Martmists-GH
Copy link

Same issue appears on Arch Linux, with libtinfo no longer being on the AUR

@trzecieu
Copy link
Collaborator

Bump on Fedora case - this is some regression as one of the last precompiled version of SDK (1.38.25) has no issue like that.

@kripken
Copy link
Member

kripken commented Jun 11, 2019

@trzecieu thanks, yeah, let me reopen this, as it seems serious. For now, can use 1.38.31 or earlier which are from the old builders. When @dschuff has time he mentioned he might know how to fix this properly in the new ones with a build sysroot.

@kripken kripken reopened this Jun 11, 2019
@trzecieu
Copy link
Collaborator

Where do you scripts responsible for building precompiled version of SDK? I might take a look also.

@kripken
Copy link
Member

kripken commented Jun 12, 2019

@dschuff
Copy link
Member

dschuff commented Jun 12, 2019

@kripken you're right, that build.py code is how LLVM is built (there shouldn't be any need to change the recipe). I found that LLVM's CMake has an option LLVM_ENABLE_TERMINFO that can be used to disable use of terminfo if it's problematic. So we could add -DLLVM_ENABLE_TERMINFO=OFF to our build for now. I think that might mean we don't get the nice color diagnostics anymore (not sure), but maybe going forward we might want to try to modify LLVM's CMake files to link those extra libraries statically (this maybe also could be used for e.g. libxml, libiconv, zlib, xar, etc).

@trzecieu
Copy link
Collaborator

Looks like worth to try with -DLLVM_ENABLE_TERMINFO=OFF

@kripken
Copy link
Member

kripken commented Jun 12, 2019

Agreed, I opened WebAssembly/waterfall#539 to try that now.

kripken added a commit to WebAssembly/waterfall that referenced this issue Jun 12, 2019
This may prevent nice colors in the output, but I didn't see that in my local testing (there's no error checking for those flags, though, so not sure I did it right).

May fix emscripten-core/emsdk#252
kripken added a commit to WebAssembly/waterfall that referenced this issue Jun 13, 2019
As not having it removes colors on some systems. Oddly on one machine I didn't see this, but testing on another, I do - all the colors are gone.

The eventual solution may be to statically link libtinfo. Meanwhile with it we get errors on some linuxes but proper colors, and without it we avoid linux errors but have no colors. With this PR at least the loss of colors is just on linux.

See

emscripten-core/emsdk#252

#539

#540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants