Bug #78614 [Asn]: Does not compile with DTRACE anymore
Edit report at https://bugs.php.net/bug.php?id=78614&edit=1
ID: 78614
User updated by: tz at FreeBSD dot org
Reported by: tz at FreeBSD dot org
Summary: Does not compile with DTRACE anymore
Status: Assigned
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:
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"
Previous Comments:
------------------------------------------------------------------------
[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?
------------------------------------------------------------------------
[2019-10-02 19:15:30] tz at FreeBSD dot org
Same error for RC 3. You can find a full log of error messages here:
http://www.meisterderspiele.de/freebsd/php74-7.4.0.r3.log
------------------------------------------------------------------------
[2019-09-30 21:20:22] tz at FreeBSD dot org
Description:
------------
While RC1 compiles fine, RC2 does not compile anymore with the same configuration. There are a bunch
of undefined references. For example:
=== start ===
--- sapi/fpm/php-fpm ---
Zend/zend_dtrace.d.o:(.SUNW_dof+0x1e0): undefined reference to
`$dtrace1723905.zend_error_va_list'
--- sapi/phpdbg/phpdbg ---
Zend/zend_dtrace.d.o:(.SUNW_dof+0x1e0): undefined reference to
`$dtrace1723905.zend_error_va_list'
--- sapi/cli/php ---
Zend/zend_dtrace.d.o:(.SUNW_dof+0x1e0): undefined reference to
`$dtrace1723905.zend_error_va_list'
--- sapi/fpm/php-fpm ---
Zend/zend_dtrace.d.o:(.SUNW_dof+0x210): undefined reference to
`$dtrace1723894.ZEND_CATCH_SPEC_CONST_HANDLER'
--- sapi/phpdbg/phpdbg ---
Zend/zend_dtrace.d.o:(.SUNW_dof+0x210): undefined reference to
`$dtrace1723894.ZEND_CATCH_SPEC_CONST_HANDLER'
--- sapi/cli/php ---
Zend/zend_dtrace.d.o:(.SUNW_dof+0x210): undefined reference to
`$dtrace1723894.ZEND_CATCH_SPEC_CONST_HANDLER'
--- sapi/fpm/php-fpm ---
main/main.o: In function `php_request_startup':
main.c:(.text+0x1052): undefined reference to `__dtrace_php___request__startup'
=== end ===
You can find a full log with all error messages here:
http://www.meisterderspiele.de/freebsd/php74-7.4.0.r2.log
Greetings,
Torsten
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78614&edit=1
Thread (7 messages)