Edit report at https://bugs.php.net/bug.php?id=61268&edit=1

 ID:               61268
 Updated by:       php-bugs@lists.php.net
 Reported by:      mike at harschsystems dot com
 Summary:          --enable-dtrace leads make to clobber
                   Zend/zend_dtrace.d
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Compile Failure
 Operating System: solaris
 PHP Version:      5.4.0
 Assigned To:      dsp

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2012-12-09 16:57:50] mike at harschsystems dot com

This bug is still present in 5.5.0 alpha 1.  I just reproduced it on Oracle 
Solaris 11.1.

You must run the configure script with '--enable-dtrace' to trigger the failure 
(and be using gnu make as mentioned already).

mharsch@eleven:~/tmp/php-5.5.0alpha1$ uname -a
SunOS eleven 5.11 11.1 i86pc i386 i86pc
mharsch@eleven:~/tmp/php-5.5.0alpha1$ gmake --version
GNU Make 3.82
Built for i386-pc-solaris2.11
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

------------------------------------------------------------------------
[2012-11-16 05:48:47] d...@php.net

I see what the problem is but cannot reproduce it myself with 5.5.0alpha1. 
Please try the 5.5.0alpha snapshots from http://downloads.php.net/dsp and 
provide me with 'uname -a' and 'gmake --version'.

./configure && gmake works fine for me on

$ uname -a
SunOS foo 5.11 11.0 i86pc i386 i86pc Solaris

which is a Oracle Solaris 5.11.

$ gmake -- version
GNU Make 3.81

------------------------------------------------------------------------
[2012-05-08 04:35:50] mike at harschsystems dot com

I've seen the same failing behavior on 5.4.1 as well.  It's worth noting that 
gmake exhibits this failure mode while regular (non-GNU) make works fine.  So, 
the 
2 workarounds are:

1.) run gmake with the '-r' option
or
2.) run non-GNU make instead of gmake

------------------------------------------------------------------------
[2012-04-22 13:13:01] alasdairrr at gmail dot com

I can confirm I'm seeing this problem too on both Solaris 10 and SmartOS.

------------------------------------------------------------------------
[2012-03-03 20:19:39] mike at harschsystems dot com

Description:
------------
5.4.0 bundle configured with only one option: --enable-dtrace

The configure script runs fine and the build finishes without error.  However, 
the next invocation of 
make (probably from trying to run 'make install') fails with the following 
error:


[jack@fjpe6maa ~/php-5.4.0]$ make install
gcc   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o   -o /home/jack/php-
5.4.0/Zend/zend_dtrace.d
Undefined                       first referenced
 symbol                             in file
main                                /usr/lib/crt1.o
php_request_startup                 /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute_internal             /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute                      /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
php_request_shutdown                /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
zend_throw_exception_internal       /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_compile_file                 /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
$dtrace185178.ZEND_CATCH_SPEC_CONST_CV_HANDLER /home/jack/php-
5.4.0/Zend/zend_dtrace.d.o
zend_error_noreturn                 /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
ld: fatal: symbol referencing errors. No output written to /home/jack/php-
5.4.0/Zend/zend_dtrace.d
collect2: ld returned 1 exit status
make: *** [/home/jack/php-5.4.0/Zend/zend_dtrace.d] Error 1

What's happening here is that make has determined that the file 
Zend/zend_dtrace.d is out of date and 
must be rebuilt.  It matches a built-in implicit rule that ends up running:
gcc   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o   -o /home/jack/php-
5.4.0/Zend/zend_dtrace.d

This command fails with the error that you see, but it also clobbers 
zend_dtrace.d

Here's a bit more detail from 'make -d':
             <snip>
             Prerequisite `/home/jack/php-5.4.0/Zend/zend_dtrace.d.o' is newer 
than target 
`/home/jack/php-5.4.0/Zend/zend_dtrace.d'.
            Must remake target `/home/jack/php-5.4.0/Zend/zend_dtrace.d'.
Invoking builtin recipe to update target `/home/jack/php-
5.4.0/Zend/zend_dtrace.d'.
gcc   /home/jack/php-5.4.0/Zend/zend_dtrace.d.o   -o /home/jack/php-
5.4.0/Zend/zend_dtrace.d
Putting child 80bdaa0 (/home/jack/php-5.4.0/Zend/zend_dtrace.d) PID 5104 on the 
chain.
Live child 80bdaa0 (/home/jack/php-5.4.0/Zend/zend_dtrace.d) PID 5104
Undefined                       first referenced
 symbol                             in file
main                                /usr/lib/crt1.o
php_request_startup                 /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute_internal             /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_execute                      /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
$dtrace187054.ZEND_CATCH_SPEC_CONST_CV_HANDLER /home/jack/php-
5.4.0/Zend/zend_dtrace.d.o
php_request_shutdown                /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
zend_throw_exception_internal       /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
dtrace_compile_file                 /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
zend_error_noreturn                 /home/jack/php-5.4.0/Zend/zend_dtrace.d.o
ld: fatal: symbol referencing errors. No output written to /home/jack/php-
5.4.0/Zend/zend_dtrace.d
collect2: ld returned 1 exit status
Reaping losing child 80bdaa0 PID 5104
make: *** [/home/jack/php-5.4.0/Zend/zend_dtrace.d] Error 1


I was able to work-around this issue by disabling built-in implicit rules with 
'make -r'.  Obviously, I 
had to recover the clobbered file before this worked.

The offending Makefile may be seen here: http://harschsystems.com/bugs/php-
54_sol_dtrace/Makefile.txt

For reference:
On solaris (and solaris-derived) systems, the compilation of USDT dtrace probes 
goes something like this:

$ dtrace -h -o foo_provider.h -s foo_provider.d
>> Generates header file
$ gcc -c foo_src.c
$ dtrace -G -o foo_provider.o -s foo_provider.d foo_src.o
>> Generates object file 
$ gcc -o a.out foo_provider.o foo_src.o

For more detail, see: http://dtrace.org/blogs/dap/2011/12/13/usdt-providers-
redux/

This test system is running an Illumos variant (derived from OpenSolaris).
gmake 3.82

This bug deals with the same part of the build system as another bug I filed 
back in the 5.3 dev branch:
https://bugs.php.net/bug.php?id=53338

As these were the only 2 times I've tried compiling php with dtrace, I'd say 
there should be better test 
coverage of solaris + --enable-dtrace.

Expected result:
----------------
make shouldn't delete source files

Actual result:
--------------
make deletes a source file, rendering the build system inoperable.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61268&edit=1

Reply via email to