[OpenIndiana-discuss] DTrace with PHP 5.3

Lou Picciano loupicciano at comcast.net
Fri Sep 23 01:59:46 UTC 2011


Alasdair, 

Have since tried php-5.3.99 from trunk, and am seeing a bit more - this may even be useful feedback! FWIW, I am not seeing the undefined symbol errors... 

(I'll also try the author - he'll know we're really interested!) 

Lou 

/export/home/drlou/Downloads/php/Zend/zend.c: In function `zend_error': 
/export/home/drlou/Downloads/php/Zend/zend.c:1072: warning: passing arg 2 of `__dtrace_php___error' discards qualifiers from pointer target type 
dtrace -G -o Zend/zend_dtrace.d.o -s /export/home/drlou/Downloads/php/Zend/zend_dtrace.d main/.libs/main.o Zend/.libs/zend_API.o Zend/.libs/zend_execute.o Zend/.libs/zend_exceptions.o Zend/.libs/zend_dtrace.o Zend/.libs/zend.o 
dtrace: failed to compile script /export/home/drlou/Downloads/php/Zend/zend_dtrace.d: "/usr/lib/dtrace/mpi.d", line 70: failed to resolve type genunix`kthread_t * for identifier curthread: Module and program data models do not match 
make: *** [Zend/zend_dtrace.d.o] Error 1 

----- Original Message -----
From: "Alasdair Lumsden" <alasdairrr at gmail.com> 
To: "Discussion list for OpenIndiana" <openindiana-discuss at openindiana.org> 
Cc: "Lou Picciano" <loupicciano at comcast.net> 
Sent: Tuesday, September 20, 2011 4:16:25 PM 
Subject: Re: Fwd: [OpenIndiana-discuss] DTrace with PHP 5.3 

Hi Lou, 

On 09/17/11 03:53 PM, Lou Picciano wrote: 
> Your timing on this couldn't be better - I've been doing a lot of builds 
> of v5.3.8 this week. One major point for us is that we need the 'embed' 
> SAPI, but haven't been able to build embed and apxs2 into the same build 
> tree... 
> 
> I'm sure you've got it covered better than I could, but do let me know 
> if I can help... Lou 

Have you had any luck porting the dtrace bits to php 5.3.8? I 
successfully managed to "port" (or at least merge) the integrated dtrace 
bits from PHP 5.3.99 (the codename for php 6 I think) into 5.3.8, 
however it bombs out in the install stage at the last minute: 

alasdair php (al-sunbox.office): pfexec gmake install 
cc /export/home/alasdair/php/Zend/zend_dtrace.d.o -o 
/export/home/alasdair/php/Zend/zend_dtrace.d 
Undefined first referenced 
symbol in file 
main /opt/SUNWspro/prod/lib/crt1.o 
php_request_startup /export/home/alasdair/php/Zend/zend_dtrace.d.o 
dtrace_execute_internal /export/home/alasdair/php/Zend/zend_dtrace.d.o 
dtrace_execute /export/home/alasdair/php/Zend/zend_dtrace.d.o 
zend_error /export/home/alasdair/php/Zend/zend_dtrace.d.o 
php_request_shutdown /export/home/alasdair/php/Zend/zend_dtrace.d.o 
zend_throw_exception_internal /export/home/alasdair/php/Zend/zend_dtrace.d.o 
dtrace_compile_file /export/home/alasdair/php/Zend/zend_dtrace.d.o 
$dtrace11568901.ZEND_CATCH_SPEC_CONST_CV_HANDLER 
/export/home/alasdair/php/Zend/zend_dtrace.d.o 
ld: fatal: symbol referencing errors. No output written to 
/export/home/alasdair/php/Zend/zend_dtrace.d 
gmake: *** [/export/home/alasdair/php/Zend/zend_dtrace.d] Error 1 

I thought perhaps my port of the code had gone wrong, but then I tried 
building php 5.3.99 itself, and it had exactly the same issue. 

I have tried with both gcc 3.4.3, gcc 4.5.2, and Sun Studio and always 
encounter the same problem. 

I contacted what I think is the main author of the DTrace patch in PHP 
5.3.99 (David Soria Parra) and he replied to my first email but hasn't 
gotten back to me yet after I provided more info to him. 

It would be interesting to see if you can get php 5.3.99 to successfully 
build with dtrace enabled. Instructions are here: 

http://blog.experimentalworks.net/2010/04/php-5-3-99-dev-and-dtrace-part-i/ 

I might try older revisions from the subversion repo if I find time. 

Cheers, 

Alasdair 


More information about the OpenIndiana-discuss mailing list