php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79967 "fcgi_request" makes building failed on freeBSD
Submitted: 2020-08-13 06:15 UTC Modified: 2021-08-01 04:22 UTC
From: tondemokun19 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Compile Failure
PHP Version: 7.4.9 OS: FreeBSD 11
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-08-13 06:15 UTC] tondemokun19 at gmail dot com
Description:
------------
I am trying to build php 7.4.5 and 7.4.8 on freeBSD11 from source.

Both version 7.4.5 and 7.4.8, configure and make seemed to go through well, but when configured on sub build directory (mkdir B200813 && cd B200813 && ../configure), make command was failed with "fcgi_request" error message like below:
----------------------------------

/bin/sh /src/self/php-7.4.5/B200813/libtool --silent --preserve-dup-deps --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/json/ -I/src/self/php-7.4.5/ext/json/ -DPHP_ATOM_INC -I/src/self/php-7.4.5/B200813/include -I/src/self/php-7.4.5/B200813/main -I/src/self/php-7.4.5 -I/src/self/php-7.4.5/B200813/ext/date/lib -I/src/self/php-7.4.5/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/src/self/php-7.4.5/B200813/TSRM -I/src/self/php-7.4.5/B200813/Zend -I/src/self/php-7.4.5/main -I/src/self/php-7.4.5/Zend -I/src/self/php-7.4.5/TSRM -I/src/self/php-7.4.5/B200813/    -I/usr/local/include -g -O2 -fvisibility=hidden -Wall -Wno-strict-aliasing -DZEND_SIGNALS   -c /src/self/php-7.4.5/ext/json/json_parser.tab.c -o ext/json/json_parser.lo
--- sapi/cgi/cgi_main.lo ---
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:333:2: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
        ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:333:16: error: use of undeclared identifier 'request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
                      ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:333:40: error: expected expression
        fcgi_request *request = (fcgi_request*) SG(server_context);
                                              ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:333:27: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
                                 ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:337:13: warning: implicit declaration of function 'fcgi_write' is invalid in C99 [-Wimplicit-function-declaration]
                int ret = fcgi_write(request, FCGI_STDOUT, ptr, to_write);
                          ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:337:24: error: use of undeclared identifier 'request'
                int ret = fcgi_write(request, FCGI_STDOUT, ptr, to_write);
                                     ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:359:2: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) server_context;
        ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:359:16: error: use of undeclared identifier 'request'
        fcgi_request *request = (fcgi_request*) server_context;
                      ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:359:40: error: expected expression
        fcgi_request *request = (fcgi_request*) server_context;
                                              ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:359:27: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) server_context;
                                 ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:363:3: error: use of undeclared identifier 'request'
                request && !fcgi_flush(request, 0)) {
                ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:363:15: warning: implicit declaration of function 'fcgi_flush' is invalid in C99 [-Wimplicit-function-declaration]
                request && !fcgi_flush(request, 0)) {
                            ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:363:26: error: use of undeclared identifier 'request'
                request && !fcgi_flush(request, 0)) {
                                       ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:509:2: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
        ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:509:16: error: use of undeclared identifier 'request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
                      ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:509:40: error: expected expression
        fcgi_request *request = (fcgi_request*) SG(server_context);
                                              ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:509:27: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
                                 ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:519:20: warning: implicit declaration of function 'fcgi_read' is invalid in C99 [-Wimplicit-function-declaration]
                tmp_read_bytes = fcgi_read(request, buffer + read_bytes, to_read);
                                 ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:519:30: error: use of undeclared identifier 'request'
                tmp_read_bytes = fcgi_read(request, buffer + read_bytes, to_read);
                                           ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:577:2: error: use of undeclared identifier 'fcgi_request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
        ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:577:16: error: use of undeclared identifier 'request'
        fcgi_request *request = (fcgi_request*) SG(server_context);
                      ^
/src/self/php-7.4.5/sapi/cgi/cgi_main.c:577:40: error: expected expression
        fcgi_request *request = (fcgi_request*) SG(server_context);
                                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
*** [sapi/cgi/cgi_main.lo] Error code 1

make: stopped in /src/self/php-7.4.5/B200813
1 error

make: stopped in /src/self/php-7.4.5/B200813
----------------------------------

How can I build it on the build directory?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-13 07:52 UTC] nikic@php.net
Does it work with an in-tree build?

I checked an out-of-tree build on Ubuntu and it worked fine. fcgi_request is defined in main/fastcgi.h. The file includes "fastcgi.h" and you do have -I/src/self/php-7.4.5/main in the cflags.
 [2021-07-19 15:18 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-01 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-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 00:03:36 2021 UTC