Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Compiling Hive ODBC


Copy link to this message
-
Re: Compiling Hive ODBC
Making some progress...

After disabling some options to build thrift - because it installs some
files in the system directory (/usr/lib/php), and I - do not - want that,
I did following configure for thrift:

./configure --prefix=/home/hive/thrift-0.9.0 \
   --with-qt4=no \
   --with-csharp=no \
   --with-erlang=no \
   --with-python=no \
   --with-perl=no \
   --with-php=no \
   --with-php_extension=no \
   --with-ruby=no \
   --with-haskell=no \
   --with-go=no \
   --with-d=no

Then I could build thrift and fb303, but not when I try to build Hive ODBC:

hive@orca:~/hive-0.10.0/src$ ant compile-cpp -Dthrift.home=$THRIFT_HOME
      ...
      ...
      ...
      [exec] g++ -Wall -g -fPIC -m32 -DARCH32 -I/home/hive/thrift-0.9.0/include/thrift -I/home/hive/thrift-0.9.0/include/thrift/fb303 -I/include
-I/home/hive/hive-0.10.0/src/service/src/gen/thrift/gen-cpp -I/home/hive/hive-0.10.0/src/ql/src/gen/thrift/gen-cpp
-I/home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp -I/home/hive/hive-0.10.0/src/odbc/src/cpp -c
/home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp -o
/home/hive/hive-0.10.0/src/build/metastore/objs/ThriftHiveMetastore.o
      [exec] In file included from /usr/local/include/thrift/protocol/TProtocol.h:23,
      [exec]                  from /usr/local/include/thrift/TProcessor.h:24,
      [exec]                  from /usr/local/include/thrift/TDispatchProcessor.h:22,
      [exec]                  from /home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h:10,
      [exec]                  from /home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp:7:
      [exec] /usr/local/include/thrift/transport/TTransport.h:34: error: expected constructor, destructor, or type conversion before �readAll�
      [exec] /usr/local/include/thrift/transport/TTransport.h:107: error: �uint32_t� does not name a type
      [exec] /usr/local/include/thrift/transport/TTransport.h:111: error: �uint32_t� does not name a type
      [exec] /usr/local/include/thrift/transport/TTransport.h:124: error: �uint32_t� does not name a type
      [exec] /usr/local/include/thrift/transport/TTransport.h:128: error: �uint32_t� does not name a type
      [exec] /usr/local/include/thrift/transport/TTransport.h:139: error: �uint32_t� does not name a type
Any idea?

Thanks
Seb

On 04/30/2013 11:00 AM, Sebastien FLAESCH wrote:
> Thank you Carl, but I still have problems to build Hive ODBC:
>
> I followed the instruction from this page (I believe the doc is wrong):
>
> https://cwiki.apache.org/Hive/hiveodbc.html
>
> Where it says:
>
> "Build the Hive client by running the following command from HIVE_HOME..."
>
> Here is my env:
>
> ----------------------------------------------------------
> hive@orca:~$ cat env-apache.sh
> JAVA_HOME="/usr/lib/jvm/java-6-sun"
> export JAVA_HOME
> JRE_HOME="$JAVA_HOME/jre"
> export JRE_HOME
> PATH=$JAVA_HOME/bin:$PATH
>
> HADOOP_HOME=/home/hive/hadoop-0.23.7
> export HADOOP_HOME
> PATH=$HADOOP_HOME/bin:$PATH
> export PATH
>
> HIVE_HOME=/home/hive/hive-0.10.0
> export HIVE_HOME
> PATH=$HIVE_HOME/bin:$PATH
> export PATH
>
> THRIFT_HOME=/home/hive/thrift-0.9.0
> export THRIFT_HOME
> ----------------------------------------------------------
>
> But:
>
> ----------------------------------------------------------
> hive@orca:~$ cd $HIVE_HOME
> hive@orca:~/hive-0.10.0$ ant compile-cpp -Dthrift.home=$THRIFT_HOME
> Buildfile: build.xml does not exist!
> Build failed
> ----------------------------------------------------------
>
>
> And when I go to the src directory, it goes further, but then
> I have missing Thrift header files:
>
> ----------------------------------------------------------
> hive@orca:~/hive-0.10.0$ cd src
> hive@orca:~/hive-0.10.0/src$ ant compile-cpp -Dthrift.home=$THRIFT_HOME
> ...
> compile-cpp:
> [echo] Project: odbc
> [exec] mkdir -p /home/hive/hive-0.10.0/src/build/metastore/objs
> [exec] g++ -Wall -g -fPIC -m32 -DARCH32