Skip to main content
Version: 2.x

Configure Apache Cloudberry Build

Configure the build process

Prepare environment

The build process requires the necessary libraries (e.g., Xerces-C) to be available at the expected locations for configuration and runtime. Prepare the environment using the following commands:

sudo rm -rf /usr/local/cloudberry-db
sudo chmod a+w /usr/local
mkdir -p /usr/local/cloudberry-db/lib
sudo cp -v /usr/local/xerces-c/lib/libxerces-c.so \
/usr/local/xerces-c/lib/libxerces-c-3.*.so \
/usr/local/cloudberry-db/lib
sudo chown -R gpadmin:gpadmin /usr/local/cloudberry-db

Run configure

The configure command sets up the build environment for Apache Cloudberry. This configuration includes several development features and extensions.

cd ~/cloudberry
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
./configure --prefix=/usr/local/cloudberry-db \
--disable-external-fts \
--enable-debug \
--enable-cassert \
--enable-debug-extensions \
--enable-gpcloud \
--enable-ic-proxy \
--enable-mapreduce \
--enable-orafce \
--enable-orca \
--enable-pax \
--enable-pxf \
--enable-tap-tests \
--with-gssapi \
--with-ldap \
--with-libxml \
--with-lz4 \
--with-pam \
--with-perl \
--with-pgport=5432 \
--with-python \
--with-pythonsrc-ext \
--with-ssl=openssl \
--with-uuid=e2fs \
--with-includes=/usr/local/xerces-c/include \
--with-libraries=/usr/local/cloudberry-db/lib

configure options

The configure script is used to prepare the build environment for Apache Cloudberry. It checks for required libraries and sets up the necessary configuration options.

You can run ./configure --help to see a full list of options available for configuring Apache Cloudberry. Below is a list of commonly used options with their descriptions and notes.

note

The build dependencies vary based on which features you enable or disable during configuration. While we've listed the basic required packages in the previous section, you may need additional packages depending on your configuration choices. When you run the ./configure command, it will check and report any missing dependencies that you'll need to install before proceeding with the build.

Also, some packages names vary between different Linux distributions.

OptionDescriptionNotes
--prefix=PREFIXInstallation directory. /usr/local/cbdb is the default value. make install will install all the files in /usr/local/cbdb/bin, /usr/local/cbdb/lib etc.You can specify an installation prefix other than /usr/local/cbdb using --prefix. In this guide, we use /usr/local/cloudberry-db as the installation directory.
--disable-gpfdistDo not use gpfdistEnable gpfdist by default. This requires apr lib and libevent to be installed.
--disable-pxfDo not build PXF.Enable PXF by default.
--enable-orafceBuild with Oracle compatibility functions.
--enable-debugBuild all programs and libraries with debugging symbols.This means that you can run the programs in a debugger to analyze problems. This enlarges the size of the installed executables considerably, and on non-GCC compilers it usually also disables compiler optimization, causing slowdowns. However, having the symbols available is extremely helpful for dealing with any problems that might arise. Currently, this option is recommended for production installations only if you use GCC. But you should always have it on if you are doing development work or running a beta version.
--enable-profilingBuild with profiling enabled.This option is for use only with GCC and when doing development work.
--enable-tap-testsEnable tests using the Perl TAP tools.This requires Perl and Perl module IPC::Run to be installed.
--enable-cassertEnable assertion checks (for debugging)Enables assertion checks in the server, which test for many “cannot happen” conditions. This is invaluable for code development purposes, but the tests can slow down the server significantly. This option is not recommended for production use, but you should have it on for development work or when running a beta version.
--disable-orcaDisable ORCA optimizerORCA is enabled by default. ORCA requires xerces-c library to be installed.
--enable-mapreduceEnable Cloudberry Mapreduce supportThis requires libyaml to be installed.
--enable-gpcloudEnable gpcloud support
--enable-external-ftsEnable external fts support
--enable-ic-proxyEnable interconnect proxy modeThis requires libuv library to be installed.
--enable-paxEnable PAX supportgcc/gcc-c++ 11+, cmake3, protobuf and ZSTD are required, see details here.
--with-includes=DIRSLook for additional header files in DIRSThe Xerces-C is required to build with ORCA.
--with-libraries=DIRSLook for additional libraries in DIRSThe library xerces-c is required to build with ORCA
--with-pgport=PORTNUMSet default port number [5432]--with-pgport=5432 is used in this guide.
--with-llvmBuild with LLVM based JIT supportThis requires the LLVM library to be installed.
--with-icuBuild with ICU supportThis requires the ICU4C package to be installed.
--with-perlBuild Perl modules (PL/Perl)This requires Perl devel packages to be installed.
--with-pythonBuild Python modules (PL/Python)This requires Python3 devel packages to be installed.
--with-pythonsrc-extBuild Python modules for gpMgmtRecommended options. It's used for gpMgmt tools. If you don't build with this option, you will need to install the Python packages from the Linux distros after installing Cloudberry: psutil, pygresql, pyyaml.
--with-gssapiBuild with GSSAPI supportThe GSSAPI system is usually a part of the Kerberos installation, so this requires the krb5 package to be installed.
--with-pamBuild with PAM (Pluggable Authentication Modules) support.This requires the PAM package to be installed.
--with-ldapBuild with LDAP support for authentication and connection parameter lookup.This requires the OpenLDAP package to be installed.
--with-uuid=LIBBuild contrib/uuid-ossp module using LIB (bsd,e2fs,ossp).
  • bsd to use the UUID functions found in FreeBSD and some other BSD-derived systems
  • e2fs to use the UUID library created by the e2fsprogs project; this library is present in most Linux systems and in macOS, and can be obtained for other platforms as well
  • ossp to use the OSSP UUID library
So we use --with-uuid=e2fs in the build under Linux/macOS - this requires the uuid library to be installed.
--with-libxmlBuild with libxml2, enabling SQL/XML support.This requires libxml2 to be installed.
--with-lz4Build with LZ4 compression supportThis allows the use of LZ4 for compression of table data and lz4 library is required to be installed.
--with-quicklzBuild with QuickLZ supportThis requires quicklz library to be installed.
--with-ssl=LIBBuild with support for SSL (encrypted) connections.The only LIBRARY supported is openssl, so --with-ssl=openssl is used in this guide. This requires the OpenSSL package to be installed.