php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59458 Memcached extension doesn't compile
Submitted: 2010-10-12 16:49 UTC Modified: 2012-03-07 17:10 UTC
From: kuteninja at gmail dot com Assigned: andrei (profile)
Status: Closed Package: memcached (PECL)
PHP Version: 5.3.3 OS: Gentoo
Private report: No CVE-ID: None
 [2010-10-12 16:49 UTC] kuteninja at gmail dot com
Description:
------------
<< http://pecl.php.net/bugs/bug.php?id=17583

On that thread you can see that people are having this issue 
and it's not just me, here you can check my output:



make
/bin/sh /var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/libtool --mode=compile i686-pc-
linux-gnu-gcc -I/usr/lib/php5/include/php  -I. -
I/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2 -DPHP_ATOM_INC -
I/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/include -I/var/tmp/portage/dev-
php5/pecl-memcached-1.0.2/work/memcached-1.0.2/main -
I/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2 -I/usr/lib/php5/include/php -
I/usr/lib/php5/include/php/main -
I/usr/lib/php5/include/php/TSRM -
I/usr/lib/php5/include/php/Zend -
I/usr/lib/php5/include/php/ext -
I/usr/lib/php5/include/php/ext/date/lib  -DHAVE_CONFIG_H  -
march=prescott -O2 -pipe -fomit-frame-pointer   -c 
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c -o 
php_memcached.lo
libtool: compile:  i686-pc-linux-gnu-gcc -
I/usr/lib/php5/include/php -I. -I/var/tmp/portage/dev-
php5/pecl-memcached-1.0.2/work/memcached-1.0.2 -
DPHP_ATOM_INC -I/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/include -I/var/tmp/portage/dev-
php5/pecl-memcached-1.0.2/work/memcached-1.0.2/main -
I/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2 -I/usr/lib/php5/include/php -
I/usr/lib/php5/include/php/main -
I/usr/lib/php5/include/php/TSRM -
I/usr/lib/php5/include/php/Zend -
I/usr/lib/php5/include/php/ext -
I/usr/lib/php5/include/php/ext/date/lib -DHAVE_CONFIG_H -
march=prescott -O2 -pipe -fomit-frame-pointer -c 
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c  -fPIC -DPIC -o 
.libs/php_memcached.o
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:168: warning: 
useless storage class specifier in empty declaration
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:203: error: 
expected declaration specifiers or '...' before 
'memcached_server_instance_st'
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:204: error: 
expected declaration specifiers or '...' before 
'memcached_server_instance_st'
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:205: error: 
expected declaration specifiers or '...' before 
'memcached_server_instance_st'
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: In function 
'zim_Memcached_getServerList':
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1500: warning: 
assignment from incompatible pointer type
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: In function 
'zim_Memcached_getStats':
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1569: warning: 
assignment from incompatible pointer type
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: In function 
'zim_Memcached_getVersion':
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1604: warning: 
assignment from incompatible pointer type
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: At top level:
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1886: error: 
expected declaration specifiers or '...' before 
'memcached_server_instance_st'
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: In function 
'php_memc_do_serverlist_callback':
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1892: error: 
'instance' undeclared (first use in this function)
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1892: error: 
(Each undeclared identifier is reported only once
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1892: error: for 
each function it appears in.)
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: At top level:
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1899: error: 
expected declaration specifiers or '...' before 
'memcached_server_instance_st'
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: In function 
'php_memc_do_stats_callback':
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1904: error: 
'instance' undeclared (first use in this function)
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: At top level:
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1942: error: 
expected declaration specifiers or '...' before 
'memcached_server_instance_st'
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c: In function 
'php_memc_do_version_callback':
/var/tmp/portage/dev-php5/pecl-memcached-
1.0.2/work/memcached-1.0.2/php_memcached.c:1949: error: 
'instance' undeclared (first use in this function)
make: *** [php_memcached.lo] Error 1
emake failed


It seems that there's some error with your code, but there's 
been no updates on that bug or on your extensions from 
months, is there any chance that you fix this?

BTW, I'm also the last reply on the first bug I've quoted, 
I'm using php 5.3.3, libtool 2.2.10... all the latest 
versions.

I tried first to use emerge with gentoo, but I cannot 
install it that way, neither using "pecl install memcached" 
or via the source-code manually.

Reproduce code:
---------------
This is what happens when I compile it manually...



~/dev/andreiz-php-memcached-fdb53ec # phpize && aclocal && autoheader && autoconf
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions

~/dev/andreiz-php-memcached-fdb53ec # ./configure && make && make install
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... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/lib/php5
checking for PHP includes... -I/usr/lib/php5/include/php -I/usr/lib/php5/include/php/main -I/usr/lib/php5/include/php/TSRM -I/usr/lib/php5/include/php/Zend -I/usr/lib/php5/include/php/ext -I/usr/lib/php5/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/lib/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/lib/php5/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking for ZLIB... yes, shared
checking for zlib location... /usr
checking for session includes... /usr/lib/php5/include/php
checking for memcached session support... enabled
checking for memcached igbinary support... disabled
checking for libmemcached location... /usr
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/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/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 for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
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 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/i686-pc-linux-gnu/bin/ld) 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
/bin/sh /usr/local/src/andreiz-php-memcached-fdb53ec/libtool --mode=compile cc -I/usr/lib/php5/include/php  -I. -I/usr/local/src/andreiz-php-memcached-fdb53ec -DPHP_ATOM_INC -I/usr/local/src/andreiz-php-memcached-fdb53ec/include -I/usr/local/src/andreiz-php-memcached-fdb53ec/main -I/usr/local/src/andreiz-php-memcached-fdb53ec -I/usr/lib/php5/include/php -I/usr/lib/php5/include/php/main -I/usr/lib/php5/include/php/TSRM -I/usr/lib/php5/include/php/Zend -I/usr/lib/php5/include/php/ext -I/usr/lib/php5/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c -o php_memcached.lo
libtool: compile:  cc -I/usr/lib/php5/include/php -I. -I/usr/local/src/andreiz-php-memcached-fdb53ec -DPHP_ATOM_INC -I/usr/local/src/andreiz-php-memcached-fdb53ec/include -I/usr/local/src/andreiz-php-memcached-fdb53ec/main -I/usr/local/src/andreiz-php-memcached-fdb53ec -I/usr/lib/php5/include/php -I/usr/lib/php5/include/php/main -I/usr/lib/php5/include/php/TSRM -I/usr/lib/php5/include/php/Zend -I/usr/lib/php5/include/php/ext -I/usr/lib/php5/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c  -fPIC -DPIC -o .libs/php_memcached.o
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:168: warning: useless storage class specifier in empty declaration
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:203: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:204: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:205: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: In function 'zim_Memcached_getServerList':
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1500: warning: assignment from incompatible pointer type
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: In function 'zim_Memcached_getStats':
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1569: warning: assignment from incompatible pointer type
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: In function 'zim_Memcached_getVersion':
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1604: warning: assignment from incompatible pointer type
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: At top level:
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1886: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: In function 'php_memc_do_serverlist_callback':
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1892: error: 'instance' undeclared (first use in this function)
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1892: error: (Each undeclared identifier is reported only once
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1892: error: for each function it appears in.)
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: At top level:
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1899: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: In function 'php_memc_do_stats_callback':
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1904: error: 'instance' undeclared (first use in this function)
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: At top level:
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1942: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c: In function 'php_memc_do_version_callback':
/usr/local/src/andreiz-php-memcached-fdb53ec/php_memcached.c:1949: error: 'instance' undeclared (first use in this function)
make: *** [php_memcached.lo] Error 1



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-12 16:55 UTC] andrei@php.net
Which version of libmemcached are you using? 1.0.2 only works 
with the version < 0.40 I think.
 [2010-10-12 17:24 UTC] kuteninja at gmail dot com
This are all my (I think) relevant version numbers:

memcached-1.4.5
libmemcached-0.39
libtool-2.2.10
php-5.3.3-r1

gcc-4.4.4-r2
autoconf-2.67
make-3.81-r2
automake-1.11.1

The -r1 / -r2 are added by Gentoo, but it's not really such 
a big deal, maybe some security patches.
 [2010-10-13 18:16 UTC] kuteninja at gmail dot com
Will there be any patch for this before a newer release?
 [2010-10-13 18:29 UTC] andrei@php.net
I hope so but I am really busy with work right now. You can 
also try opening an issue at http://github.com/php-memcached-
dev.
 [2010-10-14 13:28 UTC] kuteninja at gmial dot com
I've made some sort of turnarout:

I went to another similar equipment (Gentoo, PHP 5.3.3 
compilled manually, and some other versions too), and it 
compiled right away, there seems to be something wrong with 
the libtool / autoconf compatibility because once I've 
compiled it and then moved the binaries to the first 
equipment (that failed to compile), it worked right away.

This are the versions from the working server:

gcc-4.4.3-r2
autoconf-2.65
make-3.81
automake-1.11.1
libtool-2.2.6b

Everything else is just the same, so there must be something 
that changed on those compilators / configuration scripts 
that broke this extension.

I've got a little more spare time with this extension 
compiled, but I'd need you guys to launch a fix as soon as 
possible because I'm not sure how much longer I'll have an 
"almost updated" server left to compile the extension 
manually.
 [2012-03-07 17:10 UTC] andrei@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: andrei
 [2012-03-07 17:10 UTC] andrei@php.net
Closing because of age. Please try versionb 2.0.1 and reopen if this still 
occurs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC