php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52407 FPM module compilation fails on ARM architecture
Submitted: 2010-07-22 17:16 UTC Modified: 2010-08-21 08:46 UTC
From: eugenesan at gmail dot com Assigned: fat (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.3.3 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: eugenesan at gmail dot com
New email:
PHP Version: OS:

 

 [2010-07-22 17:16 UTC] eugenesan at gmail dot com
Description:
------------
FPM module compilation fails on ARM architecture.
Fix attached while approved by original code author (W-Mark Kubacki)

Test script:
---------------
configure with --enable-fpm and build on ARM machine




Expected result:
----------------
Compilation should pass and binary work.


Patches

fpm-gcc-atomics.patch (last revision 2010-07-28 21:31 UTC by [email protected])
fpm_atomic_h_fix.patch (last revision 2010-07-24 12:36 UTC by [email protected])

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-22 17:20 UTC] [email protected]
-Status: Open +Status: Feedback
 [2010-07-22 17:20 UTC] [email protected]
I see no attachment.
 [2010-07-22 17:21 UTC] [email protected]
-Status: Feedback +Status: Open
 [2010-07-22 17:21 UTC] [email protected]
Never mind, it's there now :-)
 [2010-07-22 17:30 UTC] eugenesan at gmail dot com
Patch passed heavy load test.
 [2010-07-23 09:29 UTC] [email protected]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: fat
 [2010-07-24 02:00 UTC] [email protected]
As a matter of fact, why aren't the gcc atomic builtins used in all architectures 
if gcc > 4.1 is used? Otherwise it is going to be a pain to port the atomic code 
to many architectures.
I've read that icc supports them too, but I don't know since when or anything 
else.

For the Debian packages I'm going to do that, but I'd prefer to see the change 
happen here too (included a cleanup of the unused atomic_*_t types -- only 
atomic_t needs to be defined.)
 [2010-07-24 10:38 UTC] eugenesan at gmail dot com
I wasn't aware of atomic functionality in libgcc.
In older version of FPM (before W-Mark Kubacki provided current solution),
I was copying atomic functions available in libc :-)

Also, W-Mark Kubacki tried to propose libatomic as generic 
solution for all platforms, but due to stability reasons solution was declined.

Anyways, provided patch is only for urgent fixing of FPM on ARM in PHP 5.3.3.
Later, I would expect more serious treatment of the issue by maintainers.
 [2010-07-24 14:36 UTC] [email protected]
The following patch has been added/updated:

Patch Name: fpm_atomic_h_fix.patch
Revision:   1279974965
URL:        http://bugs.php.net/patch-display.php?bug=52407&patch=fpm_atomic_h_fix.patch&revision=1279974965
 [2010-07-24 14:37 UTC] [email protected]
Can you please test & validate this patch on ARM arch ?

I've added an #error if ARM && gcc <= 4.2
 [2010-07-28 23:31 UTC] [email protected]
The following patch has been added/updated:

Patch Name: fpm-gcc-atomics.patch
Revision:   1280352665
URL:        http://bugs.php.net/patch-display.php?bug=52407&patch=fpm-gcc-atomics.patch&revision=1280352665
 [2010-07-28 23:34 UTC] [email protected]
I attached the patch that I'm going to use for the Debian packages until it is 
fixed here directly.
Jérôme, could you consider it?
 [2010-08-21 08:46 UTC] [email protected]
Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302600
Log: - Fix #52407 (use __sync_bool_compare_and_swap in fpm_atomic.h if gcc &gt;= 4.1 is used - credit to geissert)
 [2010-08-21 08:46 UTC] [email protected]
-Status: Assigned +Status: Closed
 [2010-08-21 08:46 UTC] [email protected]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2010-08-21 10:35 UTC] eugenesan at gmail dot com
Thanks all
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Dec 24 04:00:02 2025 UTC