|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53338 DTrace build config broken by Rev 305329
Submitted: 2010-11-18 06:30 UTC Modified: 2010-11-18 17:03 UTC
From: mike at harschsystems dot com Assigned: jani (profile)
Status: Closed Package: Compile Failure
PHP Version: trunk-SVN-2010-11-18 (snap) OS: Solaris and OS X
Private report: No CVE-ID: None
 [2010-11-18 06:30 UTC] mike at harschsystems dot com
The changes made in Rev 305329 break the --enable-dtrace configuration option on 
both Solaris and OS X.  

The main problems I was able to identify are:

1.) The steps required to build DTrace-enabled binaries are different on Solaris 
and OS X (see references below).  305329 removed the platform check that allowed 
OS X to bypass the extra linking step required by Solaris (dtrace -G -s ...).

2.) The generation of the DTrace header file (zend_dtrace_gen.h via 'dtrace -h 
...') was moved to Makefile (from configure) - this broke various targets that 
depended on the header file prior to it's generation (late in the Makefile).

3.) A typo (I think) in the path variable used to generate the DTrace targets 
injected junk into the pathnames, breaking the build.

The included patch file "dtrace_build.patch" may be applied to Rev 305455 to 
resolve these issues.  It essentially re-enlists some of the functionality that 
existed prior to 305329.  This has been tested on both OS X and Solaris.

Examples of how to build DTrace USDT probes on Solaris, see:

For the relevant documentation on OS X, see the dtrace(1M) man page:

Expected result:
--enable-dtrace should configure and build on platforms that have DTrace (Solaris 
and OS X - maybe FreeBSD?)

Actual result:
--enable-dtrace fails on both platforms for the reasons mentioned in the 
Description section.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-18 06:39 UTC] mike at harschsystems dot com
I can't seem to upload the patch file.  Please refer to the patch file contents 
 [2010-11-18 09:44 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: jani
 [2010-11-18 09:44 UTC]
Me break, me fix. :)
 [2010-11-18 09:53 UTC]
1) So providerdesc.o is only build and linked with when under Solaris? 
2) What in Makefile did depend on the header file before it was created? 
3) I need the generated Makefile you got with current trunk (without your patch!)
 [2010-11-18 11:11 UTC]
Automatic comment from SVN on behalf of jani
Log: - Fixed DTrace support in MacOSX (bug #53338)
 [2010-11-18 14:37 UTC]
1) So providerdesc.o is only build and linked with when under Solaris?

yes because dtrace on Solaris generates stubs that need to be compiled in. On Mac 
OS the necessary switch to generate providerdesc.o doesn't exist on Mac OS.
 [2010-11-18 16:34 UTC] mike at harschsystems dot com
2.) I think it was main/main.c which includes zend_dtrace.h which includes 
zend_dtrace_gen.h, but this problem seems to be fixed by placing the 'dtrace -h' 
line earlier in the Makefile (which now seems to be the case as of 

3.) - see line 498.  I was able to work around this 
problem by changing the following line in acinclude.m4:

dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@ && \$(SED) -ibak 
's,PHP_,DTRACE_,g' \$[]@


dtrace -h -C -s $abs_srcdir/[$]ac_provsrc -o \$[]@ && \$(SED) -ibak 
's,PHP_,DTRACE_,g' \$[]@

Once this is fixed, the build appears to work on both Solaris and OS X using Rev 
 [2010-11-18 17:02 UTC]
Automatic comment from SVN on behalf of jani
Log: - One more fix for bug #53338 (when copying stuff from other macros, do it all the way.. :)
 [2010-11-18 17:03 UTC]
-Status: Assigned +Status: Closed
 [2010-11-18 17:03 UTC]
Fixed now in SVN. Tested with OSX though, but should work the same on solaris.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Mar 04 22:01:30 2024 UTC