reeze / php-leveldb

The PHP Binding for LevelDB
Other
240 stars 44 forks source link

php7 make error #19

Closed captainQW closed 6 years ago

captainQW commented 9 years ago
/bin/sh /root/php-leveldb/libtool --mode=compile cc  -I. -I/root/php-leveldb -DPHP_ATOM_INC -I/root/php-leveldb/include -I/root/php-leveldb/main -I/root/php-leveldb -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/php-leveldb/leveldb.c -o leveldb.lo 
mkdir .libs
 cc -I. -I/root/php-leveldb -DPHP_ATOM_INC -I/root/php-leveldb/include -I/root/php-leveldb/main -I/root/php-leveldb -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/php-leveldb/leveldb.c  -fPIC -DPIC -o .libs/leveldb.o
/root/php-leveldb/leveldb.c:204: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘**attribute**’ before ‘php_leveldb_object_new’
/root/php-leveldb/leveldb.c:221: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘**attribute**’ before ‘php_leveldb_write_batch_object_new’
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_iterator_object_free’:
/root/php-leveldb/leveldb.c:231: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:236: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: At top level:
/root/php-leveldb/leveldb.c:242: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_leveldb_iterator_object_new’
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_snapshot_object_free’:
/root/php-leveldb/leveldb.c:254: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:257: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: At top level:
/root/php-leveldb/leveldb.c:263: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_leveldb_snapshot_object_new’
/root/php-leveldb/leveldb.c: In function ‘leveldb_custom_comparator_destructor’:
/root/php-leveldb/leveldb.c:403: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c:417:44: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
/root/php-leveldb/leveldb.c: In function ‘leveldb_custom_comparator_compare’:
/root/php-leveldb/leveldb.c:417: error: ‘ZVAL_STRINGL’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c:417: error: (Each undeclared identifier is reported only once
/root/php-leveldb/leveldb.c:417: error: for each function it appears in.)
/root/php-leveldb/leveldb.c:418:44: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
/root/php-leveldb/leveldb.c:420: warning: passing argument 6 of ‘call_user_function’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_API.h:469: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c:424: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c:425: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c:428: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_get_open_options’:
/root/php-leveldb/leveldb.c:453: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string _’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:453: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:457: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:457: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:461: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:461: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:465: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:465: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:470: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:470: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:475: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:475: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:480: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:480: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:485: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:485: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:490: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:490: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:499: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:499: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:505: warning: passing argument 3 of ‘zend_is_callable’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_API.h:309: note: expected ‘struct zend_string *_’ but argument is of type ‘char *_’
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_get_readoptions’:
/root/php-leveldb/leveldb.c:544: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:544: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:550: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:550: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:556: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:556: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:558: warning: comparison between pointer and integer
/root/php-leveldb/leveldb.c:559: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_set_readoptions’:
/root/php-leveldb/leveldb.c:592: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:592: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c:596: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:596: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_get_writeoptions’:
/root/php-leveldb/leveldb.c:612: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:612: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c: In function ‘php_leveldb_set_writeoptions’:
/root/php-leveldb/leveldb.c:629: warning: passing argument 2 of ‘zend_hash_find’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:152: note: expected ‘struct zend_string *’ but argument is of type ‘char *’
/root/php-leveldb/leveldb.c:629: error: too many arguments to function ‘zend_hash_find’
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB___construct’:
/root/php-leveldb/leveldb.c:654: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_get’:
/root/php-leveldb/leveldb.c:697: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:710:36: error: macro "RETVAL_STRINGL" passed 3 arguments, but takes just 2
/root/php-leveldb/leveldb.c:710: error: ‘RETVAL_STRINGL’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_set’:
/root/php-leveldb/leveldb.c:734: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_delete’:
/root/php-leveldb/leveldb.c:764: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_write’:
/root/php-leveldb/leveldb.c:798: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:802: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_getProperty’:
/root/php-leveldb/leveldb.c:825: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:834:27: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
/root/php-leveldb/leveldb.c:834: error: ‘RETVAL_STRING’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_compactRange’:
/root/php-leveldb/leveldb.c:851: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_getApproximateSizes’:
/root/php-leveldb/leveldb.c:875: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:896: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:169: note: expected ‘HashPosition *’ but argument is of type ‘void *_’
/root/php-leveldb/leveldb.c:896: error: too many arguments to function ‘zend_hash_get_current_data_ex’
/root/php-leveldb/leveldb.c:897: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_hash.h:169: note: expected ‘HashPosition _’ but argument is of type ‘void *_’
/root/php-leveldb/leveldb.c:897: error: too many arguments to function ‘zend_hash_get_current_data_ex’
/root/php-leveldb/leveldb.c:899: warning: assignment makes pointer from integer without a cast
/root/php-leveldb/leveldb.c:901: warning: assignment makes pointer from integer without a cast
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_close’:
/root/php-leveldb/leveldb.c:936: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_getIterator’:
/root/php-leveldb/leveldb.c:960: warning: passing argument 1 of ‘zend_call_method’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_interfaces.h:41: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDB_getSnapshot’:
/root/php-leveldb/leveldb.c:974: warning: passing argument 1 of ‘zend_call_method’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_interfaces.h:41: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBWriteBatch___construct’:
/root/php-leveldb/leveldb.c:1070: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBWriteBatch_set’:
/root/php-leveldb/leveldb.c:1093: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBWriteBatch_delete’:
/root/php-leveldb/leveldb.c:1113: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBWriteBatch_clear’:
/root/php-leveldb/leveldb.c:1130: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: At top level:
/root/php-leveldb/leveldb.c:1155: warning: initialization from incompatible pointer type
/root/php-leveldb/leveldb.c:1156: warning: initialization from incompatible pointer type
/root/php-leveldb/leveldb.c: In function ‘leveldb_iterator_get_iterator’:
/root/php-leveldb/leveldb.c:1174: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1178: error: incompatible types when assigning to type ‘zval’ from type ‘void _’
/root/php-leveldb/leveldb.c: In function ‘leveldb_iterator_dtor’:
/root/php-leveldb/leveldb.c:1191: error: used struct type value where scalar is required
/root/php-leveldb/leveldb.c:1192: error: incompatible types when initializing type ‘struct zval *’ using type ‘zval’
/root/php-leveldb/leveldb.c:1193: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval *’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c:1197: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: In function ‘leveldb_iterator_current_data’:
/root/php-leveldb/leveldb.c:1221: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c:1229:42: error: macro "ZVAL_STRINGL" passed 4 arguments, but takes just 3
/root/php-leveldb/leveldb.c:1229: error: ‘ZVAL_STRINGL’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator___construct’:
/root/php-leveldb/leveldb.c:1289: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1290: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_destroy’:
/root/php-leveldb/leveldb.c:1331: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_getError’:
/root/php-leveldb/leveldb.c:1352: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1353: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1361:22: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
/root/php-leveldb/leveldb.c:1361: error: ‘RETVAL_STRING’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_current’:
/root/php-leveldb/leveldb.c:1378: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1379: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1386:36: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
/root/php-leveldb/leveldb.c:1386: error: ‘RETURN_STRINGL’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_key’:
/root/php-leveldb/leveldb.c:1402: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1403: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1410:32: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
/root/php-leveldb/leveldb.c:1410: error: ‘RETURN_STRINGL’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_next’:
/root/php-leveldb/leveldb.c:1424: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1425: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_prev’:
/root/php-leveldb/leveldb.c:1443: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1444: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_rewind’:
/root/php-leveldb/leveldb.c:1462: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1463: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_last’:
/root/php-leveldb/leveldb.c:1479: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1480: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_seek’:
/root/php-leveldb/leveldb.c:1498: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1499: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBIterator_valid’:
/root/php-leveldb/leveldb.c:1515: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1516: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBSnapshot___construct’:
/root/php-leveldb/leveldb.c:1535: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1536: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c: In function ‘zim_LevelDBSnapshot_release’:
/root/php-leveldb/leveldb.c:1556: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1563: warning: cast to pointer from integer of different size
/root/php-leveldb/leveldb.c:1565: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php7/include/php/Zend/zend_variables.h:111: note: expected ‘struct zval _’ but argument is of type ‘struct zval *_’
/root/php-leveldb/leveldb.c: In function ‘zm_startup_leveldb’:
/root/php-leveldb/leveldb.c:1585: error: ‘php_leveldb_object_new’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c:1590: error: ‘php_leveldb_write_batch_object_new’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c:1595: error: ‘php_leveldb_iterator_object_new’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c:1602: error: ‘php_leveldb_snapshot_object_new’ undeclared (first use in this function)
/root/php-leveldb/leveldb.c:1608: error: too many arguments to function ‘zend_register_internal_class_ex’
make: **\* [leveldb.lo] Error 1
reeze commented 8 years ago

Hi, php-leveldb is not compatible with PHP 7.0 for now. I will release a PHP 7.0 compatible release soon ;-)

roncemer commented 8 years ago

Any idea when the PHP 7.0-compatible version is coming? It's not "soon" anymore -- it's almost FOUR months since the last comment on this bug, and almost TEN months since the bug was filed.

Ubuntu 16.04 LTS is out now, and the only PHP version it offers is 7.0, which means no PHP applications which use LevelDB can be used on Ubuntu 16.04 LTS. If anyone upgrades their server to this release, they're in trouble if it uses LevelDB.

If there is anything I can do to help, let me know.

FakieSui commented 8 years ago

@reeze DO you think you can work on this ? This would be amazing !