php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72887 Installation fails with php 7
Submitted: 2016-08-18 23:52 UTC Modified: -
Votes:12
Avg. Score:4.2 ± 1.0
Reproduced:12 of 12 (100.0%)
Same Version:9 (75.0%)
Same OS:3 (25.0%)
From: frank dot farmer at gmail dot com Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 7.0.10 OS: ubuntu 14.04
Private report: No CVE-ID: None
Password:
Status:
Package:
Bug Type:
Summary:
From: frank dot farmer at gmail dot com
New email:
PHP Version: OS:

 

 [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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-07 01:28 UTC] xrobau at gmail dot com
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?
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC