Bug #78614 [Csd]: Does not compile with DTRACE anymore

From: Date: Fri, 04 Oct 2019 07:13:38 +0000
Subject: Bug #78614 [Csd]: Does not compile with DTRACE anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223047@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78614&edit=1

 ID:                 78614
 Updated by:         dmitry@php.net
 Reported by:        tz at FreeBSD dot org
 Summary:            Does not compile with DTRACE anymore
 Status:             Closed
 Type:               Bug
 Package:            Compile Failure
 Operating System:   FreeBSD 11.2
 PHP Version:        7.4.0RC2
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

I've committed this patch.


Previous Comments:
------------------------------------------------------------------------
[2019-10-04 07:11:02] dmitry@php.net

Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3ded328bea54442308590473a259bdc008a2d3c0
Log: Fixed bug #78614 (Does not compile with DTRACE anymore)

------------------------------------------------------------------------
[2019-10-04 07:10:33] dmitry@php.net

Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3ded328bea54442308590473a259bdc008a2d3c0
Log: Fixed bug #78614 (Does not compile with DTRACE anymore)

------------------------------------------------------------------------
[2019-10-03 21:22:07] tz at FreeBSD dot org

Adding --with-pic does not work. Porting the patch you mentioned works. Here the patch:

--- build/php.m4.orig	2019-10-03 20:45:52 UTC
+++ build/php.m4
@@ -2326,7 +2326,7 @@ dnl header-file.
 dnl Add providerdesc.o or .lo into global objects when needed.
   case $host_alias in
   *freebsd*)
-    PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
+    PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
     PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
     ;;
   *solaris*)
@@ -2374,7 +2374,7 @@ $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_pr
 EOF
 
   case $host_alias in
-  *solaris*|*linux*)
+  *solaris*|*linux*|*freebsd*)
     dtrace_prov_name="echo $ac_provsrc | $SED -e 's#\(.*\)\/##'.o"
     dtrace_lib_dir="echo $ac_bdir[$]ac_provsrc | $SED -e
's#\(.*\)/[^/]*#\1#'/.libs"
     dtrace_d_obj="echo $ac_bdir[$]ac_provsrc | $SED -e
's#\(.*\)/\([^/]*\)#\1/.libs/\2#'.o"

------------------------------------------------------------------------
[2019-10-03 10:08:14] dmitry@php.net

The problem occurs, only if executable (CLI, CGI, FPM) and shared (Apache) SAPIs are built together.
In this case shared SPAI influences build system to use PIC object files for DTRACE for all SAPIs. 

Te problem doesn't exist on Linux and Solaris, because both PIC and non-PIC DTRACE objects are
created. See https://github.com/php/php-src/commit/0ebef462ceb

For workaround add "--with-pic" to configure arguments or build Apache and other SAPIs
separately.

------------------------------------------------------------------------
[2019-10-02 19:38:18] nikic@php.net

@dmitry: Possibly related to PIC changes?

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=78614


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


Thread (7 messages)

« previous php.bugs (#223047) next »