Open murraycollingwood opened 2 years ago
I'm re-reading through the install instructions, and I can see libJudy is defined as a Dependency.
So I'm thinking now the libJudy is included when compiling the memprof library.
So now I'm running the pecl install memprof
command. It's working till I get to the point where I'm looking for Judy.h
checking whether to enable memprof support... yes, shared
checking for judy lib... yes, shared
checking for include/Judy.h in /usr/local /usr... not found
configure: error: Please install lib judy
ERROR: `/private/tmp/pear/temp/memprof/configure --with-php-config=/opt/homebrew/opt/php/bin/php-config' failed
So then I copy Judy.h to /usr/local/include/Judy.h
I then rerun the pecl install memprof
thinking this should get further, but it doesn't...
checking whether to enable memprof support... yes, shared
checking for judy lib... yes, shared
checking for include/Judy.h in /usr/local /usr... not found
configure: error: Please install lib judy
ERROR: `/private/tmp/pear/temp/memprof/configure --with-php-config=/opt/homebrew/opt/php/bin/php-config' failed
Looks just the same - I'm not making any progress on this.
Cheers Murray
Hi
Currently the pecl package doesn't support specifying a custom libjudy install path.
The manual install method will work: https://github.com/arnaud-lb/php-memory-profiler#installing-manually
@arnaud-lb
The instructions aren't entirely clear - there are a lot of assumptions involved:
Download the source and run the following commands in the source directory:
phpize
seems to work, although there was one warning configure.ac:161: warning: The macro
AC_TRY_LINK' is obsolete.`./configure
required the one where I specified the path to Judy/1.0.5, it seems to work.make
seems to work, again a warning warning: No support for malloc hooks, this build will not track persistent allocations [-W#warnings]
make install
appears to install the library in the correct folder.extension=memprof.so
to the php.ini file and restart Apache2 again. It now appears in the phpinfo()
I hope you don't mind - but I've added this detail to help others, like me, who may need a few more instructions to get this working. Thanks for your help.
Now, to turn it on in my script and start working out my memory leaks.
Thank you for the details !
Happy debugging :)
Description
I'm sorry this seems like a dumb question, but I can't find the extension file anywhere. I did the brew install which appeared to work fine
I then added the extension to the php.ini file:
And lastly, when I run my php unit test:
Was it my xcode / clt being slightly out of date? Was it something in the brew? Or did it all work and I'm just looking in the wrong directory?
Cheers Murray
php-memprof Version
judy 1.0.5
PHP Version
PHP 8.1
Operating System
OSX 12.2