These instructions will lead you through installing or building the best version of lldb for your distro to use with SOS. If you have already followed the diagnostics repo build prerequisites and built the diagnostics repo, then the best version of lldb is already installed.
SOS needs at least lldb 3.9 or greater. Some distros only have older versions available by default so there are directions and scripts to build lldb 3.9 for that platform. These instructions assume that you have dotnet cli and its prerequisites installed.
The libsosplugin.so built for lldb 3.9 does work with lldb 4.0, 5.0 and 6.0 but most of the testing has been on lldb 3.9.
In order to get lldb-3.9, we need to add additional package sources (see http://llvm.org/apt/ for the other Ubuntu versions not listed here):
sudo apt-get update
sudo apt-get install wget
echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list
echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
Install the lldb packages:
sudo apt-get install lldb-3.9 python-lldb-3.9
To launch lldb:
lldb-3.9
Add the additional package sources:
sudo apt-get update
sudo apt-get install wget
echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial main" | sudo tee /etc/apt/sources.list.d/llvm.list
echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
Install the lldb packages:
sudo apt-get install lldb-3.9 python-lldb-3.9
To launch lldb:
lldb-3.9
Add the additional package sources:
sudo apt-get update
sudo apt-get install wget
echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful main" | sudo tee /etc/apt/sources.list.d/llvm.list
echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
Install the lldb packages:
sudo apt-get install lldb-3.9 python-lldb-3.9
To launch lldb:
lldb-3.9
To install the lldb packages:
sudo apt-get update
sudo apt-get install lldb-3.9 llvm-3.9 python-lldb-3.9
To launch lldb:
lldb-3.9
Currently there is no lldb that works on Alpine.
Issue dotnet#73
[TBD]
lldb 3.9 will have to be built for this distro.
First the prerequisites:
sudo yum install centos-release-SCL epel-release
sudo yum install cmake cmake3 gcc gcc-c++ git libicu libunwind make python27 tar wget which zip
sudo yum install doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz
Now build and install llvm/lldb 3.9 using the script provided here: build-install-lldb.sh.
WARNING: This script installs llvm and lldb as root (via sudo) and may overwrite any previously installed versions.
cd $HOME
git clone https://github.com/dotnet/diagnostics.git
$HOME/diagnostics/documentation/lldb/centos7/build-install-lldb.sh
This will take some time to complete. After the build is finished, run these commands to remove the no longer needed packages:
sudo yum remove doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz
sudo yum clean all
To launch lldb:
lldb-3.9.1
In order to get lldb-5.0 (3.9 doesn't seem to work that well), we need to add additional package sources:
sudo apt-get update
sudo apt-get install wget
echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie main" | sudo tee /etc/apt/sources.list.d/llvm.list
echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-5.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
Install the lldb packages:
sudo apt-get install lldb-5.0 python-lldb-5.0
To launch lldb:
lldb-5.0
sudo apt-get install lldb-3.9 python-lldb-3.9
To launch lldb:
lldb-3.9
sudo dnf install clang cmake findutils git libicu libunwind make python tar wget which zip
sudo dnf install doxygen libedit-devel libxml2-devel python-argparse python-devel readline-devel swig xz
Now build and install llvm/lldb 3.9 using the script provided here: build-install-lldb.sh.
WARNING: This script installs llvm and lldb as root (via sudo) and may overwrite any previously installed versions.
cd $HOME
git clone https://github.com/dotnet/diagnostics.git
$HOME/diagnostics/documentation/lldb/fedora24/build-install-lldb.sh
This will take some time to complete. After the build is finished, run these commands to remove the no longer needed packages:
sudo dnf remove doxygen libedit-devel libxml2-devel readline-devel swig
sudo dnf clean all
To launch lldb:
lldb
sudo dnf install lldb python2-lldb
To launch lldb:
lldb
sudo zypper install cmake gcc-c++ git hostname libicu libunwind lldb-devel llvm-clang llvm-devel make python python-xml tar wget which zip
sudo zypper install doxygen libedit-devel libxml2-devel ncurses-devel python-argparse python-devel readline-devel swig
Now build and install llvm/lldb 3.9 using the script provided here: build-install-lldb.sh.
WARNING: This script installs llvm and lldb as root (via sudo) and may overwrite any previously installed versions.
cd $HOME
git clone https://github.com/dotnet/diagnostics.git
$HOME/diagnostics/documentation/lldb/opensuse/build-install-lldb.sh
This will take some time to complete. After the build is finished, run these commands to remove the no longer needed packages:
sudo zypper rm doxygen libedit-devel libxml2-devel ncurses-devel python-argparse python-devel readline-devel swig
sudo zypper clean -a
To launch lldb:
lldb-3.9.1
[TBD]
[TBD]