arnaud-lb / php-memory-profiler

Memory profiler for PHP. Helps finding memory leaks in PHP scripts.
MIT License
859 stars 51 forks source link

PHP 7 support? Makefile:194: recipe for target 'memprof.lo' failed #11

Closed michallohnisky closed 7 years ago

michallohnisky commented 8 years ago

Hi,

I have a problem with installation:

$ pecl install memprof
...
In file included from /usr/include/php/main/php.h:394:0,
                 from /tmp/pear/temp/memprof/memprof.c:19:
/tmp/pear/temp/memprof/memprof.c: In function ‘zif_memprof_dump_pprof’:
/usr/include/php/main/php_streams.h:259:53: warning: passing argument 1 of ‘zend_fetch_resource2_ex’ from incompatible pointer type [-Wincompatible-pointer-types]
  if (((xstr) = (php_stream*)zend_fetch_resource2_ex((pzval), \
                                                     ^
/tmp/pear/temp/memprof/memprof.c:1251:2: note: in expansion of macro ‘php_stream_from_zval’
  php_stream_from_zval(stream, &arg1);
  ^
In file included from /usr/include/php/Zend/zend_API.h:28:0,
                 from /usr/include/php/main/php.h:39,
                 from /tmp/pear/temp/memprof/memprof.c:19:
/usr/include/php/Zend/zend_list.h:66:16: note: expected ‘zval * {aka struct _zval_struct *}’ but argument is of type ‘zval ** {aka struct _zval_struct **}’
 ZEND_API void *zend_fetch_resource2_ex(zval *res, const char *resource_type_name, int resource_type, int resource_type2);
                ^
Makefile:194: recipe for target 'memprof.lo' failed
make: *** [memprof.lo] Error 1
ERROR: `make' failed

I use PHP 7 so this can be the issue. Are you planning a PHP 7 support?

visitek commented 8 years ago

PHP7 is needed

arnaud-lb commented 8 years ago

Hi!

There is no PHP 7 support yet. I would gladly accept contributions on this.

HeathNaylor commented 8 years ago

@arnaud-lb no plans for PHP7, someone would need to contrib?

visitek commented 8 years ago

Later.. we are busy with angular2 now

arnaud-lb commented 7 years ago

I've just released a new version on PECL with PHP 7 support