Bug #76392 [Com]: Error relocating sapi/cli/php: unsupported relocation type 37

From: Date: Mon, 25 Jun 2018 10:08:11 +0000
Subject: Bug #76392 [Com]: Error relocating sapi/cli/php: unsupported relocation type 37
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215965@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 Comment by: f dot bosch at genkgo dot nl 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: The weird thing is that when you use the same methodology for PHP 7.2, there is no problem. See the official Dockerfile for PHP 7.2 on Alpine 3.7. https://github.com/docker-library/php/blob/master/7.2/alpine3.7/cli/Dockerfile. So something must have changed in the meanwhile. Now I cannot remember for sure, but I believe this is also true for Debian Stretch. I tried to build PHP SRC master with Stretch, based on the official Stretch Dockerfile with some extra deps, but that failed too. Same error. I will try to confirm this. Previous Comments: ------------------------------------------------------------------------ [2018-06-21 11:44:12] cmb@php.net 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> ------------------------------------------------------------------------ [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... ------------------------------------------------------------------------ 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

« previous php.bugs (#215965) next »