Server CE 4.0.5 & Mac Snow Leopard & xdebug

General discussion forum for the Zend Server

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby belyakov on Sat Sep 12, 2009 10:00 am

Hello, Jess.

Thanks again for your effort to help me - it's definitely my compilation. I tried several times to checkout XDebug through pecl and it still doesn't work.
I even compiled it by hand from source - still no luck. I don't know where to dig further.

I think it might be some strange incompatibility of XDebug 2.0.5.
Anyway i found a precompiled version 2.0.4 at Komodo website located here: http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging and it works fine.

Still no idea why pecl distribution doesn't.

Dmitry.
belyakov
 
Posts: 12
Joined: Sat Apr 25, 2009 1:26 pm

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby jess04 on Sun Sep 13, 2009 2:49 pm

Hi Dmitry,

Found the cause and the solution, please do:
Code: Select all
# ftp http://pecl.php.net/get/xdebug-2.0.5.tgz
# tar zxvf xdebug-2.0.5.tgz
# cd xdebug-2.0.5
# export CFLAGS='-arch i386 -arch x86_64'
# /usr/local/zend/bin/phpize
# ./configure
# make && make install


The key here is exporting CFLAGS='-arch i386 -arch x86_64' but I thought you'd enjoy being able to just copy paste the entire thing :)
Let me know how it went.
Last edited by jess04 on Wed Oct 28, 2009 9:39 pm, edited 2 times in total.
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby belyakov on Tue Sep 15, 2009 4:30 pm

jess04 wrote:Hi Dmitry,

The key here is exporting CFLAGS='-arch i386' but I thought you'd enjoy being able to just copy paste the entire thing :)
Let me know how it went.


Hi, Jess.

Well, you are right that was the tricky part. Now everything is working!
Thanks a lot for your help. I really appreciate that and hope it might be helpful to someone else.

Thanks again and good luck.
Dmitry.
belyakov
 
Posts: 12
Joined: Sat Apr 25, 2009 1:26 pm

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby jess04 on Tue Sep 15, 2009 5:25 pm

Hello Dmitry,

Glad it works and of course, you're welcome.

Enjoy ZendServer,
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby davelowndes on Wed Oct 14, 2009 10:53 am

Sorry to take over the thread, but I'm having the same issue getting xdebug loaded with Zend Server CE 4.0.5 (PHP 5.2.10). I've tried all the options here plus numerous incantations found on the web with no luck. It's driving me insane. Any help appreciated :)

This is my current attempt, but fails just like the rest.

# ftp http://pecl.php.net/get/xdebug-2.0.5.tgz
# tar zxvf xdebug-2.0.5.tgz
# cd xdebug-2.0.5
# export CFLAGS='-arch i386'
# sudo /usr/local/zend/bin/phpize
# sudo ./configure --with-php-config=/usr/local/zend/bin/php-config
# sudo make install

"Failed loading /usr/local/zend/lib/php_extensions/xdebug.so: (null)"

I've tried compiling against XDEBUG_2_0_5, 4 and 3 tags as well as the head, using a variety of different config options (incl. "--enable-xdebug") but they all fail. Attached is my latest compile attempt (using a cvs checkout) and config.log. Currently php.ini has:

zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so

Thanks in advance!
Attachments
config.log
(18.76 KiB) Downloaded 270 times
xdebug.txt
(31.58 KiB) Downloaded 259 times
davelowndes
 
Posts: 3
Joined: Wed Oct 14, 2009 10:33 am

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby jess04 on Wed Oct 14, 2009 12:29 pm

Hello,

For some strange reason I am unable to download the logs you attached.
Can you please run:
Code: Select all
# file /usr/local/zend/lib/php_extensions/xdebug.so

And paste the output?
Also, attaching the Xdebug I built and tested on my 10.6 machine, can you try to load it and tell me if it works?

Thanks,
Attachments
xdebug.tar.gz
(215 Bytes) Downloaded 264 times
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby davelowndes on Wed Oct 14, 2009 1:05 pm

Hi Jess

Thanks for your quick response.

development:xdebug dave$ file /usr/local/zend/lib/php_extensions/xdebug.so
/usr/local/zend/lib/php_extensions/xdebug.so: Mach-O bundle i386

The file you attached didn't work. I did notice a big file size difference, my xdebug.so was 220kb.

I've attached a zip file of the same logs, maybe that'll work.

At the moment I have 3 theories:
1. I'm screwing something up in the compile re: 64/32 bit
2. These entries in config.log have something to do with it...

configure:2327: cc -V >&5
gcc-4.2: argument to `-V' is missing
configure:2330: $? = 1

...

configure:3364: cc -o conftest -arch i386 conftest.c -R /usr/lib >&5
ld: in /usr/lib, can't map file, errno=22
collect2: ld returned 1 exit status

(I have no conftest.c, mentioned alot in the compile log)

3. for some reason xdebug is expecting php 5.3 but it's running against 5.2.10

thanks again

Dave
Attachments
xdebug_logs.zip
(9.76 KiB) Downloaded 243 times
davelowndes
 
Posts: 3
Joined: Wed Oct 14, 2009 10:33 am

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby jess04 on Wed Oct 14, 2009 2:56 pm

Hi Dave,

First, you're welcome.
The archive I attached before was somehow corrupted, I'm re-uploaded now.
I built against PHP 5.2.10 sources, I didn't quite understand from your last post if you're using 5.3.0 or 5.2.10...
Also, in your last post you wrote:

configure:3364: cc -o conftest -arch i386 conftest.c -R /usr/lib >&5
ld: in /usr/lib, can't map file, errno=22
collect2: ld returned 1 exit status

Is this something you see during configure? Because I couldn't find that in the files you attached.
What I did see is that the CFLAGS are not passed along, you should see output along these lines:
Code: Select all
/bin/sh /tmp/xdebug-2.0.5/libtool --mode=compile cc  -I. -I/tmp/xdebug-2.0.5 -DPHP_ATOM_INC -I/tmp/xdebug-2.0.5/include -I/tmp/xdebug-2.0.5/main -I/tmp/xdebug-2.0.5 -I/usr/local/zend/include/php -I/usr/local/zend/include/php/main -I/usr/local/zend/include/php/TSRM -I/usr/local/zend/include/php/Zend -I/usr/local/zend/include/php/ext -I/usr/local/zend/include/php/ext/date/lib  -DHAVE_CONFIG_H [b]-arch i386 -arch x86_64[/b]   -c /tmp/xdebug-2.0.5/xdebug_xml.c -o xdebug_xml.lo


The emphasis is course on -arch i386 -arch x86_64 [its best to compile for both archs].

Let me know if this build works, if you need one against 5.3 let me know and I'll attach it.
Attachments
xdebug.tar.gz
(146.21 KiB) Downloaded 262 times
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby davelowndes on Wed Oct 14, 2009 10:39 pm

Hi Jess,

Happy to report that both your attachment and my compilation are working. Not sure why the compilation is working now (I had fixed the CFLAGS options earlier), seems a bit magical. But I won't ask too many questions.

Many thanks for your help!
davelowndes
 
Posts: 3
Joined: Wed Oct 14, 2009 10:33 am

Re: Server CE 4.0.5 & Mac Snow Leopard & xdebug

Postby jess04 on Wed Oct 14, 2009 11:27 pm

Hi Dave,

You're quite welcome.
Enjoy ZendServer,
May the source be with you,

Jess Portnoy
jess04
 
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

PreviousNext

Return to Zend Server

Who is online

Users browsing this forum: No registered users and 2 guests