php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52436 Compile error if systems do not have stdint.h
Submitted: 2010-07-25 06:38 UTC Modified: 2010-07-27 23:44 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: hiropontepocon at gmail dot com Assigned: srinatar (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.2.14 OS: Solaris8
Private report: No CVE-ID: None
 [2010-07-25 06:38 UTC] hiropontepocon at gmail dot com
Description:
------------
$ ./configure
・・・
$ grep -i stdint main/php_config.h
/* Define if you have the <stdint.h> header file.  */
/* #undef HAVE_STDINT_H */
$ make
・・・
/bin/ksh /tmp/php-5.2.14/libtool --silent --preserve-dup-deps --mode=compile gcc -I/tmp/php-5.2.14/ext/pcre/pcrelib -Iext/pcre/ -I/tmp/php-5.2.14/ext/pcre/ -DPHP_ATOM_INC -I/tmp/php-5.2.14/include -I/tmp/php-5.2.14/main -I/tmp/php-5.2.14 -I/tmp/php-5.2.14/ext/date/lib -I/usr/include/libxml2 -I/tmp/php-5.2.14/TSRM -I/tmp/php-5.2.14/Zend  -D_POSIX_PTHREAD_SEMANTICS  -I/usr/include -g -O2  -c /tmp/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c -o ext/pcre/pcrelib/pcre_chartables.lo
In file included from /tmp/php-5.2.14/ext/pcre/pcrelib/pcre_chartables.c:25:
/tmp/php-5.2.14/ext/pcre/pcrelib/pcre_internal.h:198:20: stdint.h: No such file or directory
make: *** [ext/pcre/pcrelib/pcre_chartables.lo] Error 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-27 00:46 UTC] kalle@php.net
Does this happen with older versions, or 5.3 for you?
 [2010-07-27 00:46 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2010-07-27 04:32 UTC] srinatar@php.net
in quick look, patching pcrelib/pcre_internal.h in this way, seems to help

--- ext/pcre/pcrelib/pcre_internal.h.ORIG       Wed Jun  2 15:31:21 2010
+++ ext/pcre/pcrelib/pcre_internal.h    Wed Jun  2 15:38:08 2010
@@ -193,10 +193,10 @@
 by "configure". */
 #ifdef PHP_WIN32
 #include "win32/php_stdint.h"
-#elif HAVE_STDINT_H
-#include <stdint.h>
 #elif HAVE_INTTYPES_H
 #include <inttypes.h>
+#elif HAVE_STDINT_H
+#include <stdint.h>
 #endif
 [2010-07-27 17:39 UTC] hiropontepocon at gmail dot com
php-5.2.13 ⇒ OK
php-5.2.14 ⇒ Compile Failed
php-5.3.2  ⇒ OK
php-5.3.3  ⇒ Compile Failed
 [2010-07-27 17:42 UTC] pajoye@php.net
-Status: Feedback +Status: Assigned -Assigned To: +Assigned To: srinatar
 [2010-07-27 17:42 UTC] pajoye@php.net
Pls apply it as long as it works on linux too :)
 [2010-07-27 19:13 UTC] hiropontepocon at gmail dot com
> in quick look, patching pcrelib/pcre_internal.h in this way, seems to help

Patch works fine. Thanks!

By the way, Is the following code correct?

ext/pcre/pcrelib/config.h:
・・・
/* Define to 1 if you have the <stdint.h> header file. */
#ifndef HAVE_STDINT_H
#define HAVE_STDINT_H 1
#endif
 [2010-07-27 23:42 UTC] srinatar@php.net
Automatic comment from SVN on behalf of srinatar
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=301625
Log: - Fixed bug #52436 (Compile error in pcre if systems do not have stdint.h)
# PCRE's config.h can very well reuse the definitions made available from
# PHP's configure script output available within php_config.h
 [2010-07-27 23:44 UTC] srinatar@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC