php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18617 warning: empty declaration
Submitted: 2002-07-28 21:01 UTC Modified: 2002-09-11 11:47 UTC
From: phpbugs at drcheap dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.2.2 OS: Slackware Linux 8.0 (2.4.5 krnl)
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: phpbugs at drcheap dot com
New email:
PHP Version: OS:

 

 [2002-07-28 21:01 UTC] phpbugs at drcheap dot com
I am unable to successfully compile PHP...
No matter what combination of configure options I use (even just running configure by itself) I always get output such as this during the `make` process:

------------
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main
   -I../TSRM  -g -O2 -prefer-non-pic -static -c -o zend_language_parser.lo `test
 -f zend_language_parser.c || echo './'`zend_language_parser.c
In file included from /usr/include/stdlib.h:391,
                 from ../main/php_config.h:2084,
                 from zend_config.h:1,
                 from zend.h:48,
                 from zend_compile.h:24,
                 from zend_language_parser.c:147:
/usr/include/sys/types.h:144: warning: empty declaration
/usr/include/sys/types.h:146: warning: empty declaration
------------

This same warning is reported for pretty much EVERY SINGLE item that is built during `make`.

When the process completes, I have no errors reported, just TONS of warnings like above.  Additionally, the libs/libphp4.so file (and maybe others) are not created, which causes `make install` to fail.

I find no previous mention of this problem anywhere (web, usenet, etc.), perhaps you can make sense of it.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-28 21:03 UTC] rasmus@php.net
Well, do other things compile on that server?
 [2002-07-28 21:05 UTC] phpbugs at drcheap dot com
Yes, defintely.

I even went over to my old PHP 4.1.2 source tree and ran a `make clean` then `make` and it went smooth.
 [2002-07-28 21:17 UTC] msopacua at idg dot nl
what's at /usr/include/stdlib.h on line 144/146

An empty declaration is something like:
#define int socklen_t

Other file:
typedef int socklen_t;

Result:
typedef int int;

They are harmless though in most cases, but this is one I bumped to recently also.

Could you also list line 2048 of main/php_config.h?
 [2002-07-28 21:26 UTC] phpbugs at drcheap dot com
Here those items +/- a few lines to put them in context:

/usr/include/stdlib.h
--------
143:#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
144:/* Convert a string to a long long integer.  */
145:__extension__ extern long long int atoll (__const char *__nptr)
146:     __THROW __attribute_pure__;
147:#endif
--------

main/php_config.h
--------
2046:#ifdef HAVE_ISNAN
2047:#define zend_isnan(a) isnan(a)
2048:#elif defined(NAN)
2049:#define zend_isnan(a) (((a)==NAN)?1:0)
2050:#elif defined(HAVE_FPCLASS)
2051:#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
2052:#else
2053:#define zend_isnan(a) 0
2054:#endif
--------
 [2002-07-28 21:33 UTC] phpbugs at drcheap dot com
Err, sorry, that was wrong for main/php_config.h above.  The correct lines are:

2083:#ifdef HAVE_STDLIB_H
2084:# include <stdlib.h>
2085:#endif
 [2002-07-28 21:52 UTC] msopacua at idg dot nl
And that would be /usr/include/sys/types.h 144/146.

I need sleep in this timezone :-)
 [2002-07-28 22:10 UTC] phpbugs at drcheap dot com
And I need to blink my eyes a bit (staring at screen too long).  Here's the lines from types.h:

142:#ifdef __USE_MISC
143:/* Old compatibility names for C types.  */
144:typedef unsigned long int ulong;
145:typedef unsigned short int ushort;
146:typedef unsigned int uint;
147:#endif
 [2002-07-29 06:16 UTC] msopacua at idg dot nl
Well - there you have it:
main/php_config.h:
#define ulong unsigned long
#define uint unsigned int

These are set by autoheader, from main/php_config.h.in.

The warnings are harmless, but the reason they are set is, because no ulong and uint type was not found by configure.

See your config.log, for:
checking for uint..no

There should be a warning message and a log of the program that failed and why.
 [2002-07-29 19:59 UTC] phpbugs at drcheap dot com
Okay, so these warnings have nothing to do with the reason why my libphp4.so file never gets created?  There are no errors at all during the compile process, yet no DSO.

Hmmmm.
 [2002-09-11 11:47 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 18:01:32 2024 UTC