Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Change the cmake location

...

Code Block
git clone https://github.com/apache/orc.git
cd orc
mkdir build && cd build

# Export CC and CXX to let cmake use Impala's gcc
# Note that IMPALA-9760 changes the toolchain location in Impala 4.0. Before that you should use
#   export CC="${IMPALA_HOME}/toolchain/gcc-${IMPALA_GCC_VERSION}/bin/gcc"
#   export CXX="${IMPALA_HOME}/toolchain/gcc-${IMPALA_GCC_VERSION}/bin/g++"
export CC="${IMPALA_TOOLCHAIN_PACKAGES_HOME}/gcc-${IMPALA_GCC_VERSION}/bin/gcc"
export CXX="${IMPALA_TOOLCHAIN_PACKAGES_HOME}/gcc-${IMPALA_GCC_VERSION}/bin/g++"

# Use Impala's cmake. Don't build the java lib and libhdfspp.
# Get the latest command example in https://github.com/cloudera/native-toolchain/blob/master/source/orc/build.sh
${IMPALA_TOOLCHAIN_PACKAGES_HOME}/toolchain/cmake-${IMPALA_CMAKE_VERSION}/bin/cmake .. -DBUILD_JAVA=OFF -DBUILD_LIBHDFSPP=OFF -DINSTALL_VENDORED_LIBS=OFF -DBUILD_SHARED_LIBS=ON
# Then compile with multi-processes. $(nproc) is the number of virtual CPU cores.
CFLAGS="-fPIC -DPIC" make -j $(nproc)

# If succeeds, you should be able to find the binary at c++/src/liborc.a

...