Giter Club home page Giter Club logo

Comments (13)

 avatar commented on July 25, 2024

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.

vbtechsupport avatar vbtechsupport commented on July 25, 2024

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.

thejusme avatar thejusme commented on July 25, 2024

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.

Zewy avatar Zewy commented on July 25, 2024

I got the same problem is this going to get fixed?

from php-memcached.

jdoss avatar jdoss commented on July 25, 2024

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.

ljcqx avatar ljcqx commented on July 25, 2024

[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.

golangfan avatar golangfan commented on July 25, 2024

use libmemcached 1.0.16 is OK

from php-memcached.

Sydney-o9 avatar Sydney-o9 commented on July 25, 2024

use libmemcached 1.0.16 as well and worked out OK

from php-memcached.

mkoppanen avatar mkoppanen commented on July 25, 2024

Are you able to build using the PR mentioned above? Works for me on Mac OS X.

from php-memcached.

th3fallen avatar th3fallen commented on July 25, 2024

@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.

mkoppanen avatar mkoppanen commented on July 25, 2024

Are you testing with current master or 2.1.0 release?

from php-memcached.

th3fallen avatar th3fallen commented on July 25, 2024

i was attempting with 2.1.0 release from pecl but i just built it successfully from the current master.

from php-memcached.

mkoppanen avatar mkoppanen commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.