Skip to content

Commit 04d494d

Browse files
authored
Revert "Update Ubuntu 16.04 images (#3336)"
This reverts commit b5bca68.
1 parent 3f0280d commit 04d494d

File tree

5 files changed

+272
-39
lines changed

5 files changed

+272
-39
lines changed

diagnostics.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ stages:
193193
parameters:
194194
name: Linux_cross
195195
osGroup: Linux
196-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm-20220831130722-70ed2e8
196+
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20210719121212-8a8d3be
197197
crossrootfsDir: '/crossrootfs/arm'
198198
buildAndSkipTest: true
199199
strategy:
@@ -207,7 +207,7 @@ stages:
207207
parameters:
208208
name: Linux_cross64
209209
osGroup: Linux
210-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm64-20220831130722-70ed2e8
210+
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be
211211
crossrootfsDir: '/crossrootfs/arm64'
212212
buildAndSkipTest: true
213213
strategy:
@@ -221,7 +221,7 @@ stages:
221221
parameters:
222222
name: Alpine_cross64
223223
osGroup: Linux
224-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-cross-arm64-alpine-20220831130722-70ed2e8
224+
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210923140502-78f7860
225225
crossrootfsDir: '/crossrootfs/arm64'
226226
artifactsTargetPath: bin/Linux-musl.arm64.Release
227227
buildAndSkipTest: true
@@ -281,9 +281,9 @@ stages:
281281

282282
- template: /eng/build.yml
283283
parameters:
284-
name: Ubuntu_18_04
284+
name: Ubuntu_16_04
285285
osGroup: Linux
286-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-3e800f1-20190508143252
286+
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-09ca40b-20190520220842
287287
dependsOn: CentOS_7
288288
testOnly: true
289289
strategy:
@@ -294,9 +294,9 @@ stages:
294294

295295
- template: /eng/build.yml
296296
parameters:
297-
name: Ubuntu_22_04
297+
name: Ubuntu_18_04
298298
osGroup: Linux
299-
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-20220831130452-94fc78a
299+
dockerImage: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-3e800f1-20190508143252
300300
dependsOn: CentOS_7
301301
testOnly: true
302302
strategy:
Lines changed: 184 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,210 @@
1-
Linux Prerequisites
1+
Linux Prerequisites
22
===================
33

44
These instructions will lead you through preparing to build and test the diagnostics repo on Linux. We'll start by showing how to set up your environment from scratch. In some cases, a version lldb/llvm that works the best on the distro will have to be built and installed.
55

66
Toolchain Setup
77
---------------
88

9-
SOS plugin requires lldb v3.9 and above. It is recommended to use latest version of llvm toolchain, but any version >= 3.9 should work.
9+
The following instructions will install the required packages. This only needs to be done once per machine. These instructions assume that you already have "sudo" installed. It is also recommended to create a github fork of the diagnostics repo and cloning that instead of https://github.com/dotnet/diagnostics.git directly.
1010

1111
To build or cross build for ARM on Windows or Linux see the instructions [here](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/cross-building.md#generating-the-rootfs) in the runtime repo. You will need to clone the runtime [repo](https://github.com/dotnet/runtime.git) and build the appropriate "rootfs" for arm or arm64 using these instructions. You only need to do this once.
1212

13-
Other prerequisites are:
13+
#### Ubuntu 14.04 ####
1414

15-
* cmake
16-
* python
17-
* icu
15+
In order to get clang-3.9, llvm-3.9 and lldb-3.9, we need to add additional package sources (see [http://llvm.org/apt/](http://llvm.org/apt/) for the other Ubuntu versions not listed here):
1816

19-
Examples
20-
--------
17+
sudo apt-get update
18+
sudo apt-get install wget
19+
echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main" | sudo tee /etc/apt/sources.list.d/llvm.list
20+
echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
21+
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
22+
sudo apt-get update
2123

22-
Debian/Ubuntu:
24+
Then install the required packages:
2325

24-
```sh
25-
sudo apt install cmake clang curl gdb gettext git libicu-dev lldb liblldb-dev libunwind8 llvm make python python-lldb tar wget zip
26-
```
26+
sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python python-lldb-3.9 tar zip
2727

28-
Alpine:
28+
The lldb 3.9 package needs a lib file symbolic link fixed:
2929

30-
```sh
31-
sudo apk add autoconf bash clang clang-dev cmake coreutils curl gcc gettext-dev git icu-dev krb5-dev libunwind-dev llvm make openssl openssl-dev python which
32-
```
30+
cd /usr/lib/llvm-3.9/lib
31+
sudo ln -s ../../x86_64-linux-gnu/liblldb-3.9.so.1 liblldb-3.9.so.1
3332

34-
CentOS/Fedora/RHEL:
33+
See the section below on how to clone, build and test the repo.
3534

36-
```sh
37-
# on older OS versions, replace `dnf` with `yum`
38-
sudo dnf install clang cmake openssl findutils gdb git libicu libunwind lldb-devel llvm-devel make python python2-lldb tar wget which zip
39-
```
35+
#### Ubuntu 16.04 ####
4036

41-
OpenSuse:
37+
Add the additional package sources:
4238

43-
```sh
44-
sudo zypper install cmake gcc-c++ gdb git hostname libicu libunwind lldb-devel llvm-clang llvm-devel make python python-xml tar wget which zip
45-
```
39+
sudo apt-get update
40+
sudo apt-get install wget
41+
echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial main" | sudo tee /etc/apt/sources.list.d/llvm.list
42+
echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
43+
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
44+
sudo apt-get update
45+
46+
Then install the required packages:
47+
48+
sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python python-lldb-3.9 tar zip
49+
50+
The lldb 3.9 package needs a lib file symbolic link fixed:
51+
52+
cd /usr/lib/llvm-3.9/lib
53+
sudo ln -s ../../x86_64-linux-gnu/liblldb-3.9.so.1 liblldb-3.9.so.1
54+
55+
See the section below on how to clone, build and test the repo.
56+
57+
#### Ubuntu 17.10 ####
58+
59+
Add the additional package sources:
60+
61+
sudo apt-get update
62+
sudo apt-get install wget
63+
echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful main" | sudo tee /etc/apt/sources.list.d/llvm.list
64+
echo "deb http://llvm.org/apt/artful/ llvm-toolchain-artful-3.9 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
65+
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
66+
sudo apt-get update
67+
68+
Then install the required packages:
69+
70+
sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python python-lldb-3.9 tar zip
71+
72+
#### Ubuntu 18.04 ####
73+
74+
Install the required packages:
75+
76+
sudo apt-get update
77+
sudo apt-get install cmake clang-3.9 curl gdb gettext git libicu-dev libssl1.0-dev lldb-3.9 liblldb-3.9-dev libunwind8 llvm-3.9 make python-lldb-3.9 tar wget zip
78+
79+
See the section below on how to clone, build and test the repo.
80+
81+
#### Ubuntu 20.04 ####
82+
83+
Install the required packages:
84+
85+
sudo apt update
86+
sudo apt install cmake clang curl gdb gettext git libicu-dev lldb liblldb-dev libunwind8 llvm make python python-lldb tar wget zip
87+
88+
See the section below on how to clone, build and test the repo.
89+
#### Alpine 3.8/3.9 ####
90+
91+
Install the required packages:
92+
93+
sudo apk add autoconf bash clang clang-dev cmake coreutils curl gcc gettext-dev git icu-dev krb5-dev libunwind-dev llvm make openssl openssl-dev python which
94+
95+
#### CentOS 6 ####
96+
97+
[TBD]
98+
99+
#### CentOS 7 ####
100+
101+
llvm, clang and lldb 3.9 will have to be built for this distro.
102+
103+
First the prerequisites:
104+
105+
sudo yum install centos-release-SCL epel-release
106+
sudo yum install cmake cmake3 gcc gcc-c++ gdb git libicu libunwind make python27 tar wget which zip
107+
108+
Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/centos7/build-install-lldb.sh).
109+
110+
WARNING: this script installs llvm and lldb and may overwrite any previously installed versions.
111+
112+
cd $HOME
113+
git clone https://github.com/dotnet/diagnostics.git
114+
$HOME/diagnostics/documentation/lldb/centos7/build-install-lldb.sh
115+
116+
This will take some time to complete, but after it is finished all the required components will be built and installed. To build and test the repo:
117+
118+
cd diagnostics
119+
./build.sh
120+
./test.sh
121+
122+
#### Debian 8.2/8.7 ####
123+
124+
In order to get lldb-5.0 (3.9 doesn't seem to work that well on 8.x), we need to add additional package sources:
125+
126+
sudo apt-get update
127+
sudo apt-get install wget
128+
echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie main" | sudo tee /etc/apt/sources.list.d/llvm.list
129+
echo "deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-5.0 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
130+
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
131+
sudo apt-get update
132+
133+
Then install the packages you need:
134+
135+
sudo apt-get install cmake clang-5.0 gdb gettext git libicu-dev liblldb-5.0-dev libunwind8 lldb-5.0 llvm make python-lldb-5.0 tar wget zip
136+
137+
See the section below on how to clone, build and test the repo. Add "--clang5.0" to the ./build.sh command.
138+
139+
#### Debian 9 (Stretch) ####
140+
141+
sudo apt-get install cmake clang-3.9 gdb gettext git libicu-dev liblldb-3.9-dev libunwind8 lldb-3.9 llvm make python-lldb-3.9 tar wget zip
142+
143+
See the section below on how to clone, build and test the repo.
144+
145+
#### Fedora 24 ####
146+
147+
sudo dnf install clang cmake findutils gdb git libicu libunwind make python tar wget which zip
148+
149+
Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/fedora24/build-install-lldb.sh).
150+
151+
WARNING: this script installs llvm and lldb and may overwrite any previously installed versions.
152+
153+
cd $HOME
154+
git clone https://github.com/dotnet/diagnostics.git
155+
$HOME/diagnostics/documentation/lldb/fedora24/build-install-lldb.sh
156+
157+
This will take some time to complete, but after it is finished all the required components will be built and installed. To build and test the repo:
158+
159+
cd diagnostics
160+
./build.sh
161+
./test.sh
162+
163+
#### Fedora 27, 28, 29 ####
164+
165+
sudo dnf install clang cmake compat-openssl10 findutils gdb git libicu libunwind lldb-devel llvm-devel make python python2-lldb tar wget which zip
166+
167+
See the section below on how to clone, build and test the repo.
168+
169+
#### OpenSuse 42.1, 42.3 ####
170+
171+
sudo zypper install cmake gcc-c++ gdb git hostname libicu libunwind lldb-devel llvm-clang llvm-devel make python python-xml tar wget which zip
172+
ln -s /usr/bin/clang++ /usr/bin/clang++-3.5
173+
174+
Now build and install llvm/lldb 3.9 using the script provided here: [build-install-lldb.sh](../lldb/opensuse/build-install-lldb.sh).
175+
176+
WARNING: this script installs llvm and lldb and may overwrite any previously installed versions.
177+
178+
cd $HOME
179+
git clone https://github.com/dotnet/diagnostics.git
180+
$HOME/diagnostics/documentation/lldb/opensuse/build-install-lldb.sh
181+
182+
This will take some time to complete, but after it is finished all the required components will be built and installed. To build and test the repo:
183+
184+
cd diagnostics
185+
./build.sh
186+
./test.sh
187+
188+
#### RHEL 7.5 ####
189+
190+
[TBD]
191+
192+
#### SLES ####
193+
194+
[TBD]
195+
196+
Set the maximum number of file-handles
197+
--------------------------------------
198+
199+
To ensure that your system can allocate enough file-handles for the build run `sysctl fs.file-max`. If it is less than 100000, add `fs.file-max = 100000` to `/etc/sysctl.conf`, and then run `sudo sysctl -p`.
46200

47201
Clone, build and test the repo
48202
------------------------------
49203

50204
You now have all the required components. To clone, build and test the repo:
51205

52-
```sh
53-
cd $HOME
54-
git clone https://github.com/dotnet/diagnostics.git
55-
cd diagnostics
56-
./build.sh
57-
./test.sh
58-
```
206+
cd $HOME
207+
git clone https://github.com/dotnet/diagnostics.git
208+
cd diagnostics
209+
./build.sh
210+
./test.sh
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cd $HOME
2+
wget http://ftp.gnu.org/gnu/binutils/binutils-2.29.1.tar.xz
3+
wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz
4+
wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz
5+
wget http://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz
6+
wget http://releases.llvm.org/3.9.1/compiler-rt-3.9.1.src.tar.xz
7+
8+
tar -xf binutils-2.29.1.tar.xz
9+
tar -xf llvm-3.9.1.src.tar.xz
10+
mkdir llvm-3.9.1.src/tools/clang
11+
mkdir llvm-3.9.1.src/tools/lldb
12+
mkdir llvm-3.9.1.src/projects/compiler-rt
13+
tar -xf cfe-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/clang
14+
tar -xf lldb-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/lldb
15+
tar -xf compiler-rt-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/projects/compiler-rt
16+
rm binutils-2.29.1.tar.xz
17+
rm cfe-3.9.1.src.tar.xz
18+
rm lldb-3.9.1.src.tar.xz
19+
rm llvm-3.9.1.src.tar.xz
20+
rm compiler-rt-3.9.1.src.tar.xz
21+
22+
mkdir llvmbuild
23+
cd llvmbuild
24+
cmake3 -DCMAKE_BUILD_TYPE=Release -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=1 -DLLVM_BINUTILS_INCDIR=../binutils-2.29.1/include ../llvm-3.9.1.src
25+
make -j $(($(getconf _NPROCESSORS_ONLN)+1))
26+
sudo make install
27+
cd ..
28+
rm -r llvmbuild
29+
rm -r llvm-3.9.1.src
30+
rm -r binutils-2.29.1
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cd $HOME
2+
wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz
3+
wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz
4+
wget http://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz
5+
6+
tar -xf llvm-3.9.1.src.tar.xz
7+
mkdir llvm-3.9.1.src/tools/clang
8+
mkdir llvm-3.9.1.src/tools/lldb
9+
tar -xf cfe-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/clang
10+
tar -xf lldb-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/lldb
11+
rm cfe-3.9.1.src.tar.xz
12+
rm lldb-3.9.1.src.tar.xz
13+
rm llvm-3.9.1.src.tar.xz
14+
15+
mkdir llvmbuild
16+
cd llvmbuild
17+
cmake -DCMAKE_BUILD_TYPE=Release -DLLDB_DISABLE_CURSES=1 -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=1 -DLLVM_BUILD_DOCS=0 ../llvm-3.9.1.src
18+
19+
make -j $(($(getconf _NPROCESSORS_ONLN)+1))
20+
sudo make install
21+
cd ..
22+
rm -r llvmbuild
23+
rm -r llvm-3.9.1.src
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cd $HOME
2+
3+
wget http://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz
4+
wget http://releases.llvm.org/3.9.1/cfe-3.9.1.src.tar.xz
5+
wget http://releases.llvm.org/3.9.1/llvm-3.9.1.src.tar.xz
6+
wget http://releases.llvm.org/3.9.1/lldb-3.9.1.src.tar.xz
7+
8+
tar -xf cmake-3.11.4-Linux-x86_64.tar.gz
9+
tar -xf llvm-3.9.1.src.tar.xz
10+
mkdir llvm-3.9.1.src/tools/clang
11+
mkdir llvm-3.9.1.src/tools/lldb
12+
tar -xf cfe-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/clang
13+
tar -xf lldb-3.9.1.src.tar.xz --strip 1 -C llvm-3.9.1.src/tools/lldb
14+
rm cmake-3.11.4-Linux-x86_64.tar.gz
15+
rm cfe-3.9.1.src.tar.xz
16+
rm lldb-3.9.1.src.tar.xz
17+
rm llvm-3.9.1.src.tar.xz
18+
19+
mkdir llvmbuild
20+
cd llvmbuild
21+
../cmake-3.11.4-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release -DLLDB_DISABLE_CURSES=1 -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=1 -DLLVM_BUILD_DOCS=0 ../llvm-3.9.1.src
22+
23+
make -j $(($(getconf _NPROCESSORS_ONLN)+1))
24+
sudo make install
25+
cd ..
26+
rm -r llvmbuild
27+
rm -r llvm-3.9.1.src
28+
rm -r cmake-3.11.4-Linux-x86_64

0 commit comments

Comments
 (0)