Skip to content

Commit ef4044a

Browse files
authored
Merge pull request #629 from mcserep/ubuntu2204
Update build instructions for Ubuntu 22.04
2 parents 3548957 + c6eeaa8 commit ef4044a

3 files changed

Lines changed: 52 additions & 37 deletions

File tree

doc/deps.md

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build Environment
22
We build CodeCompass in a Linux environment. Currently, Ubuntu Long-Term
3-
Support releases are the main targets: Ubuntu 18.04 LTS and Ubuntu 20.04 LTS.
3+
Support releases are the main targets: Ubuntu 20.04 LTS and Ubuntu 22.04 LTS.
44

55
We also provide a Docker image that can be used as developer environment to
66
CodeCompass. See its usage [in a seperate document](/docker/README.md).
@@ -19,6 +19,7 @@ be installed from the official repository of the given Linux distribution.
1919
LLVM/Clang for parsing the source code.
2020
- **`odb`**, **`libodb-dev`**: For persistence ODB can be used which is an
2121
Object Relation Mapping (ORM) system.
22+
***See [Known issues](#known-issues)!***
2223
- **`libsqlite3-dev`**, **`libodb-sqlite-dev`**: SQLite library and the
2324
corresponding ODB development library, in case SQLite database system is
2425
used.
@@ -27,14 +28,17 @@ be installed from the official repository of the given Linux distribution.
2728
database system is used.
2829
- **`default-jdk`**: For search parsing CodeCompass uses an indexer written in
2930
Java.
30-
- **`thrift-compiler`**, **`libthrift-dev`**: Thrift is used as the Web RPC API.
31+
- **`thrift-compiler`**, **`libthrift-dev`**: Thrift is used as the Web RPC API.
32+
***See [Known issues](#known-issues)!***
3133
- **`libssl-dev`** / **`libssl1.0-dev`**: OpenSSL libs are required by Thrift,
3234
and NodeJS.
3335
- **`libgraphviz-dev`**: GraphViz is used for generating diagram
3436
visualizations.
3537
- **`libmagic-dev`**: For detecting file types.
3638
- **`libgit2-dev`**: For compiling Git plugin in CodeCompass.
37-
- **`npm`**: For handling JavaScript dependencies for CodeCompass web GUI.
39+
- **`node`** and **`npm`**: For building and developing the CodeCompass web GUI
40+
and managing dependencies.
41+
***See [Known issues](#known-issues)!***
3842
- **`ctags`**: For search parsing.
3943
- **`doxygen`**: For documentation generation.
4044
- **`libgtest-dev`**: For testing CodeCompass.
@@ -46,31 +50,22 @@ be installed from the official repository of the given Linux distribution.
4650
The following command installs the packages except for those which have some
4751
known issues.
4852

49-
#### Ubuntu 18.04 ("Bionic Beaver") LTS
50-
51-
```bash
52-
sudo apt install git cmake make g++ gcc-7-plugin-dev libboost-all-dev \
53-
llvm-10-dev clang-10 libclang-10-dev \
54-
default-jdk libssl1.0-dev libgraphviz-dev libmagic-dev libgit2-dev ctags doxygen \
55-
libldap2-dev libgtest-dev npm
56-
```
57-
5853
#### Ubuntu 20.04 ("Focal Fossa") LTS
5954

6055
```bash
6156
sudo apt install git cmake make g++ libboost-all-dev \
6257
llvm-11-dev clang-11 libclang-11-dev \
6358
odb libodb-dev thrift-compiler libthrift-dev \
6459
default-jdk libssl-dev libgraphviz-dev libmagic-dev libgit2-dev ctags doxygen \
65-
libldap2-dev libgtest-dev npm
60+
libldap2-dev libgtest-dev
6661
```
6762

6863
#### Ubuntu 22.04 ("Jammy Jellyfish") LTS
6964

7065
```bash
71-
sudo apt install git curl wget cmake make libboost-all-dev \
72-
g++ gcc-11-plugin-dev \
66+
sudo apt install git cmake make g++ libboost-all-dev \
7367
llvm-11-dev clang-11 libclang-11-dev \
68+
gcc-11-plugin-dev \
7469
default-jdk libssl-dev libgraphviz-dev libmagic-dev libgit2-dev exuberant-ctags doxygen \
7570
libldap2-dev libgtest-dev
7671
```
@@ -80,32 +75,22 @@ sudo apt install git curl wget cmake make libboost-all-dev \
8075
Depending on the desired database engines to be supported, the following
8176
packages should be installed:
8277

83-
##### Ubuntu 18.04 ("Bionic Beaver")
84-
85-
The database connector library must be compiled manually for this release,
86-
however, the database programs themselves should be installed from the
87-
package manager.
88-
89-
```bash
90-
# For SQLite database systems:
91-
sudo apt install libsqlite3-dev
92-
93-
# For PostgreSQL database systems:
94-
sudo apt install postgresql-server-dev-<version>
95-
```
96-
9778
##### Ubuntu 20.04 ("Focal Fossa") LTS
9879

9980
```bash
10081
# For SQLite database systems:
10182
sudo apt install libodb-sqlite-dev libsqlite3-dev
10283

10384
# For PostgreSQL database systems:
104-
sudo apt install libodb-pgsql-dev postgresql-server-dev-<version>
85+
sudo apt install libodb-pgsql-dev postgresql-server-dev-12
10586
```
10687

10788
##### Ubuntu 22.04 ("Jammy Jellyfish") LTS
10889

90+
The database connector library must be compiled manually for this release,
91+
however, the database programs themselves should be installed from the
92+
package manager.
93+
10994
```bash
11095
# For SQLite database systems:
11196
sudo apt install libsqlite3-dev
@@ -125,10 +110,10 @@ by other processes which could, in extreme cases, make the system very hard or
125110
impossible to recover. **Please do NOT add a `sudo` in front of any `make` or
126111
other commands below, unless *explicitly* specified!**
127112

128-
### ODB (for Ubuntu 18.04, Ubuntu 22.04)
113+
### ODB (for Ubuntu 22.04)
129114
ODB is an Object Relational Mapping tool, that is required by CodeCompass.
130-
For Ubuntu 18.04, the official release of ODB conflicts with the official
131-
compiler (GNU G++ 7) of the distribution. A newer version of ODB must be
115+
For Ubuntu 22.04, the official release of ODB conflicts with the official
116+
compiler (GNU G++ 11) of the distribution. A newer version of ODB must be
132117
compiled manually.
133118

134119
The ODB installation uses the build2 build system. (Build2 is not needed for
@@ -172,11 +157,12 @@ time (depending on the machine one is using).
172157
> **Note:** now you may delete the *Build2* toolchain installed in the
173158
> `<build2_install_dir>` folder, if you do not need any longer.
174159
175-
### Thrift (for Ubuntu 18.04, Ubuntu 22.04)
160+
### Thrift (for Ubuntu 22.04)
176161
CodeCompass needs [Thrift](https://thrift.apache.org/) which provides Remote
177162
Procedure Call (RPC) between the server and the client. A suitable version of
178163
Thrift is, unfortunately, not part of the official Ubuntu repositories for
179-
these versions, so you should download and build from source.
164+
this version (only a newer version is available), so you should download and
165+
build from source.
180166

181167
Thrift can generate stubs for many programming languages. The configure
182168
script looks at the development environment and if it finds the environment
@@ -211,6 +197,30 @@ cd thrift-0.13.0
211197
make install -j $(nproc)
212198
```
213199

200+
### Node.js and NPM
201+
Make sure you are using at least version 18 of [Node.js](https://nodejs.org/en/).
202+
Unfortunately only older versions are available in the official Ubuntu repositories
203+
for all supported versions, therefore a separate installation might be required from
204+
[NodeSource](https://github.com/nodesource/distributions).
205+
206+
```bash
207+
# Download and import the Nodesource GPG key
208+
sudo mkdir -p /etc/apt/keyrings
209+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
210+
211+
# Create deb repository
212+
NODE_MAJOR=18 # or 20
213+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
214+
215+
# Run Update and Install
216+
sudo apt-get update
217+
sudo apt-get install nodejs
218+
```
219+
220+
You can also download [nvm](https://github.com/nvm-sh/nvm), and run `nvm install`
221+
at the root of the project to use the specified Node version (18.13.0).
222+
223+
214224
### GTest/Googletest
215225
The `libgtest-dev` package contains only the source files of GTest, but the
216226
binaries are missing. You have to compile GTest manually.
@@ -232,9 +242,10 @@ The previously self-compiled and installed dependencies are not automatically
232242
seen by CMake. Please set this environment before executing the build.
233243

234244
```bash
245+
# For all supported OS versions:
235246
export GTEST_ROOT=<gtest_install_dir>
236247

237-
# If using Ubuntu 18.04 or Ubuntu 22.04:
248+
# If using Ubuntu 22.04:
238249
export CMAKE_PREFIX_PATH=<thrift_install_dir>:$CMAKE_PREFIX_PATH
239250
export CMAKE_PREFIX_PATH=<odb_install_directory>:$CMAKE_PREFIX_PATH
240251

doc/usage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ PostgreSQL can be installed from the package manager:
1919

2020
```bash
2121
sudo apt install postgresql-<version>
22-
# (e.g. postgresql-12)
22+
# (e.g. postgresql-12 for Ubuntu 20.04
23+
# and postgresql-14 for Ubuntu 22.04)
2324
```
2425

2526
This will set up an automatically starting local server on the default port

webgui-new/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,8 @@
5353
"recharts": "^2.5.0",
5454
"sass": "^1.57.1",
5555
"thrift": "0.13.0-hotfix.1"
56+
},
57+
"engines": {
58+
"node": ">=18"
5659
}
5760
}

0 commit comments

Comments
 (0)