Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to compile extension #2

Open
GoogleCodeExporter opened this issue Mar 23, 2015 · 2 comments
Open

unable to compile extension #2

GoogleCodeExporter opened this issue Mar 23, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 20 Jun 2011 at 1:05

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant