Error installing the couchbase SDK with php7.1.9


#1

Hi,

I am getting this error while installing couchbase SDK on centos6.5, php7.1.9 and GCC 4.4.7

Error:

cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootiNA2fl/couchbase-2.5.0/include -I/tmp/pear/temp/pear-build-rootiNA2fl/couchbase-2.5.0/main -I/tmp/pear/temp/couchbase -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 /tmp/pear/temp/couchbase/couchbase.c -fPIC -DPIC -o .libs/couchbase.o

In file included from /tmp/pear/temp/couchbase/couchbase.h:34,

from /tmp/pear/temp/couchbase/couchbase.c:17:

/usr/include/libcouchbase/crypto.h:74: error: expected declaration specifiers or ‘...’ before ‘lcbcrypto_KEYTYPE’

In file included from /tmp/pear/temp/couchbase/couchbase.c:17:

/tmp/pear/temp/couchbase/couchbase.h:511: error: expected specifier-qualifier-list before ‘lcb_BTYPE’
/tmp/pear/temp/couchbase/couchbase.h:577: error: expected specifier-qualifier-list before ‘lcb_MUTATION_TOKEN’
/tmp/pear/temp/couchbase/couchbase.h:595: error: expected specifier-qualifier-list before ‘lcb_SDSPEC’
/tmp/pear/temp/couchbase/couchbase.h:803: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/tmp/pear/temp/couchbase/couchbase.h:811: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/tmp/pear/temp/couchbase/couchbase.h:813: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/tmp/pear/temp/couchbase/couchbase.h:816: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token

In file included from /tmp/pear/temp/couchbase/couchbase.c:17:

/tmp/pear/temp/couchbase/couchbase.h: In function ‘pcbc_bucket_fetch_object’:
/tmp/pear/temp/couchbase/couchbase.h:894: error: ‘pcbc_bucket_t’ has no member named ‘std’

/tmp/pear/temp/couchbase/couchbase.h: In function ‘pcbc_mutation_token_fetch_object’:
/tmp/pear/temp/couchbase/couchbase.h:922: error: ‘pcbc_mutation_token_t’ has no member named ‘std’

/tmp/pear/temp/couchbase/couchbase.h: At top level:
/tmp/pear/temp/couchbase/couchbase.h:1043: error: expected specifier-qualifier-list before ‘lcb_MUTATION_TOKEN’

/tmp/pear/temp/couchbase/couchbase.c: In function ‘zm_startup_couchbase’:
/tmp/pear/temp/couchbase/couchbase.c:331: error: ‘LCB_SDCMD_GET’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:331: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/couchbase/couchbase.c:331: error: for each function it appears in.)
/tmp/pear/temp/couchbase/couchbase.c:332: error: ‘LCB_SDCMD_REPLACE’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:333: error: ‘LCB_SDCMD_EXISTS’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:334: error: ‘LCB_SDCMD_DICT_ADD’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:335: error: ‘LCB_SDCMD_DICT_UPSERT’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:336: error: ‘LCB_SDCMD_ARRAY_ADD_FIRST’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:337: error: ‘LCB_SDCMD_ARRAY_ADD_LAST’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:338: error: ‘LCB_SDCMD_ARRAY_INSERT’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:339: error: ‘LCB_SDCMD_ARRAY_ADD_UNIQUE’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:340: error: ‘LCB_SDCMD_COUNTER’ undeclared (first use in this function)
/tmp/pear/temp/couchbase/couchbase.c:341: error: ‘LCB_SDCMD_REMOVE’ undeclared (first use in this function)

make: *** [couchbase.lo] Error 1

ERROR: `make' failed

#2

Hi @shrinivasg,

I would recommend you post questions like this to the PHP forum here: https://forums.couchbase.com/c/php-sdk

That said, I’m tagging @avsej, since he might be able to help.


#3

@shrinivasg, what version of libcouchbase do you use? And how do you obtain and install couchbase PHP extension? Could you post full log (including output from configure script)?


#4

Hi Acscj,

Sorry for delay in reply…

version of libcouchbase is 2.9, now it working fine. I have resolved the issue by php.