php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69896 zend_operators.h:685:2: error: 'asm' operand has impossible constraints
Submitted: 2015-06-21 13:09 UTC Modified: 2015-08-02 19:25 UTC
From: fh-phpbugs at fholzhauer dot de Assigned: ab (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.0.0beta2 OS: Ubuntu Linux - Trusty 14.04.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fh-phpbugs at fholzhauer dot de
New email:
PHP Version: OS:

 

 [2015-06-21 13:09 UTC] fh-phpbugs at fholzhauer dot de
Description:
------------
I used the same configure statements I currently use to build php5.6 to give php7 a first try. 

While the amd64 version successfully built, the i386 version failed:

In file included from /«PKGBUILDDIR»/Zend/zend.h:338:0,
                 from /«PKGBUILDDIR»/Zend/zend_execute.c:27:
/«PKGBUILDDIR»/Zend/zend_vm_execute.h: In function 'ZEND_SUB_SPEC_CV_CV_HANDLER':
/«PKGBUILDDIR»/Zend/zend_operators.h:685:2: error: 'asm' operand has impossible constraints
  __asm__(
  ^
make[1]: *** [Zend/zend_execute.lo] Error 1

Full buildlog:
https://launchpadlibrarian.net/209648281/buildlog_ubuntu-trusty-i386.php7-ies_7.0.0alpha1-0ies1~trustyppa_BUILDING.txt.gz




Patches

disable-asm-for-gcc-4.8 (last revision 2015-08-01 15:57 UTC by ab@php.net)
bug69896-attempt (last revision 2015-06-21 14:02 UTC by kalle@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-21 14:02 UTC] kalle@php.net
The following patch has been added/updated:

Patch Name: bug69896-attempt
Revision:   1434895343
URL:        https://bugs.php.net/patch-display.php?bug=69896&patch=bug69896-attempt&revision=1434895343
 [2015-06-21 14:03 UTC] kalle@php.net
Hi, although this is outside my area of expertise, can you give the patch a try? It seems like the issue is caused by forcing a scratch registry using the 'r' constraint.
 [2015-06-21 14:03 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2015-06-22 13:57 UTC] fh-phpbugs at fholzhauer dot de
-Status: Feedback +Status: Open
 [2015-06-22 13:57 UTC] fh-phpbugs at fholzhauer dot de
No, sorry - using this patch still fails on the same line.
 [2015-07-31 07:57 UTC] ondrej@php.net
-PHP Version: 7.0.0alpha1 +PHP Version: 7.0.0beta2
 [2015-07-31 07:57 UTC] ondrej@php.net
I can confirm that this still happens with 7.0.0beta2 and only on i386 architecture, up-to-date build log is here:

https://launchpadlibrarian.net/213100318/buildlog_ubuntu-trusty-i386.php7.0_7.0.0~beta2-1%2Bdeb.sury.org~trusty%2B3_BUILDING.txt.gz

In file included from /«PKGBUILDDIR»/Zend/zend.h:339:0,
                 from /«PKGBUILDDIR»/Zend/zend_execute.c:27:
/«PKGBUILDDIR»/Zend/zend_vm_execute.h: In function 'ZEND_SUB_SPEC_CV_CV_HANDLER':
/«PKGBUILDDIR»/Zend/zend_operators.h:684:2: error: 'asm' operand has impossible constraints
  __asm__(
  ^
make[2]: *** [Zend/zend_execute.lo] Error 1
 [2015-08-01 15:32 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2015-08-01 15:57 UTC] ab@php.net
The following patch has been added/updated:

Patch Name: disable-asm-for-gcc-4.8
Revision:   1438444625
URL:        https://bugs.php.net/patch-display.php?bug=69896&patch=disable-asm-for-gcc-4.8&revision=1438444625
 [2015-08-01 16:01 UTC] ab@php.net
-Status: Assigned +Status: Feedback
 [2015-08-01 16:01 UTC] ab@php.net
Ondrej,

this appears to be bug in gcc 4.8. A lot of bugs about constraints are around for this version. Libs like ffmpeg, etc. recommend disabling asm. If you can switch to gcc 4.9 or gcc 4.7 - it would likely solve this.

Nevertheless I've attached a patch disabling this part for gcc 4.8. However not sure it's the correct solution. I've tested at least on OpenSUSE and gcc 4.8 works fine there (however not directly on i386 but with -m32). This might be a Debian only issue, in which case it should probably reported to the corresponding gcc package maintainers.

For now, could you please confirm that using either gcc 4.7 or 4.9 solves this? The patch should solve it anyway.

Thanks.
 [2015-08-02 06:11 UTC] remi@php.net
-Status: Feedback +Status: Verified
 [2015-08-02 06:11 UTC] remi@php.net
I didn't encounter this issue, mostly because I don't have any gcc 4.8 / 32bits target ;)

Fedora use gcc 4.9 or 5.1
RHEL 6 use gcc 4.4
RHEL 7 use gcc 4.8 but is 64bits only.

So I run some test builds

Fedora 18 (gcc 4.7.2): build ok
Fedora 20 (gcc 4.8.3): same error, fixed by the proposed patch
 [2015-08-02 07:31 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ee2e1691080dad2a3110107dd8bd02ee23b41fa0
Log: Fixed bug #69896 'asm' operand has impossible constraints
 [2015-08-02 07:31 UTC] ab@php.net
-Status: Verified +Status: Closed
 [2015-08-02 07:50 UTC] ab@php.net
Thanks for the checks, Remi. So the part is broken at least in two distros. Probably fair enough to disable for all i386 gcc-4.8 as no guarantee what happens elsewhere.

Thanks.
 [2015-08-02 11:02 UTC] clicky at erebot dot net
The build is still broken for me on Debian Stretch 64 bits (gcc version 4.9.2 (Debian 4.9.2-10)).
Using the attached patch did not fix the issue (obviously, since the patch is specifically targetted towards GCC 4.8.x).

It only triggers when building a 32 bits version of PHP.
 [2015-08-02 15:32 UTC] ab@php.net
@clicky, hm, I don't reproduce it, fetched a fresh stretch iso just now. Tried with your description in #69765 as well. Another way to keep asm for 4.8 could be maybe removing --with-layout=GNU, as I've observed. But either way, no issue with gcc 4.9 for me.

Ondrej, can you check as well please?

Thanks.
 [2015-08-02 19:25 UTC] fh-phpbugs at fholzhauer dot de
I can also confirm that the new patch fixes the problem for me.
 [2015-08-04 20:54 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ee2e1691080dad2a3110107dd8bd02ee23b41fa0
Log: Fixed bug #69896 'asm' operand has impossible constraints
 [2016-02-08 22:29 UTC] michael at orlitzky dot com
We have a similar report at,

  https://bugs.gentoo.org/show_bug.cgi?id=571658

that suggests the problem may still exist with gcc-4.9.x.
 [2016-07-20 11:37 UTC] davey@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ee2e1691080dad2a3110107dd8bd02ee23b41fa0
Log: Fixed bug #69896 'asm' operand has impossible constraints
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC