Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 855644 - dev-lang/php-7.4.30 fails to compile (lto): zend_execute.c:67:40: error: global register variable follows a function definition
Summary: dev-lang/php-7.4.30 fails to compile (lto): zend_execute.c:67:40: error: glob...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-07-02 07:21 UTC by Agostino Sarubbo
Modified: 2022-08-26 11:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,614.23 KB, text/plain)
2022-07-02 07:21 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-02 07:21:14 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-lang/php-7.4.30 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-02 07:21:18 UTC
Created attachment 789410 [details]
build.log

build log and emerge --info
Comment 2 Michael Orlitzky gentoo-dev 2022-08-06 22:21:30 UTC
PHP's ./configure script tries to detect whether or not global registers can be used, but the test case isn't a "real life" scenario, so it fails to detect this problem:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384

One can imagine extending the ./configure check so that, in effect, --disable-gcc-global-regs is passed when -flto is in use... however, we are fortunate enough to have some performance measurements that show this to be counterproductive:

  https://github.com/InBetweenNames/gentooLTO/issues/109

Thus given php7's senescence, I think the simple "filter-lto" solution is best here.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-06 22:22:44 UTC
Yeah, let's just filter. It's EOL. We can pursue fixes for the latest branch if it's affected.
Comment 4 Larry the Git Cow gentoo-dev 2022-08-06 22:40:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0361b3029b96e4233c033f5b04ce7d254da2e9a

commit d0361b3029b96e4233c033f5b04ce7d254da2e9a
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2022-08-06 22:24:49 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2022-08-06 22:39:27 +0000

    dev-lang/php: filter LTO flags from php-7.x.
    
    They kill the build, and the performance penalty for the usual
    workaround seems to outweigh the benefit we get from LTO in the first
    place.
    
    Closes: https://bugs.gentoo.org/855644
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 dev-lang/php/php-7.4.30-r1.ebuild | 748 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 748 insertions(+)