xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/bzlmod/cross_compile/LLVM_Troubleshooting.md (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1### LLVM Troubleshooting
2
3On older linux distributions (Ubuntu 16.04) you may encounter an error that C++ versions before C++ 14 are no longer
4supported. In this case, just install gcc version 7 or newer. This is rare corner case, but there are gcc backports for
5older distributions, so please upgrade your compiler if you ever see this error.
6
7On Ubuntu 20.04 you may see an error that a shared library called libtinfo.so.5 is missing. In that case, just install
8libtinfo via apt-get since its in the official 20.04 repo. To so, open a terminal and type:
9
10`
11apt update && apt install -y libtinfo5
12`
13
14The libtinfo5 library may have different package names on other distributions, but it is a well known
15issue. [See this SO discussion](https://stackoverflow.com/questions/48674104/clang-error-while-loading-shared-libraries-libtinfo-so-5-cannot-open-shared-o)
16for various solutions.
17
18On MacOX, it is sufficient to have the Apple Clang compiler installed.
19I don't recommend installing the full Xcode package unless you're developing software for an Apple device. Instead, the
20Xcode Command Line Tools provide everything you need at a much smaller download size. In most cases, a simple:
21
22`xcode-select --install`
23
24From a terminal triggers the installation process. For details and alternative
25options, [read this article on freebootcamp.](https://www.freecodecamp.org/news/install-xcode-command-line-tools/)
26
27Windows is not directly supported, but you can use Linux on Windows with WSL to setup an Ubuntu environment within
28Windows. Please refer to
29the [official WSL documentation for details.](https://learn.microsoft.com/en-us/windows/wsl/install)