thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shu Hung (Koala)" <koa...@gmail.com>
Subject Failed to compile Thrift with php extension
Date Sat, 29 Jan 2011 17:28:41 GMT
Hi all,

I tried to compile the latest Thrift (download with git) with PHP extension
on my Fedora 14 machine.
This is the compile options I used:

./configure \
  --with-csharp=no \
  --with-java=no \
  --with-erlang=no \
  --with-python=no \
  --with-php=yes \
  --with-php_extension=yes \
  --with-ruby=no \
  --with-haskell=no



The configure command success while the compile was not.
This is the output of the make command:

make  all-recursive
make[1]: Entering directory `/usr/local/src/thrift/thrift-20110106'
Making all in compiler/cpp
make[2]: Entering directory
`/usr/local/src/thrift/thrift-20110106/compiler/cpp'
make  all-am
make[3]: Entering directory
`/usr/local/src/thrift/thrift-20110106/compiler/cpp'
g++ -DHAVE_CONFIG_H -I. -I../..  -I./src  -Wall -g -O2 -MT thrift-main.o -MD
-MP -MF .deps/thrift-main.Tpo -c -o thrift-main.o `test -f 'src/main.cc' ||
echo './'`src/main.cc
mv -f .deps/thrift-main.Tpo .deps/thrift-main.Po
/bin/sh ../../libtool --tag=CXX   --mode=link g++ -Wall -g -O2   -o thrift
thrift-main.o thrift-md5.o thrift-t_generator.o thrift-parse.o
thrift-t_c_glib_generator.o thrift-t_cpp_generator.o
thrift-t_java_generator.o thrift-t_as3_generator.o
thrift-t_csharp_generator.o thrift-t_py_generator.o thrift-t_rb_generator.o
thrift-t_perl_generator.o thrift-t_php_generator.o thrift-t_erl_generator.o
thrift-t_cocoa_generator.o thrift-t_st_generator.o
thrift-t_ocaml_generator.o thrift-t_hs_generator.o thrift-t_xsd_generator.o
thrift-t_html_generator.o thrift-t_js_generator.o
thrift-t_javame_generator.o -lfl libparse.a -lrt -lpthread
libtool: link: g++ -Wall -g -O2 -o thrift thrift-main.o thrift-md5.o
thrift-t_generator.o thrift-parse.o thrift-t_c_glib_generator.o
thrift-t_cpp_generator.o thrift-t_java_generator.o thrift-t_as3_generator.o
thrift-t_csharp_generator.o thrift-t_py_generator.o thrift-t_rb_generator.o
thrift-t_perl_generator.o thrift-t_php_generator.o thrift-t_erl_generator.o
thrift-t_cocoa_generator.o thrift-t_st_generator.o
thrift-t_ocaml_generator.o thrift-t_hs_generator.o thrift-t_xsd_generator.o
thrift-t_html_generator.o thrift-t_js_generator.o
thrift-t_javame_generator.o  -lfl libparse.a -lrt -lpthread
make[3]: Leaving directory
`/usr/local/src/thrift/thrift-20110106/compiler/cpp'
make[2]: Leaving directory
`/usr/local/src/thrift/thrift-20110106/compiler/cpp'
Making all in lib
make[2]: Entering directory `/usr/local/src/thrift/thrift-20110106/lib'
Making all in cpp
make[3]: Entering directory `/usr/local/src/thrift/thrift-20110106/lib/cpp'
Making all in .
make[4]: Entering directory `/usr/local/src/thrift/thrift-20110106/lib/cpp'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/usr/local/src/thrift/thrift-20110106/lib/cpp'
Making all in test
make[4]: Entering directory
`/usr/local/src/thrift/thrift-20110106/lib/cpp/test'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory
`/usr/local/src/thrift/thrift-20110106/lib/cpp/test'
make[3]: Leaving directory `/usr/local/src/thrift/thrift-20110106/lib/cpp'
Making all in php
make[3]: Entering directory `/usr/local/src/thrift/thrift-20110106/lib/php'
cd src/ext/thrift_protocol/ \
  && make
make[4]: Entering directory
`/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol'
/bin/sh
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/libtool
--mode=compile g++  -I.
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol
-DPHP_ATOM_INC
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/include
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/main
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol
-I/usr/local/php-5.3.1/include/php -I/usr/local/php-5.3.1/include/php/main
-I/usr/local/php-5.3.1/include/php/TSRM
-I/usr/local/php-5.3.1/include/php/Zend
-I/usr/local/php-5.3.1/include/php/ext
-I/usr/local/php-5.3.1/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2
-c
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
-o php_thrift_protocol.lo
mkdir .libs
 g++ -I.
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol
-DPHP_ATOM_INC
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/include
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/main
-I/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol
-I/usr/local/php-5.3.1/include/php -I/usr/local/php-5.3.1/include/php/main
-I/usr/local/php-5.3.1/include/php/TSRM
-I/usr/local/php-5.3.1/include/php/Zend
-I/usr/local/php-5.3.1/include/php/ext
-I/usr/local/php-5.3.1/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
-fPIC -DPIC -o .libs/php_thrift_protocol.o
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:103:1:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void throw_tprotocolexception(char*, long int)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:410:62:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void throw_zend_exception_from_std_exception(const
std::exception&)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:418:51:
error: expected primary-expression before ',' token
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:418:51:
error: 'tsrm_ls' was not declared in this scope
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void binary_deserialize(int8_t, PHPInputTransport&, zval*,
HashTable*)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:433:71:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:445:120:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void protocol_writeMessageBegin(zval*, const char*, int32_t,
int32_t)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:666:3:
error: redeclaration of 'void*** tsrm_ls'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:661:3:
error: 'void*** tsrm_ls' previously declared here
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void binary_serialize(int8_t, PHPOutputTransport&, zval**,
HashTable*)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:758:95:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:760:114:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:762:97:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:806:106:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:833:107:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:855:106:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void binary_serialize_spec(zval*, PHPOutputTransport&,
HashTable*)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:888:86:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void zif_thrift_protocol_write_binary(int, zval*, zval**,
zval*, int, void***)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:955:120:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:957:83:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:
In function 'void zif_thrift_protocol_read_binary(int, zval*, zval**, zval*,
int, void***)':
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:1008:71:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:1016:109:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:1028:47:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:1029:110:
warning: deprecated conversion from string constant to 'char*'
/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp:1035:118:
warning: deprecated conversion from string constant to 'char*'
make[4]: *** [php_thrift_protocol.lo] Error 1
make[4]: Leaving directory
`/usr/local/src/thrift/thrift-20110106/lib/php/src/ext/thrift_protocol'
make[3]: *** [src/ext/thrift_protocol/modules/thrift_protocol.so] Error 2
make[3]: Leaving directory `/usr/local/src/thrift/thrift-20110106/lib/php'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/thrift/thrift-20110106/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/thrift/thrift-20110106'
make: *** [all] Error 2


My GCC version is 4.5.1 and my PHP version is 5.3.1.
What is the problem? How can I fix it?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message