Comments (13)
I get the same error on Debian 6:
root@x:/php-memcached# make
/bin/bash /php-memcached/libtool --mode=compile cc -I/usr/include/php5 -I. -I/php-memcached -DPHP_ATOM_INC -I/php-memcached/include -I/php-memcached/main -I/php-memcached -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /php-memcached/php_memcached.c -o php_memcached.lo
libtool: compile: cc -I/usr/include/php5 -I. -I/php-memcached -DPHP_ATOM_INC -I/php-memcached/include -I/php-memcached/main -I/php-memcached -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /php-memcached/php_memcached.c -fPIC -DPIC -o .libs/php_memcached.o
/php-memcached/php_memcached.c:324: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/php-memcached/php_memcached.c:325: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/php-memcached/php_memcached.c:326: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/php-memcached/php_memcached.c: In function 'php_memc_get_impl':
/php-memcached/php_memcached.c:605: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c: In function 'php_memc_getMulti_impl':
/php-memcached/php_memcached.c:803: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c:806: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c: In function 'zim_Memcached_fetch':
/php-memcached/php_memcached.c:1020: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c:1023: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c: In function 'zim_Memcached_fetchAll':
/php-memcached/php_memcached.c:1074: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c:1077: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c: In function 'zim_Memcached_getServerList':
/php-memcached/php_memcached.c:1955: warning: assignment from incompatible pointer type
/php-memcached/php_memcached.c: In function 'zim_Memcached_getServerByKey':
/php-memcached/php_memcached.c:1968: error: 'memcached_server_instance_st' undeclared (first use in this function)
/php-memcached/php_memcached.c:1968: error: (Each undeclared identifier is reported only once
/php-memcached/php_memcached.c:1968: error: for each function it appears in.)
/php-memcached/php_memcached.c:1968: error: 'server_instance' undeclared (first use in this function)
/php-memcached/php_memcached.c: In function 'zim_Memcached_getLastDisconnectedServer':
/php-memcached/php_memcached.c:2086: error: 'memcached_server_instance_st' undeclared (first use in this function)
/php-memcached/php_memcached.c:2086: error: 'server_instance' undeclared (first use in this function)
/php-memcached/php_memcached.c: In function 'zim_Memcached_getStats':
/php-memcached/php_memcached.c:2138: warning: assignment from incompatible pointer type
/php-memcached/php_memcached.c: In function 'zim_Memcached_getVersion':
/php-memcached/php_memcached.c:2171: warning: assignment from incompatible pointer type
/php-memcached/php_memcached.c: At top level:
/php-memcached/php_memcached.c:2663: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/php-memcached/php_memcached.c: In function 'php_memc_do_serverlist_callback':
/php-memcached/php_memcached.c:2670: error: 'instance' undeclared (first use in this function)
/php-memcached/php_memcached.c: At top level:
/php-memcached/php_memcached.c:2681: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/php-memcached/php_memcached.c: In function 'php_memc_do_stats_callback':
/php-memcached/php_memcached.c:2687: error: 'instance' undeclared (first use in this function)
/php-memcached/php_memcached.c: At top level:
/php-memcached/php_memcached.c:2725: error: expected declaration specifiers or '...' before 'memcached_server_instance_st'
/php-memcached/php_memcached.c: In function 'php_memc_do_version_callback':
/php-memcached/php_memcached.c:2732: error: 'instance' undeclared (first use in this function)
/php-memcached/php_memcached.c: In function 'php_memc_do_result_callback':
/php-memcached/php_memcached.c:3291: warning: assignment discards qualifiers from pointer target type
/php-memcached/php_memcached.c:3294: warning: assignment discards qualifiers from pointer target type
make: *** [php_memcached.lo] Error 1
from php-memcached.
Exact same problem here as well with CentOS 6.4 64bit and libmemcached 1.0.17 was fine with 1.0.16
from php-memcached.
Yep, in version 2.0.1 php_libmemcached_compat.h had:
typedef const struct memcached_server_st *memcached_server_instance_st;
But then it was removed in 2.1.0. As it currently stands, you could consider PECL memcached 2.1.0 incompatible with libmemcached 1.0.17 (and probably future versions as well). Of course you could put the line above back into php_libmemcached_compat.h for version 2.1.0 and it will compile and work just fine. A new release of PECL memcached should be forthcoming at some point to be compatible with libmemcached >= 1.0.17.
from php-memcached.
I got the same problem is this going to get fixed?
from php-memcached.
Seems to be the same issue.
https://gist.github.com/jdoss/5688399
Would be nice to not have to install memcached and libmemcached from alt sources to get this installed via PECL.
# cat /etc/redhat-release
CentOS release 6.4 (Final)
# rpm -qa |grep memcac
libmemcached-0.31-1.1.el6.x86_64
libmemcached-devel-0.31-1.1.el6.x86_64
memcached-devel-1.4.4-3.el6.x86_64
memcached-1.4.4-3.el6.x86_64
from php-memcached.
[root@localhost memcached-2.1.0]# make
/bin/sh /root/memcached-2.1.0/libtool --mode=compile cc -I/usr/local/include/php -I. -I/root/memcached-2.1.0 -DPHP_ATOM_INC -I/root/memcached-2.1.0/include -I/root/memcached-2.1.0/main -I/root/memcached-2.1.0 -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 -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/memcached-2.1.0/php_memcached.c -o php_memcached.lo
mkdir .libs
cc -I/usr/local/include/php -I. -I/root/memcached-2.1.0 -DPHP_ATOM_INC -I/root/memcached-2.1.0/include -I/root/memcached-2.1.0/main -I/root/memcached-2.1.0 -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 -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/memcached-2.1.0/php_memcached.c -fPIC -DPIC -o .libs/php_memcached.o
/root/memcached-2.1.0/php_memcached.c:318: 错误:expected declaration specifiers or ‘...’ before ‘memcached_server_instance_st’
/root/memcached-2.1.0/php_memcached.c:319: 错误:expected declaration specifiers or ‘...’ before ‘memcached_server_instance_st’
/root/memcached-2.1.0/php_memcached.c:320: 错误:expected declaration specifiers or ‘...’ before ‘memcached_server_instance_st’
/root/memcached-2.1.0/php_memcached.c: 在函数‘php_memc_get_impl’中:
/root/memcached-2.1.0/php_memcached.c:599: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c: 在函数‘php_memc_getMulti_impl’中:
/root/memcached-2.1.0/php_memcached.c:797: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c:800: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c: 在函数‘zim_Memcached_fetch’中:
/root/memcached-2.1.0/php_memcached.c:1014: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c:1017: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c: 在函数‘zim_Memcached_fetchAll’中:
/root/memcached-2.1.0/php_memcached.c:1068: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c:1071: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c: 在函数‘zim_Memcached_getServerList’中:
/root/memcached-2.1.0/php_memcached.c:1948: 警告:从不兼容的指针类型赋值
/root/memcached-2.1.0/php_memcached.c: 在函数‘zim_Memcached_getServerByKey’中:
/root/memcached-2.1.0/php_memcached.c:1977: 警告:从不兼容的指针类型赋值
/root/memcached-2.1.0/php_memcached.c: 在函数‘zim_Memcached_getStats’中:
/root/memcached-2.1.0/php_memcached.c:2056: 警告:从不兼容的指针类型赋值
/root/memcached-2.1.0/php_memcached.c: 在函数‘zim_Memcached_getVersion’中:
/root/memcached-2.1.0/php_memcached.c:2089: 警告:从不兼容的指针类型赋值
/root/memcached-2.1.0/php_memcached.c: 在文件层:
/root/memcached-2.1.0/php_memcached.c:2576: 错误:expected declaration specifiers or ‘...’ before ‘memcached_server_instance_st’
/root/memcached-2.1.0/php_memcached.c: 在函数‘php_memc_do_serverlist_callback’中:
/root/memcached-2.1.0/php_memcached.c:2583: 错误:‘instance’未声明(在此函数内第一次使用)
/root/memcached-2.1.0/php_memcached.c:2583: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/root/memcached-2.1.0/php_memcached.c:2583: 错误:所在的函数内也只报告一次。)
/root/memcached-2.1.0/php_memcached.c: 在文件层:
/root/memcached-2.1.0/php_memcached.c:2593: 错误:expected declaration specifiers or ‘...’ before ‘memcached_server_instance_st’
/root/memcached-2.1.0/php_memcached.c: 在函数‘php_memc_do_stats_callback’中:
/root/memcached-2.1.0/php_memcached.c:2599: 错误:‘instance’未声明(在此函数内第一次使用)
/root/memcached-2.1.0/php_memcached.c: 在文件层:
/root/memcached-2.1.0/php_memcached.c:2637: 错误:expected declaration specifiers or ‘...’ before ‘memcached_server_instance_st’
/root/memcached-2.1.0/php_memcached.c: 在函数‘php_memc_do_version_callback’中:
/root/memcached-2.1.0/php_memcached.c:2644: 错误:‘instance’未声明(在此函数内第一次使用)
/root/memcached-2.1.0/php_memcached.c: 在函数‘php_memc_do_result_callback’中:
/root/memcached-2.1.0/php_memcached.c:3191: 警告:赋值丢弃了指针目标类型的限定
/root/memcached-2.1.0/php_memcached.c:3194: 警告:赋值丢弃了指针目标类型的限定
make: *** [php_memcached.lo] 错误 1
from php-memcached.
use libmemcached 1.0.16 is OK
from php-memcached.
use libmemcached 1.0.16 as well and worked out OK
from php-memcached.
Are you able to build using the PR mentioned above? Works for me on Mac OS X.
from php-memcached.
@mkoppanen im still getting a failure when attempting to compile identical to the other, what was the solution for this issue?
cat /etc/redhat-release
CentOS release 6.4 (Final)
rpm -qa |grep memcac
libmemcached-1.0.16-1.el6.remi.x86_64
memcached-devel-1.4.15-1.x86_64
memcached-1.4.15-1.x86_64
libmemcached-devel-1.0.16-1.el6.remi.x86_64
from php-memcached.
Are you testing with current master or 2.1.0 release?
from php-memcached.
i was attempting with 2.1.0 release from pecl but i just built it successfully from the current master.
from php-memcached.
yep, that's the solution. I will do a release later once we finish the feature set for 2.2.0 release
from php-memcached.
Related Issues (20)
- Incorrect PHP reflection type for Memcached::cas $cas_token HOT 1
- Release 3.2.1 HOT 8
- Support for PHP 8.1.7 HOT 5
- get returns random values when lower than default OPT_POLL_TIMEOUT is set HOT 42
- When using sasl return false
- What is $udf_flags in memcached-api.php?
- Use memcache on wordpress with php 8.1 HOT 2
- Installing in docker, with apache + php-7.4 | GC_REFCOUNT HOT 3
- Problem stored float value in PHP 8.1/8.2 HOT 1
- pickle.phar installation of memcached doesn't work anymore as of PHP 8.1.20 and PHP 8.2.7 HOT 3
- OPT_NOREPLY: touch() stuck forever
- Suspicion of php-memcached bug regarding persistent sessions resulting in rare cases of session mixup
- No updated DLL version available HOT 3
- please help install php 8.0 memcache in docker HOT 1
- Undocumented 3.2.0 change: non-ascii keys no longer supported. HOT 10
- PHP 8.3 HOT 1
- Release zstd support
- memcached.so: php_msgpack_serialize: symbol not found HOT 2
- memcached returns wrong values.
- get/getMulti return RES_NOTFOUND after buffered increment with result RES_UNKNOWN_READ_FAILURE with OPT_BINARY_PROTOCOL HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-memcached.