Question

Possibly my first question in this space. I have been trying to get around this issue from last 2 days. Yeah that seems to be a lot. Here is whats going on

To install thrift I am following somewhat whats on Apache Thirfts website (thrift.apache.org/docs/install/centos/)

 yum install boost-devel  php-devel  pcre-devel  automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel libtool*

Then I would execute the following commands

cd /opt/
wget https://github.com/apache/thrift/archive/0.9.1.tar.gz
tar -xzvf 0.9.1.tar.gz
./bootstrap.sh
./confgure

Here is last bit of error that I am getting

 checking whether yytext is a pointer... yes
 checking whether ln -s works... yes
 checking for gawk... (cached) gawk
 checking for ranlib... (cached) ranlib
 ./configure: line 16498: syntax error near unexpected token `QT,'
 ./configure: line 16498: `    PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 4.3, have_qt=yes, have_qt=no)'

Here are some other relevant details

 > pkg-config --version
 > 0.23

 > g++ --version
   g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
   Copyright (C) 2010 Free Software Foundation, Inc.

 > uname -a
   Linux jas.rnd.local 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Its driving me nuts. Thanks in advance if you can help me out here.

Était-ce utile?

La solution

Yeah! seems like updating gcc to 4.8.1 fixed it.

here are some more things I did

 yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel php-devel openssl openssl-devel


 # update to gcc4.8.1
  1. install latest autoconf

  2. make sure you have following dependencies

      wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
      tar xvf autoconf-2.69.tar.gz
      cd autoconf-2.69
      ./configure
      make
      make install
    

After above prerequisite I was able to build thrift for php 0.9.1 and I can now communicate with my cluster nodes. I will write detailed steps a bit later

Hope this helps

EDIT 1

Actually I could build thrift and cassandra PDO without gcc 4.8.1, I maybe doing something wrong before. I have written full list of commands, which I am verifying and I will share as a step by step guide later.

EDIT 2

Here is an article I wrote with detailed instructions on what I did to build thrift and cassandra pdo driver

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top