|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-08-18 23:52 UTC] frank dot farmer at gmail dot com
Description:
------------
Attempting to "pecl install" the memcache extension results in a compilation error: "fatal error: ext/standard/php_smart_str_public.h: No such file or directory"
Test script:
---------------
sudo pecl install memcache-3.0.8
Actual result:
--------------
# sudo pecl install memcache-3.0.8
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading memcache-3.0.8.tgz ...
Starting to download memcache-3.0.8.tgz (70,523 bytes)
.................done: 70,523 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
Enable memcache session handler support? [yes] :
building in /tmp/pear/temp/pear-build-rootrZklXv/memcache-3.0.8
running: /tmp/pear/temp/memcache/configure --with-php-config=/usr/bin/php-config --enable-memcache-session=yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable memcache support... yes, shared
checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... /usr
checking for session includes... /usr/include/php/20151012
checking for memcache session support... enabled
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootrZklXv/memcache-3.0.8/libtool --mode=compile cc -I/usr/include/php/20151012 -I. -I/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootrZklXv/memcache-3.0.8/include -I/tmp/pear/temp/pear-build-rootrZklXv/memcache-3.0.8/main -I/tmp/pear/temp/memcache -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/memcache/memcache.c -o memcache.lo
libtool: compile: cc -I/usr/include/php/20151012 -I. -I/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootrZklXv/memcache-3.0.8/include -I/tmp/pear/temp/pear-build-rootrZklXv/memcache-3.0.8/main -I/tmp/pear/temp/memcache -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/memcache/memcache.c -fPIC -DPIC -o .libs/memcache.o
In file included from /tmp/pear/temp/memcache/php_memcache.h:34:0,
from /tmp/pear/temp/memcache/memcache.c:30:
/tmp/pear/temp/memcache/memcache_pool.h:45:47: fatal error: ext/standard/php_smart_str_public.h: No such file or directory
#include "ext/standard/php_smart_str_public.h"
^
compilation terminated.
make: *** [memcache.lo] Error 1
ERROR: `make' failed
# php -v
PHP 7.0.7-4+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 16:00:01 2025 UTC |
It appears that a lot of things under-the-hood in PHP 7.1 have broken, so that this bug report is more than just 'won't compile' - it's 'totally won't work at all'. After doing the simple fix of the include filename, a large number of redefinition and structural changes appear: /bin/bash /var/www/mirror/tmp/memcache-3.0.8/libtool --mode=compile cc -I/usr/local/include/php -I. -I/var/www/mirror/tmp/memcache-3.0.8 -DPHP_ATOM_INC -I/var/www/mirror/tmp/memcache-3.0.8/include -I/var/www/mirror/tmp/memcache-3.0.8/main -I/var/www/mirror/tmp/memcache-3.0.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/www/mirror/tmp/memcache-3.0.8/memcache.c -o memcache.lo cc -I/usr/local/include/php -I. -I/var/www/mirror/tmp/memcache-3.0.8 -DPHP_ATOM_INC -I/var/www/mirror/tmp/memcache-3.0.8/include -I/var/www/mirror/tmp/memcache-3.0.8/main -I/var/www/mirror/tmp/memcache-3.0.8 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/www/mirror/tmp/memcache-3.0.8/memcache.c -fPIC -DPIC -o .libs/memcache.o In file included from /var/www/mirror/tmp/memcache-3.0.8/php_memcache.h:34:0, from /var/www/mirror/tmp/memcache-3.0.8/memcache.c:30: /var/www/mirror/tmp/memcache-3.0.8/memcache_pool.h:54:0: warning: "ZSTR_VAL" redefined #define ZSTR_VAL(v) v ^ In file included from /usr/local/include/php/Zend/zend.h:35:0, from /usr/local/include/php/main/php.h:35, from /var/www/mirror/tmp/memcache-3.0.8/memcache.c:26: /usr/local/include/php/Zend/zend_string.h:41:0: note: this is the location of the previous definition #define ZSTR_VAL(zstr) (zstr)->val ^ In file included from /var/www/mirror/tmp/memcache-3.0.8/memcache.c:30:0: /var/www/mirror/tmp/memcache-3.0.8/php_memcache.h:77:0: warning: "IS_CALLABLE" redefined # define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp)) ^ In file included from /usr/local/include/php/Zend/zend.h:31:0, from /usr/local/include/php/main/php.h:35, from /var/www/mirror/tmp/memcache-3.0.8/memcache.c:26: /usr/local/include/php/Zend/zend_types.h:322:0: note: this is the location of the previous definition #define IS_CALLABLE 14 ^ /var/www/mirror/tmp/memcache-3.0.8/memcache.c: In function 'OnUpdateChunkSize': /var/www/mirror/tmp/memcache-3.0.8/memcache.c:135:16: warning: passing argument 1 of 'strtol' from incompatible pointer type lval = strtol(new_value, NULL, 10); ^ In file included from /usr/local/include/php/main/../main/php_config.h:2488:0, from /usr/local/include/php/Zend/zend_config.h:1, from /usr/local/include/php/Zend/zend_portability.h:48, from /usr/local/include/php/Zend/zend_types.h:27, from /usr/local/include/php/Zend/zend.h:31, from /usr/local/include/php/main/php.h:35, from /var/www/mirror/tmp/memcache-3.0.8/memcache.c:26: /usr/include/stdlib.h:183:17: note: expected 'const char * __restrict__' but argument is of type 'struct zend_string *' extern long int strtol (const char *__restrict __nptr, ^ /var/www/mirror/tmp/memcache-3.0.8/memcache.c:141:40: error: 'new_value_length' undeclared (first use in this function) return OnUpdateLong(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); ^ /var/www/mirror/tmp/memcache-3.0.8/memcache.c:141:40: note: each undeclared identifier is reported only once for each function it appears in /var/www/mirror/tmp/memcache-3.0.8/memcache.c: In function 'OnUpdateFailoverAttempts': /var/www/mirror/tmp/memcache-3.0.8/memcache.c:149:16: warning: passing argument 1 of 'strtol' from incompatible pointer type lval = strtol(new_value, NULL, 10); ^ (many more errors snipped) As this is beyond my skill level to fix, and it appears to have been broken for over a year, should this package be officially deprecated?Same error with PHP 7.2.7, memcache 2.2.7, on macOS 10.13.5 (17F77). Tried both with and without session support enabled. Just pasting the final lines to limit the noise: cc -I/usr/local/Cellar/php/7.2.7/include/php -I. -I/private/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-fgmyrx0tO/memcache-2.2.7/include -I/private/tmp/pear/temp/pear-build-fgmyrx0tO/memcache-2.2.7/main -I/private/tmp/pear/temp/memcache -I/usr/local/Cellar/php/7.2.7/include/php -I/usr/local/Cellar/php/7.2.7/include/php/main -I/usr/local/Cellar/php/7.2.7/include/php/TSRM -I/usr/local/Cellar/php/7.2.7/include/php/Zend -I/usr/local/Cellar/php/7.2.7/include/php/ext -I/usr/local/Cellar/php/7.2.7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/memcache/memcache.c -fno-common -DPIC -o .libs/memcache.o /private/tmp/pear/temp/memcache/memcache.c:40:10: fatal error: 'ext/standard/php_smart_str.h' file not found #include "ext/standard/php_smart_str.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [memcache.lo] Error 1 ERROR: `make' failedI have the same problem: usoswebepwdev:~/memcache-3.0.8 # make /bin/sh /root/memcache-3.0.8/libtool --mode=compile cc -I/usr/include/php7 -I. -I/root/memcache-3.0.8 -DPHP_ATOM_INC -I/ root/memcache-3.0.8/include -I/root/memcache-3.0.8/main -I/root/memcache-3.0.8 -I/usr/include/php7 -I/usr/include/php7/m ain -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_C ONFIG_H -g -O2 -c /root/memcache-3.0.8/memcache.c -o memcache.lo libtool: compile: cc -I/usr/include/php7 -I. -I/root/memcache-3.0.8 -DPHP_ATOM_INC -I/root/memcache-3.0.8/include -I/ro ot/memcache-3.0.8/main -I/root/memcache-3.0.8 -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/u sr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/memcache-3 .0.8/memcache.c -fPIC -DPIC -o .libs/memcache.o In file included from /root/memcache-3.0.8/php_memcache.h:34:0, from /root/memcache-3.0.8/memcache.c:30: /root/memcache-3.0.8/memcache_pool.h:45:10: fatal error: ext/standard/php_smart_str_public.h: No such file or directory #include "ext/standard/php_smart_str_public.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:193: memcache.lo] Error 1I have a similar issue which is happened on PHP7.1.26 and MacOS High Sierra. pecl install memcache downloading memcache-2.2.7.tgz ... Starting to download memcache-2.2.7.tgz (36,459 bytes) ..........done: 36,459 bytes 11 source files, building running: phpize Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303 Enable memcache session handler support? [yes] : building in /Users/vunguyen/.phpbrew/tmp/pear/temp/pear-build-vunguyenZzKLMp/memcache-2.2.7 running: /Users/vunguyen/.phpbrew/tmp/pear/temp/memcache/configure --with-php-config=/usr/local/bin/php-config --enable-memcache-session=yes checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-apple-darwin17.7.0 checking host system type... x86_64-apple-darwin17.7.0 checking target system type... x86_64-apple-darwin17.7.0 checking for PHP prefix... /usr/local/Cellar/php@7.1/7.1.26 checking for PHP includes... -I/usr/local/Cellar/php@7.1/7.1.26/include/php -I/usr/local/Cellar/php@7.1/7.1.26/include/php/main -I/usr/local/Cellar/php@7.1/7.1.26/include/php/TSRM -I/usr/local/Cellar/php@7.1/7.1.26/include/php/Zend -I/usr/local/Cellar/php@7.1/7.1.26/include/php/ext -I/usr/local/Cellar/php@7.1/7.1.26/include/php/ext/date/lib checking for PHP extension directory... /usr/local/Cellar/php@7.1/7.1.26/pecl/20160303 checking for PHP installed headers prefix... /usr/local/Cellar/php@7.1/7.1.26/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 1.1.1 (ok) checking for gawk... no checking for nawk... no checking for awk... awk checking if awk is broken... no checking whether to enable memcache support... yes, shared checking whether to enable memcache session handler support... yes checking for the location of ZLIB... no checking for the location of zlib... /usr checking for session includes... /usr/local/Cellar/php@7.1/7.1.26/include/php checking for memcache session support... enabled checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/local/bin/nm -B checking whether ln -s works... yes checking how to recognize dependent libraries... pass_all checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking the maximum length of command line arguments... 196608 checking command to parse /usr/local/bin/nm -B output from cc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking for dsymutil... dsymutil checking for nmedit... nmedit checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking if cc supports -fno-rtti -fno-exceptions... yes checking for cc option to produce PIC... -fno-common checking if cc PIC flag -fno-common works... yes checking if cc static flag -static works... no checking if cc supports -c -o file.o... yes checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin17.7.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no creating libtool appending configuration tag "CXX" to libtool configure: creating ./config.status config.status: creating config.h running: make /bin/sh /Users/vunguyen/.phpbrew/tmp/pear/temp/pear-build-vunguyenZzKLMp/memcache-2.2.7/libtool --mode=compile cc -I/usr/local/Cellar/php@7.1/7.1.26/include/php -I. -I/Users/vunguyen/.phpbrew/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/Users/vunguyen/.phpbrew/tmp/pear/temp/pear-build-vunguyenZzKLMp/memcache-2.2.7/include -I/Users/vunguyen/.phpbrew/tmp/pear/temp/pear-build-vunguyenZzKLMp/memcache-2.2.7/main -I/Users/vunguyen/.phpbrew/tmp/pear/temp/memcache -I/usr/local/Cellar/php@7.1/7.1.26/include/php -I/usr/local/Cellar/php@7.1/7.1.26/include/php/main -I/usr/local/Cellar/php@7.1/7.1.26/include/php/TSRM -I/usr/local/Cellar/php@7.1/7.1.26/include/php/Zend -I/usr/local/Cellar/php@7.1/7.1.26/include/php/ext -I/usr/local/Cellar/php@7.1/7.1.26/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/vunguyen/.phpbrew/tmp/pear/temp/memcache/memcache.c -o memcache.lo mkdir .libs cc -I/usr/local/Cellar/php@7.1/7.1.26/include/php -I. -I/Users/vunguyen/.phpbrew/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/Users/vunguyen/.phpbrew/tmp/pear/temp/pear-build-vunguyenZzKLMp/memcache-2.2.7/include -I/Users/vunguyen/.phpbrew/tmp/pear/temp/pear-build-vunguyenZzKLMp/memcache-2.2.7/main -I/Users/vunguyen/.phpbrew/tmp/pear/temp/memcache -I/usr/local/Cellar/php@7.1/7.1.26/include/php -I/usr/local/Cellar/php@7.1/7.1.26/include/php/main -I/usr/local/Cellar/php@7.1/7.1.26/include/php/TSRM -I/usr/local/Cellar/php@7.1/7.1.26/include/php/Zend -I/usr/local/Cellar/php@7.1/7.1.26/include/php/ext -I/usr/local/Cellar/php@7.1/7.1.26/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/vunguyen/.phpbrew/tmp/pear/temp/memcache/memcache.c -fno-common -DPIC -o .libs/memcache.o /Users/vunguyen/.phpbrew/tmp/pear/temp/memcache/memcache.c:40:10: fatal error: 'ext/standard/php_smart_str.h' file not found #include "ext/standard/php_smart_str.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make: *** [memcache.lo] Error 1 ERROR: `make' failed