php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60490 PHP 5.3.x will not compile gcc3.3.4
Submitted: 2011-12-10 00:40 UTC Modified: 2016-10-16 04:22 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jeepee at gids dot nl Assigned: cmb (profile)
Status: No Feedback Package: *Compile Issues
PHP Version: 5.3.8 OS: Linux (Slackware 10)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jeepee at gids dot nl
New email:
PHP Version: OS:

 

 [2011-12-10 00:40 UTC] jeepee at gids dot nl
Description:
------------
Tried a few versions in the 5.3.x range but all fail on:

dns.c resides in /php-5.3.8/ext/standard/

dns.c: In function `php_parserr':
dns.c:453: error: case label does not reduce to an integer constant
dns.c:459: error: case label does not reduce to an integer constant
dns.c:464: error: case label does not reduce to an integer constant
dns.c:465: warning: comparison between pointer and integer
dns.c:469: error: case label does not reduce to an integer constant
dns.c:470: warning: comparison between pointer and integer
dns.c:474: error: case label does not reduce to an integer constant
dns.c:475: warning: comparison between pointer and integer
dns.c:485: error: case label does not reduce to an integer constant
dns.c:497: error: case label does not reduce to an integer constant
dns.c:521: error: case label does not reduce to an integer constant
dns.c:546: error: case label does not reduce to an integer constant

Also tried the 5.3.9rc

All 5.2.x versions compiled fine

On slackware 13.xx compilation goes fine.

Issue appears by simply running ./configure and make (no extra options provided)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-26 14:12 UTC] andrew dot nimmo at gmail dot com
I can duplicate this on Linux, Debian 5 (lenny). There appears to be a conflict 
with reassignment of #define's for, for example, DNS_T_A when libdjbdns is 
installed and /usr/include/dns.c contains non-integer defines.

On Debian 5, removing the package libdjbdns-dev resolves the issue.
 [2012-01-27 14:22 UTC] jeepee at gids dot nl
Unfortunately this is not in my configuration : libdjbdns

It looks like the CASE switch is not compatible with gcc 3.3.4 anymore in 5.2.x it was..
 [2013-10-17 23:16 UTC] bjori@php.net
-Status: Open +Status: Feedback
 [2013-10-17 23:16 UTC] bjori@php.net
This is a very old bug report... Is this still a problem in currently maintained versions?
 [2013-11-25 17:42 UTC] jann+php at thejh dot net
At git commit a37ff1fa4bb149dc81fc812d03cdf7685c499403 (2013-11-15), I have the same problem on a Debian wheezy box.
 [2013-11-25 19:56 UTC] jann+php at thejh dot net
Seems like libowfat-dev might be causing it:

$ grep -R DNS_T_SOA /usr/include
/usr/include/diet/dns.h:#define DNS_T_SOA "\0\6"
/usr/include/dns.h:#define DNS_T_SOA "\0\6"
$ dpkg -S /usr/include/dns.h
libowfat-dev: /usr/include/dns.h

As a workaround, edit dns.c and add a "#undef HAVE_DNS_H" in front of "#if HAVE_SYS_SOCKET_H", that seems to work for me.
 [2014-12-28 23:18 UTC] kalle@php.net
-Status: Feedback +Status: Analyzed
 [2016-10-05 14:40 UTC] cmb@php.net
-Status: Analyzed +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-10-05 14:40 UTC] cmb@php.net
Do we still have to worry about GCC 3 nowadays?
 [2016-10-16 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: Thu Mar 28 21:01:27 2024 UTC