Failing to build xdebug

匿名 (未验证) 提交于 2019-12-03 03:03:02

问题:

I am trying to install xdebug with MAMP on my Mac. I downloaded xdebug-2.2.1.tgz and followed the xdebug wizard to run phpize. I ran make then I was told of some missing files in /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/*. So, I googled that and I saw I had to download php5.4.4 and then push some files in a new 'include' directory I created in /Applications/MAMP/bin/php/php5.4.4/include/php. But when I try to build again, I have this message :

/Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend.h:51:11: fatal error:        'zend_config.h' file not found # include <zend_config.h>

What should I do ? Where can I get this file ?

回答1:

I finally managed to install xdebug. In fact, I had to install Xcode developer tool and then copy the files from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/php into /Applications/MAMP/bin/php/php5.4.4/include and then it worked !



回答2:

Indeed,I thought maybe the make command can not find headers.So I tried to change the makefile:

INCLUDES = -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

to

INCLUDES = -I{Your Path to php_dir}/php -I{Your Path to php_dir}/php/main -I{Your Path to php_dir}/php/TSRM -I{Your Path to php_dir}/php/Zend -I{Your Path to php_dir}/php/ext -I{Your Path to php_dir}/php/ext/date/lib

You may consult this question to change makefile Describing header file locations in makefile

You may use this command to find php.h

sudo find / -name php.h

If you don't have php header,you can install xcode.

After all these,everything is ready now,enjoy!



转载请标明出处:Failing to build xdebug
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!