php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69657 Shared memory detection during cross-compile fails OPcache
Submitted: 2015-05-18 21:52 UTC Modified: 2021-07-18 04:22 UTC
From: mhei at heimpold dot de Assigned: cmb (profile)
Status: No Feedback Package: *Configuration Issues
PHP Version: 5.6.9 OS: Linux / OpenWrt
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
37 - 2 = ?
Subscribe to this entry?

 
 [2015-05-18 21:52 UTC] mhei at heimpold dot de
Description:
------------
At the moment, during the configure stage at compile time, it is determined which shared memory variants are available. For this, tiny C programms are just-in-time compiled and then defines are set.

This does not work well when cross-compiling as we do for OpenWrt for example: we could try to successfully compile the programm, but it is not possible to actually run it.
So without further modification this leads to a php binary/opcache addon which does not have _any_ shared memory implementation compiled in, and it results in errors like this one:
https://github.com/openwrt/packages/issues/1010

Maybe it possible to not rely the detection on such run-during-compile tests? I'm no autoconf expert, but I wonder whether there is a possibility to "preseed" the test results?
To make it work for OpenWrt, we hacked a patch which simply checks for one important function used by one SHM implementation or the other. But this might not be sufficient.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-06 16:16 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-06 16:16 UTC] cmb@php.net
Is this still unresolved for any of the actively supported PHP
versions[1]?  If so, I suggest you provide a PR[2] for better
visibility.

[1] <https://www.php.net/supported-versions.php>
[2] <https://github.com/php/php-src/pulls>
 [2021-07-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 16:01:33 2025 UTC