
Hi, I'm working on updating PHP to 5.4.0 (probably a fedora 17 feature). libvirt 0.4.5 doesn't build because function_entry have been removed See http://news.php.net/php.pecl.dev/7123 Fix is trivial : s/function_entry/zend_function_entry/ Attcached patch solves this issue and also fixes a lot of compiler warning (unused variable, unset, ...) There is still a lot of warning... (most are trivial to fix) I Hope this helps. Remi. P.S. Here is the full log (with -Wall) Making all in src make[3]: Entering directory `/dev/shm/libvirt-php-0.4.5/src' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -DCOMPILE_DL_LIBVIRT=1 -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/usr/include/php/ext/date/lib -c -o libvirt-php.o libvirt-php.c -I/usr/include/libxml2 -DHAVE_CONFIG_H rm -f *.o libvirt-php.c: In function 'zif_libvirt_domain_send_keys': libvirt-php.c:3002:2: warning: pointer targets in passing argument 3 of 'vnc_send_keys' differ in signedness [-Wpointer-sign] libvirt-php.h:200:5: note: expected 'unsigned char *' but argument is of type 'char *' libvirt-php.c: In function 'zif_libvirt_image_create': libvirt-php.c:1674:8: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result] gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -DCOMPILE_DL_LIBVIRT=1 -c -o vncfunc.o vncfunc.c -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/usr/include/php/ext/date/lib -I/usr/include/libxml2 -DHAVE_CONFIG_H vncfunc.c: In function 'vnc_parse_fb_params': vncfunc.c:178:2: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign] /usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'unsigned char *' vncfunc.c:178:2: warning: pointer targets in passing argument 1 of '__strdup' differ in signedness [-Wpointer-sign] /usr/include/bits/string2.h:1303:14: note: expected 'const char *' but argument is of type 'unsigned char *' vncfunc.c:178:21: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] vncfunc.c:141:17: warning: unused variable 'name' [-Wunused-variable] vncfunc.c:139:6: warning: unused variable 'i' [-Wunused-variable] vncfunc.c: In function 'vnc_send_key': vncfunc.c:205:6: warning: unused variable 'i' [-Wunused-variable] vncfunc.c: In function 'vnc_connect': vncfunc.c:438:2: warning: implicit declaration of function 'connect_socket' [-Wimplicit-function-declaration] vncfunc.c: In function 'vnc_get_dimensions': vncfunc.c:511:2: warning: pointer targets in passing argument 1 of 'vnc_parse_fb_params' differ in signedness [-Wpointer-sign] vncfunc.c:137:17: note: expected 'unsigned char *' but argument is of type 'char *' vncfunc.c:525:2: warning: implicit declaration of function 'socket_has_data' [-Wimplicit-function-declaration] vncfunc.c:526:3: warning: implicit declaration of function 'socket_read' [-Wimplicit-function-declaration] vncfunc.c:484:20: warning: unused variable 'err' [-Wunused-variable] vncfunc.c:484:9: warning: unused variable 'skip_next' [-Wunused-variable] vncfunc.c:484:6: warning: unused variable 'i' [-Wunused-variable] vncfunc.c: In function 'vnc_send_keys': vncfunc.c:569:2: warning: pointer targets in passing argument 1 of 'vnc_parse_fb_params' differ in signedness [-Wpointer-sign] vncfunc.c:137:17: note: expected 'unsigned char *' but argument is of type 'char *' vncfunc.c:572:2: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign] /usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'unsigned char *' vncfunc.c:572:2: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat] vncfunc.c:573:2: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign] /usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'unsigned char *' vncfunc.c:580:3: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign] /usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'unsigned char *' vncfunc.c:600:2: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign] /usr/include/string.h:399:15: note: expected 'const char *' but argument is of type 'unsigned char *' vncfunc.c:600:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat] vncfunc.c:547:20: warning: unused variable 'err' [-Wunused-variable] vncfunc.c: In function 'vnc_send_pointer_event': vncfunc.c:627:16: warning: unused variable 'end' [-Wunused-variable] vncfunc.c:625:26: warning: unused variable 'err' [-Wunused-variable] vncfunc.c:625:22: warning: unused variable 'ok' [-Wunused-variable] vncfunc.c:625:19: warning: unused variable 'i' [-Wunused-variable] vncfunc.c:625:11: warning: unused variable 'j' [-Wunused-variable] vncfunc.c: In function 'vnc_refresh_screen': vncfunc.c:697:20: warning: unused variable 'err' [-Wunused-variable] vncfunc.c:697:9: warning: unused variable 'skip_next' [-Wunused-variable] vncfunc.c:697:6: warning: unused variable 'i' [-Wunused-variable] In file included from /usr/include/string.h:642:0, from /usr/include/php/main/../main/php_config.h:2440, from /usr/include/php/Zend/zend_config.h:1, from /usr/include/php/Zend/zend.h:51, from /usr/include/php/main/php.h:34, from libvirt-php.h:44, from vncfunc.c:10: In function 'memset', inlined from 'vnc_send_client_pointer' at vncfunc.c:252:8: /usr/include/bits/string3.h:85:3: warning: call to __builtin___memset_chk will always overflow destination buffer [enabled by default] gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fpic -DCOMPILE_DL_LIBVIRT=1 -c -o sockets.o sockets.c -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/usr/include/php/ext/date/lib -I/usr/include/libxml2 -DHAVE_CONFIG_H sockets.c: In function 'socket_has_data': sockets.c:118:10: warning: unused variable 'result' [-Wunused-variable] sockets.c: In function 'socket_read': sockets.c:177:7: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result] gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -shared -lvirt -rdynamic -o libvirt-php.so vncfunc.o sockets.o libvirt-php.o -ldl -lvirt -lxml2 echo "Extension compiled as libvirt-php.so" Extension compiled as libvirt-php.so