mikepultz / php-swift-tts

PHP Extension for the Cepstral Text-to-Speech Engine
0 stars 1 forks source link

unable to compile extension #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to compile using "make" command and i am getting following error 
=======================================================================
/bin/sh /var/www/html/apc_test/phpext/php-swift-tts_1.0/libtool --mode=compile 
g++  -I. -I/var/www/html/apc_test/phpext/php-swift-tts_1.0 -DPHP_ATOM_INC 
-I/var/www/html/apc_test/phpext/php-swift-tts_1.0/include 
-I/var/www/html/apc_test/phpext/php-swift-tts_1.0/main 
-I/var/www/html/apc_test/phpext/php-swift-tts_1.0 -I/usr/include/php 
-I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend 
-I/usr/include/php/ext 
-I/var/www/html/apc_test/phpext/php-swift-tts_1.0/Cepstral_Amy_x86-64-linux_5.1.
0//include  -DHAVE_CONFIG_H     -c 
/var/www/html/apc_test/phpext/php-swift-tts_1.0/php_swift.cc -o php_swift.lo
 g++ -I. -I/var/www/html/apc_test/phpext/php-swift-tts_1.0 -DPHP_ATOM_INC -I/var/www/html/apc_test/phpext/php-swift-tts_1.0/include -I/var/www/html/apc_test/phpext/php-swift-tts_1.0/main -I/var/www/html/apc_test/phpext/php-swift-tts_1.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/var/www/html/apc_test/phpext/php-swift-tts_1.0/Cepstral_Amy_x86-64-linux_5.1.0//include -DHAVE_CONFIG_H -c /var/www/html/apc_test/phpext/php-swift-tts_1.0/php_swift.cc  -fPIC -DPIC -o .libs/php_swift.o
/var/www/html/apc_test/phpext/php-swift-tts_1.0/php_swift.cc: In function 'void 
zif_swift_getVoices(int, zval*, zval**, zval*, int)':
/var/www/html/apc_test/phpext/php-swift-tts_1.0/php_swift.cc:194: error: 
invalid conversion from 'const char*' to 'char*'
/var/www/html/apc_test/phpext/php-swift-tts_1.0/php_swift.cc:194: error:   
initializing argument 2 of 'int add_assoc_zval_ex(zval*, char*, uint, zval*)'
make: *** [php_swift.lo] Error 1

Original issue reported on code.google.com by phpconn...@gmail.com on 20 Jun 2011 at 1:05

GoogleCodeExporter commented 9 years ago
Hello,

It looks like it's just an issue with the add_assoc_zval_ex() expecting a char* 
for the second argument, instead of a const char*.

I'll have to look into if add_assoc_zval_ex() actually modifies the value- I 
don't think it does, so it should really be const.

Otherwise, I can just cast the value to char*.

Mike

Original comment by mike.pultz on 24 Jun 2011 at 1:38

GoogleCodeExporter commented 9 years ago
What version of PHP do you have?

As of (at least) 5.3.0, add_assoc_zval() takes a const char* for the second key 
param, which is what I'm passing.

http://lxr.sweon.net/php/http/source/Zend/zend_API.c?v=5.3.0#L1189

Mike

Original comment by mike.pultz on 24 Jun 2011 at 2:06