php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80211 Source code compilation compatibility
Submitted: 2020-10-10 04:26 UTC Modified: 2020-10-25 04:22 UTC
From: 2233466866 at qq dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 8.0.0rc1 OS: CentOS7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-10-10 04:26 UTC] 2233466866 at qq dot com
Description:
------------
When I try to compile the source code to install the curl extension, I am prompted:
/root/php-8.0.0rc1/ext/curl/multi.c:574:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
  for (zval *pz_ch = (zval *) zend_llist_get_first_ex(&curl_multi->easyh, &pos); pz_ch;

Test script:
---------------
cd ~
wget https://downloads.php.net/~carusogabriel/php-8.0.0rc1.tar.gz
tar -zxvf php-8.0.0rc1.tar.gz
cd php-8.0.0rc1/ext/curl
phpize
./configure
make

Expected result:
----------------
Build complete.
Don't forget to run 'make test'.

Actual result:
--------------
Build complete.
Don't forget to run 'make test'.

Patches

php-8.0.0rc1_ext_curl_multi.c (last revision 2020-10-10 04:26 UTC by 2233466866 at qq dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-10 04:51 UTC] levim@php.net
PHP requires C99 or newer. My guess is that for CentoS you should use a newer developer toolset when compiling PHP. See:

https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/
 [2020-10-10 14:24 UTC] danack@php.net
Are you able to share a dockerfile for the system you're seeing this on?

I tried to make a M4 check so that people get a clearer error message, and get an earlier error: 
https://github.com/Danack/php-src/commit/524bd36edd90ae670bec64b049d35417a76d0472

But this seems to work on Centos7 from dockerhub.
 [2020-10-10 17:42 UTC] danack@php.net
If you aren't able to provide a dockerfile, can you just try this change to see if it errors correctly on your system?

https://github.com/php/php-src/pull/6317
 [2020-10-12 09:46 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2020-10-12 09:46 UTC] nikic@php.net
Alternatively, the contents of the config.log file might give an indication as to why this failed.
 [2020-10-25 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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC