web/7159: Make command for Apache web server fails because of gcc?

Cindy.Hall@baycare.org Cindy.Hall@baycare.org
Fri Jun 28 17:15:00 GMT 2002


>Number:         7159
>Category:       web
>Synopsis:       Make command for Apache web server fails because of gcc?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gerald
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 28 10:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Cindy Hall
>Release:        3.1
>Organization:
>Environment:
System: AIX bcdevel 3 4 00055989A100                                                host: powerpc-ibm-aix4.3.2.0                        
build: powerpc-ibm-aix4.3.2.0                       
target: powerpc-ibm-aix4.3.2.0                      
configured with: ../gcc-3.1/configure --disable-nls 
>Description:
I was trying to install Apache Web Server and PHP as an Apache module.  I first installed Flex, Bison, and gcc (version 3.1) successfully.  I tested gcc and it seemed to work okay.  I followed the installation instructions from the PHP manual, example 2-4, from the web site            
    http://www.php.net/manual/en/install.unix.php                
After running "configure" for the Apache server (version 1.3.24), I attempted to run the "make" command, and I received the following error messages:      
    /usr/include/sys/proc.h:203: parse error before "crid_t"         
    /usr/include/sys/proc.h:212: parse error before "p_class"                 
    /usr/include/sys/proc.h:355: parse error before '}' token                   
    make: 1254-004 The error code from the last command is 1.                   
    Stop.                                                        
    I tried several version of Apache server (1.3.22, 1.3.24, 1.3.26, 2.0.39) and I received the same error in each case.  I joined a few mailing lists and found others who had this same problem on AIX.  They all pointed the finger of blame at gcc.  One user said he worked around this problem be going back to an older version of gcc (2.9).  I decided to take a look at proc.h.  The variable "p_crid" is defined as type "crid_t", which resolves to "int" in types.h.  Similarly, the variable "p_class" is defined as type "class_id_t", which resolves to "unsigned int" in types.h.  The include file "types.h" is contained in "proc.h" as it should be.  I modified proc.h by changing the type definition for "p_crid" to "int" and for "p_class" to "unsigned int".  Then, I performed all the configuration steps for Apache server as I had done previously.  This time, no errors!  I am taking the word of another user that gcc version (2.9) does not run into this problem.  If that is the case, then this certainly looks like a bug in gcc, but I'll let you all decided.
>How-To-Repeat:
See the web site http://www.php.net/manual/en/install.unix.php Example 2-4 for the exact steps I used.  Basically, running the "make" command for any version of Apache web server will hit this error.   
>Fix:
One work around is to hard code the types "int" and "unsigned int" for the variables "p_crid" and "p_class" respectively in /usr/include/sys/proc.h.  
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list