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

From: Date: Thu, 28 Jun 2018 13:31:33 +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-216014@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:         peterkokot at gmail dot com
 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:

Pull request:
https://github.com/php/php-src/pull/3349

On Debian Stretch it works ok, since these systems include glibc which has function attributes.


Previous Comments:
------------------------------------------------------------------------
[2018-06-25 10:08:08] f dot bosch at genkgo dot nl

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.

------------------------------------------------------------------------
[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

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


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


Thread (15 messages)

« previous php.bugs (#216014) next »