php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79946 Build fails due to undeclared UINT32_C
Submitted: 2020-08-08 19:17 UTC Modified: 2020-08-08 20:36 UTC
From: rk at srsbiz dot pl Assigned:
Status: Closed Package: Compile Failure
PHP Version: master-Git-2020-08-08 (Git) OS: Linux
Private report: No CVE-ID: None
 [2020-08-08 19:17 UTC] rk at srsbiz dot pl
Description:
------------
Git revision 05478e985eb50c473054b4f1bf174f48ead78784
g++ (GCC) 4.5.2
uconv v2.1  ICU 56.1

Configure script:
./configure --prefix=/usr/local/php-master --with-config-file-path=/usr/local/php-master/etc --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-gd --enable-intl --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --disable-cgi --disable-phar --with-bz2 --with-curl --with-freetype --with-gdbm --with-gmp --with-iconv --with-jpeg --with-mhash --with-mysql-sock=/var/run/mysql/mysql.sock --with-mysqli=mysqlnd --with-openssl --with-pdo-mysql=mysqlnd --with-pdo-pgsql --with-pgsql --with-pspell --with-readline --with-webp --with-xpm --with-zip --without-pear


Error:
/bin/sh /usr/src/php-master/libtool --silent --preserve-dup-deps --mode=compile g++   -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DU_HIDE_OBSOLETE_UTF_OLD_H=1 -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1   -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -Iext/intl/ -I/usr/src/php-master/ext/intl/ -I/usr/src/php-master/include -I/usr/src/php-master/main -I/usr/src/php-master -I/usr/src/php-master/ext/date/lib -I/usr/include/libxml2 -I/usr/local/include -I/usr/include/libpng14 -I/usr/include/freetype2 -I/usr/src/php-master/ext/mbstring/libmbfl -I/usr/src/php-master/ext/mbstring/libmbfl/mbfl -I/usr/local/pgsql/include -I/usr/include/pspell -I/usr/lib/libzip/include -I/usr/src/php-master/TSRM -I/usr/src/php-master/Zend    -g -O2  -c /usr/src/php-master/ext/intl/intl_convertcpp.cpp -o ext/intl/intl_convertcpp.lo
In file included from /usr/src/php-master/Zend/zend.h:32:0,
                 from /usr/src/php-master/main/php.h:31,
                 from /usr/src/php-master/ext/intl/intl_convertcpp.cpp:20:
/usr/src/php-master/Zend/zend_string.h: In function ‘zend_ulong zend_inline_hash_func(const char*, size_t)’:
/usr/src/php-master/Zend/zend_string.h:381:20: error: ‘UINT32_C’ was not declared in this scope


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-08 19:46 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2020-08-08 19:46 UTC] nikic@php.net
Does moving https://github.com/php/php-src/blob/05478e985eb50c473054b4f1bf174f48ead78784/ext/intl/intl_convertcpp.cpp#L19-L21 before the other includes resolve the build failure?

Alternatively, does replacing https://github.com/php/php-src/blob/05478e985eb50c473054b4f1bf174f48ead78784/ext/intl/config.m4#L9 with

INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"

resolve the compilation failure?
 [2020-08-08 19:47 UTC] nikic@php.net
(Note that the latter suggestion requires running ./buildconf && ./config.nice to regenerate the Makefile.)
 [2020-08-08 20:36 UTC] rk at srsbiz dot pl
-Status: Feedback +Status: Open
 [2020-08-08 20:36 UTC] rk at srsbiz dot pl
First solution resulted in similar error in other file:

In file included from /usr/src/php-master/Zend/zend.h:32:0,
                 from /usr/src/php-master/main/php.h:31,
                 from /usr/src/php-master/ext/intl/common/common_enum.h:25,
                 from /usr/src/php-master/ext/intl/common/common_enum.cpp:24:
/usr/src/php-master/Zend/zend_string.h: In function ‘zend_ulong zend_inline_hash_func(const char*, size_t)’:
/usr/src/php-master/Zend/zend_string.h:381:20: error: ‘UINT32_C’ was not declared in this scope
make: *** [ext/intl/common/common_enum.lo] Error 1


Second solution fixed it.
 [2020-08-10 07:53 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=da0a0a13be320a88173594c3e96394134c5c24c6
Log: Fixed bug #79946
 [2020-08-10 07:53 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC