Bug #76392 [Ver]: Error relocating sapi/cli/php: unsupported relocation type 37
| From: | cmb@php.net | Date: | Thu, 21 Jun 2018 11:44:13 +0000 |
| Subject: | Bug #76392 [Ver]: Error relocating sapi/cli/php: unsupported relocation type 37 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215829@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76392&edit=1
ID: 76392
Updated by: cmb@php.net
Reported by: peterkokot at gmail dot com
Summary: Error relocating sapi/cli/php: unsupported
relocation type 37
Status: Verified
Type: Bug
Package: *Compile Issues
Operating System: Alpine 3.7
PHP Version: 7.3.0alpha2
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
It appears that the *compiler* supports ifunc, but the *runtime*
does not. Instead of only checking whether ifunc can be
compiled[1], we may need to actually run the resulting executable
and check the status code.
[1] <https://github.com/php/php-src/blob/98aa3a65c4e68e4cd50ab62221a409e4b74cec65/build/ax_gcc_func_attribute.m4#L152-L156>
Previous Comments:
------------------------------------------------------------------------
[2018-06-21 11:32:06] laruence@php.net
So building PHP with ifunc supported environment and run it in a environment which is not supporting
ifunc? (STT_GNU_IFUNC)
------------------------------------------------------------------------
[2018-06-21 10:56:46] cmb@php.net
@laruence, could you please have a look at this?
------------------------------------------------------------------------
[2018-06-21 10:45:43] marcel_989 at hotmail dot com
I'm experiencing this error on PHP 7.3 alpha1 and alpha2 and Alpine Linux 3.6. However,
I'm not even able to compile the executable: the error pops up during the linkage phase.
Dockerfile that reproduces the crash: https://pastebin.com/raw/ES8iFJe8
Build log (I chopped off most compilation lines, is was too much for PasteBin): https://pastebin.com/raw/ny4Jt43c
------------------------------------------------------------------------
[2018-06-20 22:00:51] peterkokot at gmail dot com
Yes, verified. Removing the ifunc lines from the ax_gcc_func_attribute.m4 file works as it should
then. The buildconf script outputs few warnings but then everthing goes normally through and
compiles.
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
rebuilding aclocal.m4
rebuilding configure
configure.ac:584: warning: Unsupported attribute ifunc, the test may fail
../../lib/autoconf/lang.m4:224: AC_LANG_SOURCE is expanded from...
../../lib/autoconf/lang.m4:241: AC_LANG_PROGRAM is expanded from...
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
build/ax_gcc_func_attribute.m4:82: AX_GCC_FUNC_ATTRIBUTE is expanded from...
rebuilding main/php_config.h.in
configure.ac:584: warning: Unsupported attribute ifunc, the test may fail
../../lib/autoconf/lang.m4:224: AC_LANG_SOURCE is expanded from...
../../lib/autoconf/lang.m4:241: AC_LANG_PROGRAM is expanded from...
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
build/ax_gcc_func_attribute.m4:82: AX_GCC_FUNC_ATTRIBUTE is expanded from...
------------------------------------------------------------------------
[2018-06-20 21:32:32] cmb@php.net
Great, thanks! It seems to me that __attribute__((ifunc(â¦))) is
not supported by this runtime. To verify this, consider to remove
the ifunc support detection[1].
[1] <https://github.com/php/php-src/blob/98aa3a65c4e68e4cd50ab62221a409e4b74cec65/build/ax_gcc_func_attribute.m4#L152-L156>
------------------------------------------------------------------------
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=76392
--
Edit this bug report at https://bugs.php.net/bug.php?id=76392&edit=1