How to Download CUBRID Source Code and Build it
As someone who has not used CUBRID before, you need to know how to get started. You are just starting a very enjoyable journey and we warmly welcome you to CUBRID and encourage you to read the following steps.
Requirements for the Building Process
Even though the following tutorial is based on the system currently being developed, which is CUBRID for Linux CentOS 5.x., on most operating systems you will be able to build CUBRID following the steps below.
Tools to Create a Makefile
- libtoolize (GNU libtool) 1.5.22
- aclocal (GNU automake) 1.9.6
- autoconf (GNU Autoconf) 2.59
- automake (GNU automake) 1.9.6
- GNU Make 3.81
Libraries and Tools to Build the CUBRID Source
- J2SDK : jdk1.5.0_15
- ANT : Apache Ant version 1.6.5 compiled on January 6 2007
- elfutils-libelf
- libtermcap
- libcurses
- libncurses
- lzo : (included in external/lzo-2.03)
- PCRE : (included in external/pcre-7.6)
- GC : (included in external/gc6.7)
- libedit : (included in external/libedit-20070831-2.10)
- In the CUBRID source, it is recommended to use those included in external. Some systems are not compatible with the libraries included in CUBRID.
- Note
- Sun JAVA J2SDK may not be able to find the included header file jni.h jni_md.h. Then, copy the header file to the include directory of CUBRID. Even when SDK is set up correctly, it may not find the header file in some cases.
- Elfutils needs files other than nlist.h, and these files are installed in most operating systems by default. However, some operating systems do not have the files, so install them.
How to Download Source
Because CUBRID consists of more than 1000 files, it may take different time for source to be downloaded. It depends on your network connection if you checkout from the Sourceforge.net Subversion (SVN) Repository.
To download the CUBRID source code, approximately 300 MB free space is required. Additionally around 200 MB free space is required, because many object files and executable files are created during the building process.
- Create a folder to store the source. The folder name must be in English without a space.
- Download the source code by running the SVN client. Run it at the prompt as shown below or use a GUI client such as TortoiseSVN.
How to Download the Released Source
Since the released source code is managed with the tag, anyone can download the most recent source code. The tag for a release version is shown below:
- Release version: CUBRID 2008 R2.0
- Tag name: 2008_R2.0
How to Build
The build process is different depending on the operating system platform, so you need to build according to your platform.
Building on Linux
It is assumed that the directory of the source is the cubrid_src in the user directory.
- Move to the directory where the source is stored.
- Execute autogen.sh.
- Execute the configure script.
- Build by using make.
- Install by using make install.
- Modify .bashrc to configure environment variables.
- Register the environment variables.
- Create a databases directory.
- When CUBRID is successfully built, test it by referring to the demo database.
[user@host] cd $HOME/cubrid_src
[user@host] ./autogen.sh
--prefix=$HOME/cubrid
It specifies a directory to be installed. In order to build a debugging version, add the --enable-debug option. CUBRID 2008 R2.0 or higher supports 64-bit, so add the --enable-64bit option to build in a 64-bit environment.
[user@host] ./configure --prefix=$HOME/cubrid
If this configuration does not work properly, execute the following and then retry configure.
[user@host] libtoolize --copy --force
[user@host] make
[user@host] make install
[user@host] vim ~/.bashrc
export CUBRID=$HOME/cubrid
export CUBRID_DATABASES=$CUBRID/databases
export CUBRID_LANG=En_US
export PATH=$CUBRID/bin:$PATH
export LD_LIBRARY_PATH=$CUBRID/lib:$LD_LIBRARY_PATH
[user@host] source ~/.bashrc
[user@host] mkdir -p $CUBRID_DATABASES
Building on Windows
It is assumed that the path where the source is checked out is c:cubrid.
- Run the "Visual Studio 2008 command Prompt."
- Move to the win folder under the trunk.
- Build by running devenv.exe. The build process is stored in the build.res.
- Copy the build files to the installation folder. The build files are located in C:cubrid runkwininstallRelease.
- When the CUBRID build is successfully installed, test it by referring to the demo database.

C:> cd c:cubrid runkwin
C:cubrid runkwin> devenv.exe /rebuild
Release cubrid.sln /out .build.res
Note: When building CUBRID R2.0 or earlier, cygwin1.dll is required to run winpcctsantlr.exe and winpcctsdlg.exe. If they are not included in Windows, first, install cygwin before starting the build process. CUBRID R2.0 or higher does not use the antlr parser, so cygwin is not required.