Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

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 (or libncurses5)
  • texinfo
  • flex
  • 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 CUBRID SVN and 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.

  1. Create a folder to store the source. The folder name must be in English without a space.
  2. 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.

  1. Move to the directory where the source is stored.
  2. [user@host] cd $HOME/cubrid_src

  3. Execute
  4. [user@host] ./

  5. Execute the configure script.
  6. --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

  7. Build by using make.
  8. [user@host] make

  9. Install by using make install.
  10. [user@host] make install

  11. Modify .bashrc to configure environment variables.
  12. [user@host] vim ~/.bashrc

    export CUBRID=$HOME/cubrid

    export CUBRID_DATABASES=$CUBRID/databases

    //For CUBRID 8.4.x and 8.2.x versions
    export CUBRID_LANG=En_US

    //For CUBRID 9.1 or higher versions. Note: CUBRID_LANG is no longer used!
    export CUBRID_CHARSET=en_US

    export PATH=$CUBRID/bin:$PATH


  13. Register the environment variables.
  14. [user@host] source ~/.bashrc

  15. Create a databases directory.
  16. [user@host] mkdir -p $CUBRID_DATABASES

  17. When CUBRID is successfully built, test it by referring to the demo database.

Building on Windows

It is assumed that the path where the source is checked out is c:\cubrid.

  1. Run the "Visual Studio 2008 command Prompt."
  2. image002.gif

  3. Move to the win folder under the trunk.
  4. C:> cd c:\cubrid runkwin

  5. Build by running devenv.exe. The build process is stored in the build.res.
  6. C:\cubrid runkwin> devenv.exe /rebuild

    Release cubrid.sln /out .build.res

  7. Copy the build files to the installation folder. The build files are located in C:\cubrid runkwin\install\Release.
  8. When the CUBRID build is successfully installed, test it by referring to the demo database.

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.

Building on AIX

This guild document apply for the version of RB-8.4.4 and later.

Build Steps

The best way is to run the script file of autobuild_aix.cmd which in source tree.

Step1: Check out the source of CUBRID
cd $HOME
Step 2: Compile and install

Run autobuild_aix.cmd, it will compile and install CUBRID to $HOME/cubrid.

cd $HOME/trunk
Customized Way
  1. Change the install path:
    You can modify the prefix in the autobuild_aix.cmd.
    OPTS="--prefix=your_cubrid_install_dir --enable-64bit --enable-debug"
  2. Compile 32 bits:
    You can modify the OPTS to “--enable-32bit” in the autobuild_aix.cmd.
    OPTS="--prefix=$HOME/cubrid --enable-32bit --enable-debug"
  3. Compile released version:
    You can modify the OPTS, and just remove “--enable-debug” in the autobuild_aix.cmd.
    OPTS="--prefix=$HOME/cubrid --enable-64bit "
Common issues:
  1. Error 1
    gmake: *** No targets specified and no makefile found.  Stop.
    You must run make, make install from the directory ofbuild in source tree.
  2. Error 2
    ar: 0707-126 chared.o is not valid with the current object file mode.
    Use the -X option to specify the desired object mode.
    You must set following environment before make (for 32bit it is 32).
    export OBJECT_MODE=64

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: