Re: debugging PECL extension with eclipse or other IDE
| From: | j adams | Date: | Mon, 18 Apr 2011 20:18:02 +0000 |
| Subject: | Re: debugging PECL extension with eclipse or other IDE | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8125@lists.php.net to get a copy of this message | ||
On Mon, Apr 18, 2011 at 1:10 PM, Christopher Jones
<christopher.jones@oracle.com> wrote:
>
>
> On 04/18/2011 01:02 PM, j adams wrote:
>>
>> On Mon, Apr 18, 2011 at 12:12 PM, j adams<zardozrocks@gmail.com> wrote:
>>>
>>> On Mon, Apr 18, 2011 at 11:50 AM, Ferenc Kovacs<info@tyrael.hu> wrote:
>>>>
>>>>
>>>> On Mon, Apr 18, 2011 at 8:18 PM, j adams<zardozrocks@gmail.com> wrote:
>>>>>
>>>>> Thanks Christopher for that suggestion. I didn't see a
>>>>> "buildconfig"
>>>>> but I do in fact see a buildconf so tried that and it complains about
>>>>> VCS and doesn't clean:
>>>>>
>>>>> jaith@Ubuntu-64bit:~/src/php-5.3.6$ ./buildconf --force
>>>>> Forcing buildconf
>>>>> buildconf: checking installation...
>>>>> buildconf: autoconf version 2.67 (ok)
>>>>> buildconf: Your version of autoconf likely contains buggy cache code.
>>>>> Running vcsclean for you.
>>>>> To avoid this, install autoconf-2.13.
>>>>> Can't figure out your VCS, not cleaning.
>>>>>
>>>>> Now my configure script won't run.
>>>>>
>>>>> I googled around for a solution and the recommendation seems to be to
>>>>> rollback autconf from the current 2.67 to the much older 2.13. Any
>>>>> thoughts on how to get buildconf to run correctly?
>>>>>
>>>>
>>>> sudo apt-get install autoconf2.13;
>>>> PHP_AUTOCONF=autoconf2.13 PHP_AUTOHEADER=autoheader2.13 ./buildconf
>>>> it worked for me for debian lenny.
>>>> http://www.php.net/svn.php#buildconf_fail
>>>> Tyrael
>>>> ?
>>>
>>> Thanks for the additional detail. I did the apt-get install
>>> autoconfi2.13 and a quick test of "autoconf --version" returns 2.13.
>>> I also did the export commands to set the other values:
>>> export PHP_AUTOCONF=/usr/bin/autoconf2.13
>>> export PHP_AUTOHEADER=/usr/bin/autoheader2.13
>>>
>>> The configure command is still failing. These are the last lines:
>>>
>>> checking for ZLIB support... no
>>> checking if the location of ZLIB install directory is defined... no
>>> : command not found5915:
>>> : command not found5916:
>>> : command not found5917:
>>> : command not found5918:
>>> : command not found5919:
>>> : command not found5920:
>>> : command not found5921:
>>> : command not found5922:
>>> : command not found5923:
>>> : command not found5924:
>>> : command not found5925:
>>> : command not found5926:
>>> : command not found5927:
>>> : command not found5928:
>>> : command not found5929:
>>> : command not found5930:
>>> : command not found5931:
>>> checking whether to enable AMF Serialization support... no
>>> : command not found5974:
>>> : command not found5975:
>>> '/configure: line 26388: syntax error near unexpected token `do
>>> '/configure: line 26388: ` for dir in $PHP_AMF_EXTRA_BUILD_DIRS; do
>>>
>>
>> I also tried a workaround which didn't work.
>>
>> I noticed that the php executable created when I build 5.3.6 from
>> source looks for a php.ini file in /usr/lib (which is not the location
>> of my main php.ini file on Ubuntu 10). I thought it might be possible
>> to set up my Eclipse project to debug with the php executable I build
>> from source with some extra command line parameters to specify a
>> php.ini which would load my amf.so file as a dynamic extension. The
>> command would look something like this:
>> /home/jaith/src/php-5.3.6/sapi/cli/php -c /path/to/php.ini test_file.php
>>
>> Unfortunately, I am unable to build amf.so with debug enabled despite
>> doing this:
>> cd ~/src/php-5.3.6/ext/amf
>> ./configure --enable-debug
>> make
>>
>> When I try to run this command:
>> sapi/cli/php -me
>>
>> I get an error:
>> PHP Warning: PHP Startup: amf: Unable to initialize module
>> Module compiled with build ID=API20090626,NTS
>> PHP compiled with build ID=API20090626,NTS,debug
>> These options need to match
>> in Unknown on line 0
>
> Triple check the correct php.ini file is being read and that the amf.so
> is the one you think it is.
>
>>
>> I'm guessing I'll need to make PHP with --enable-amf, which means I'll
>> need to get the buildconf script to work properly -- or (heaven
>> forbid) try and edit the configuration file manually.
>>
>
> That wouldn't be my first assumption.
>
> Chris
>
> --
> Email: christopher.jones@oracle.com
> Tel: +1 650 506 8630
> Blog: http://blogs.oracle.com/opal/
>
I've removed the warnings for clarity, but I'm certain I'm loading
/usr/lib/php.ini and it refers to the right amf.so
$/home/jaith/src/php-5.3.6/sapi/cli/php -i | grep 'php.ini'
Configuration File (php.ini) Path => /usr/lib
Loaded Configuration File => /usr/lib/php.ini
line 958 of php.ini is this:
extension=/home/jaith/src/php-5.3.6/ext/amf/modules/amf.so
which is the only instance of amf.so in my entire file system.
commenting that line out removes the PHP startup complaint about amf
not matching the PHP executable.