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: 2020-08-13 07:52 UTC
From: tondemokun19 at gmail dot com Assigned:
Status: Open Package: Compile Failure
PHP Version: 7.4.9 OS: FreeBSD 11
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tondemokun19 at gmail dot com
New email:
PHP Version: OS:

 

 [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.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 05:02:34 2020 UTC