coderplay
12/11/2012 - 7:56 AM

Building Impala

Building Impala

RHEL 5u4

  • 升级python

  • 安装 boost thread

RHEL 5u4

upgrade python

The default version of python installed on RHEL 5u4 is 2.4.3, which doesn't support with statement. Here is the error message:

******************************
 Building Impala backend 
******************************
     File "/home/zhouchen.zm/impala/bin/gen_build_version.py", line 43
    with open(VERSION_FILE_NAME) as version_file:
SyntaxError: invalid syntax

To solve this problem, you need to upgrade python.

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar jxvf Python-2.7.3.tar.bz2
./configure && make && sudo make install

install boost threads and regex-mt

Here is the error messages since there is no multi-threaded version of boost in a fresh RHEL 5u4.

CMake Error at /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:1192 (message):
Unable to find the requested Boost libraries.

Boost version: 1.46.1
Boost include path: /usr/include

The following Boost libraries could not be found:
      boost_thread
      boost_regex-mt

 No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
 directory containing Boost libraries or BOOST_ROOT to the location of
 Boost.

In order to load libbackend.so into the jvm, Impala need to link against a shared libboost_thread-mt.so. We should build a multithreaded version of boost and put the -mt suffix back for the binaries.

./bjam threading=multi --layout=tagged install
(gdb) bt
#0  0x00000036be430265 in raise () from /lib64/libc.so.6
#1  0x00000036be431d10 in abort () from /lib64/libc.so.6
#2  0x0000003f66408c64 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#3  0x0000000000c43e7c in impala::TSlotDescriptor::read (this=0x3ba15c0, iprot=0x521a5c0)
    at /home/zhuoluo.yzl/impala/be/generated-sources/gen-cpp/Descriptors_types.cpp:187
#4  0x000000000521a5c0 in ?? ()
#5  0x0000000003ba15c0 in ?? ()
#6  0x0000000b00000000 in ?? ()
#7  0x0000000000000000 in ?? ()