Search code examples
apachehawq

Compile error in Apache HAWQ. Cannot find the location


I am trying to install Apache HAWQ to my node. I referenced Apache HAWQ wiki page (https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install) and successfully completed all the required dependent modules including Hadoop, boost, thrift and etc.

And the following step is to install the Apache HAWQ and below are the commands.

git clone https://git-wip-us.apache.org/repos/asf/incubator-hawq.git

# The code directory is incubator-hawq.
CODE_BASE=`pwd`/incubator-hawq

cd $CODE_BASE

# Run command to generate makefile.
./configure

make -j8

# Install HAWQ
make install

However, when I ran ./configure and I got the error saying that ..

.....
checking for snappy-c.h... yes
checking for library containing snappy_max_compressed_length... -lsnappy
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking thrift/protocol/TBinaryProtocol.h usability... no
checking thrift/protocol/TBinaryProtocol.h presence... no
checking for thrift/protocol/TBinaryProtocol.h... no
configure: error: thrift is required

Although I installed and compiled thrift using configure && make && make install, the shell command cannot find the thrift library.

So I typed the find \ -name 'TBinaryProtocol.h*' to find the location where thrift-relevant modules have been installed. And I got the below message.

[root@hawq1 incubator-hawq]# find / -name 'TBinaryProtocol.h*'
/usr/local/include/thrift/protocol/TBinaryProtocol.h
/root/Downloads/thrift-0.9.1/lib/cpp/src/thrift/protocol/TBinaryProtocol.h
/root/Downloads/thrift-0.9.1/lib/cocoa/src/protocol/TBinaryProtocol.h
/root/Downloads/hawq/thrift-0.9.1/lib/cpp/src/thrift/protocol/TBinaryProtocol.h
/root/Downloads/hawq/thrift-0.9.1/lib/cocoa/src/protocol/TBinaryProtocol.h

It means that I have thrift modules and I think that they are properly installed in my directory. And I followed the instruction suggested by the Apache wiki page by typing ldconfig -p /root/Downloads/hawq/thrift-0.9.1/lib/.

But I got the same error. And finally I searched the configure.log file and found the below message, indicating it could not find the location of thrift modules.

configure:10377: checking thrift/protocol/TBinaryProtocol.h usability
configure:10377: g++ -c -g -O2  -D_GNU_SOURCE  conftest.cpp >&5
conftest.cpp:76:45: fatal error: thrift/protocol/TBinaryProtocol.h: No such file or directory
 #include <thrift/protocol/TBinaryProtocol.h>

How to solve this issue? Any help will be very much appreciated.


Solution

  • I don't think your thrift install path is /root/Downloads/hawq/thrift-0.9.1/lib/. Could you try /usr/local/include/thrift ?