11# Build Environment
22We build CodeCompass in a Linux environment. Currently, Ubuntu Long-Term
3- Support releases are the main targets: Ubuntu 22.04 LTS (and Ubuntu 24.04 LTS
4- is planned).
3+ Support releases are the main targets: Ubuntu 22.04 LTS and Ubuntu 24.04 LTS.
54
65We also provide a Docker image that can be used as developer environment to
7- CodeCompass. See its usage [ in a seperate document] ( /docker/README.md ) .
6+ CodeCompass. See its usage [ in a separate document] ( /docker/README.md ) .
87
98# Dependencies
109The following third-party tools are needed for building CodeCompass. These can
@@ -61,14 +60,19 @@ sudo apt install git cmake make g++ libboost-all-dev \
6160 libldap2-dev libgtest-dev
6261```
6362
64- #### Database engine support
63+ #### Ubuntu 24.04 ("Noble Numbat") LTS
6564
66- Depending on the desired database engines to be supported, the following
67- packages should be installed.
65+ ``` bash
66+ sudo apt install git cmake make g++ libboost-all-dev \
67+ llvm-15-dev clang-15 libclang-15-dev \
68+ gcc-13-plugin-dev\
69+ default-jdk libssl-dev libgraphviz-dev libmagic-dev libgit2-dev exuberant-ctags doxygen \
70+ libldap2-dev libgtest-dev
71+ ```
6872
69- ##### Ubuntu 22.04 ("Jammy Jellyfish") LTS
73+ #### Database engine support
7074
71- The database connector library must be compiled manually for this release ,
75+ While the database connector library must be compiled manually,
7276however, the database programs themselves should be installed from the
7377package manager.
7478
@@ -77,7 +81,8 @@ package manager.
7781sudo apt install libsqlite3-dev
7882
7983# For PostgreSQL database systems:
80- sudo apt install postgresql-server-dev-14
84+ sudo apt install postgresql-server-dev-14 # for Ubuntu 22.04
85+ sudo apt install postgresql-server-dev-16 # for Ubuntu 24.04
8186```
8287
8388## Known issues
@@ -91,11 +96,11 @@ by other processes which could, in extreme cases, make the system very hard or
9196impossible to recover. ** Please do NOT add a ` sudo ` in front of any ` make ` or
9297other commands below, unless * explicitly* specified!**
9398
94- ### ODB (for Ubuntu 22.04)
99+ ### ODB
95100ODB is an Object Relational Mapping tool, that is required by CodeCompass.
96- For Ubuntu 22.04, the official release of ODB conflicts with the official
97- compiler (GNU G++ 11) of the distribution. A newer version of ODB must be
98- compiled manually.
101+ Both for Ubuntu 22.04 and 24.04 , the official release of ODB conflicts with the
102+ official compiler (GNU G++ 11/13 ) of the distribution. A newer version of ODB
103+ must be compiled manually.
99104
100105The ODB installation uses the build2 build system. (Build2 is not needed for
101106CodeCompass so you may delete it right after the installation of ODB.)
@@ -138,6 +143,46 @@ time (depending on the machine one is using).
138143> ** Note:** now you may delete the * Build2* toolchain installed in the
139144> ` <build2_install_dir> ` folder, if you do not need any longer.
140145
146+ ### Thrift (for Ubuntu 24.04)
147+ CodeCompass needs [ Thrift] ( https://thrift.apache.org/ ) which provides Remote
148+ Procedure Call (RPC) between the server and the client. A suitable version of
149+ Thrift is, unfortunately, not part of the official Ubuntu repositories for
150+ this version (only a newer version is available), so you should download and
151+ build from source.
152+
153+ Thrift can generate stubs for many programming languages. The configure
154+ script looks at the development environment and if it finds the environment
155+ for a given language then it'll use it. For example in the previous step npm
156+ was installed which requires NodeJS. If NodeJS can be found on your machine
157+ then the corresponding stub will also compile. If you don't need it then you
158+ can turn it off: ` ./configure --without-nodejs ` .
159+
160+ In certain cases, installation may fail if development libraries for
161+ languages are not installed on the target machine. E.g. if Python is
162+ installed but the Python development headers are not, Thrift will unable to
163+ install. Python, PHP and such other Thrift builds are NOT required by
164+ CodeCompass, and can significantly increase compile time so it is advised to
165+ avoid using them if it's not necessary.
166+
167+ ``` bash
168+ # Download and uncompress Thrift:
169+ wget " http://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=thrift/0.16.0/thrift-0.16.0.tar.gz" \
170+ -O thrift-0.16.0.tar.gz
171+ tar -xvf ./thrift-0.16.0.tar.gz
172+ cd thrift-0.16.0
173+
174+ ./configure --prefix=< thrift_install_dir> --silent --without-python \
175+ --enable-libtool-lock --enable-tutorial=no --enable-tests=no \
176+ --with-libevent --with-zlib --without-nodejs --without-lua \
177+ --without-ruby --without-csharp --without-erlang --without-perl \
178+ --without-php --without-php_extension --without-dart \
179+ --without-haskell --without-go --without-rs --without-haxe \
180+ --without-dotnetcore --without-d --without-qt4 --without-qt5 \
181+ --without-java --without-swift
182+
183+ make install -j $( nproc)
184+ ```
185+
141186### Node.js and NPM
142187Make sure you are using at least version 18.17 of [ Node.js] ( https://nodejs.org/en/ ) .
143188Unfortunately only older versions are available in the official Ubuntu repositories
0 commit comments