root@myrig:~/couchbase# pecl install couchbase
downloading couchbase-3.0.4.tgz …
Starting to download couchbase-3.0.4.tgz (136,400 bytes)
…done: 136,400 bytes
80 source files, building
running: phpize
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
building in /tmp/pear/temp/pear-build-rootHqFAQT/couchbase-3.0.4
running: /tmp/pear/temp/couchbase/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e… /usr/bin/grep
checking for egrep… /usr/bin/grep -E
checking for a sed that does not truncate output… /usr/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-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking target system type… x86_64-pc-linux-gnu
checking for PHP prefix… /usr
checking for PHP includes… -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib
checking for PHP extension directory… /usr/lib/php/20180731
checking for PHP installed headers prefix… /usr/include/php/20180731
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 Couchbase support… yes, shared
checking wheter to use system FastLZ library… no
checking for libcouchbase in default path and yes… found in /usr
checking for libcouchbase version >= 2.9.5… 0x021006
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 zlib.h usability… yes
checking zlib.h presence… yes
checking for zlib.h… yes
checking for compress in -lz… yes
checking how to print strings… printf
checking for a sed that does not truncate output… (cached) /usr/bin/sed
checking for fgrep… /usr/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 how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format… func_convert_file_noop
checking how to convert x86_64-pc-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 a working dd… /usr/bin/dd
checking how to truncate binary pipes… /usr/bin/dd bs=4096 count=1
checking for mt… mt
checking if mt is a manifest tool… no
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-rootHqFAQT/couchbase-3.0.4/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootHqFAQT/couchbase-3.0.4/include -I/tmp/pear/temp/pear-build-rootHqFAQT/couchbase-3.0.4/main -I/tmp/pear/temp/couchbase -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/couchbase/couchbase.c -o couchbase.lo
libtool: compile: cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/couchbase -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootHqFAQT/couchbase-3.0.4/include -I/tmp/pear/temp/pear-build-rootHqFAQT/couchbase-3.0.4/main -I/tmp/pear/temp/couchbase -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/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:40,
from /tmp/pear/temp/couchbase/couchbase.c:17:
/tmp/pear/temp/couchbase/log.h:24:5: error: unknown type name ‘lcb_LOGGER_CALLBACK’
lcb_LOGGER_CALLBACK callback;
^~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/couchbase/log.h:29:29: error: unknown type name ‘lcb_INSTANCE’; did you mean ‘lcb_PINGSTATUS’?
void pcbc_log(int severity, lcb_INSTANCE *instance, const char *subsys, const char *srcfile, int srcline, const char *fmt, …);
^~~~~~~~~~~~
lcb_PINGSTATUS
In file included from /tmp/pear/temp/couchbase/couchbase.c:17:
/tmp/pear/temp/couchbase/couchbase.h:58:5: error: unknown type name ‘lcb_INSTANCE_TYPE’
lcb_INSTANCE_TYPE type;
^~~~~~~~~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.h:62:5: error: unknown type name ‘lcb_INSTANCE’
lcb_INSTANCE *lcb;
^~~~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.h:67:1: error: unknown type name ‘lcb_STATUS’; did you mean ‘ADJ_STATUS’?
lcb_STATUS pcbc_connection_get(pcbc_connection_t **result, lcb_INSTANCE_TYPE type, const char *connstr,
^~~~~~~~~~
ADJ_STATUS
/tmp/pear/temp/couchbase/couchbase.h:67:60: error: unknown type name ‘lcb_INSTANCE_TYPE’; did you mean ‘lcb_GETNODETYPE’?
lcb_STATUS pcbc_connection_get(pcbc_connection_t **result, lcb_INSTANCE_TYPE type, const char *connstr,
^~~~~~~~~~~~~~~~~
lcb_GETNODETYPE
/tmp/pear/temp/couchbase/couchbase.h:284:5: error: unknown type name ‘lcb_STATUS’
lcb_STATUS err;
^~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.h:296:44: error: unknown type name ‘lcb_INSTANCE’; did you mean ‘lcb_PINGSTATUS’?
void pcbc_http_request(zval *return_value, lcb_INSTANCE *conn, lcb_CMDHTTP *cmd, int json_response, void *cbctx,
^~~~~~~~~~~~
lcb_PINGSTATUS
/tmp/pear/temp/couchbase/couchbase.h:331:5: error: unknown type name ‘lcb_STATUS’
lcb_STATUS first_error;
^~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.h:341:1: error: unknown type name ‘lcb_STATUS’; did you mean ‘ADJ_STATUS’?
lcb_STATUS opcookie_get_first_error(opcookie *cookie);
^~~~~~~~~~
ADJ_STATUS
/tmp/pear/temp/couchbase/couchbase.c: In function ‘zm_startup_couchbase’:
/tmp/pear/temp/couchbase/couchbase.c:262:13: warning: implicit declaration of function ‘pcbc_log’ [-Wimplicit-function-declaration]
pcbc_log(LOGARGS(FATAL),
^~~~~~~~
/tmp/pear/temp/couchbase/couchbase.c:368:9: warning: implicit declaration of function ‘LCB_XERROR’; did you mean ‘LCB_XERR’? [-Wimplicit-function-declaration]
LCB_XERROR(X)
^~~~~~~~~~
LCB_XERR
/tmp/pear/temp/couchbase/couchbase.c:368:20: error: ‘X’ undeclared (first use in this function)
LCB_XERROR(X)
^
/tmp/pear/temp/couchbase/couchbase.c:368:20: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/temp/couchbase/couchbase.c:368:22: error: expected ‘;’ before ‘}’ token
LCB_XERROR(X)
^
;
/tmp/pear/temp/couchbase/couchbase.c:371:5:
}
~
In file included from /usr/include/php/20180731/main/php.h:469,
from /tmp/pear/temp/couchbase/couchbase.h:25,
from /tmp/pear/temp/couchbase/couchbase.c:17:
/tmp/pear/temp/couchbase/couchbase.c:374:35: error: ‘LCB_ERR_TEMPORARY_FAILURE’ undeclared (first use in this function); did you mean ‘ZPP_ERROR_FAILURE’?
PCBC_LONG_CONSTANT(“TMPFAIL”, LCB_ERR_TEMPORARY_FAILURE);
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20180731/Zend/zend_constants.h:53:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
#define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
^~~~
/tmp/pear/temp/couchbase/couchbase.c:374:5: note: in expansion of macro ‘PCBC_LONG_CONSTANT’
PCBC_LONG_CONSTANT(“TMPFAIL”, LCB_ERR_TEMPORARY_FAILURE);
^~~~~~~~~~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.c:375:44: error: ‘LCB_ERR_DOCUMENT_EXISTS’ undeclared (first use in this function); did you mean ‘LCB_SDCMD_EXISTS’?
PCBC_LONG_CONSTANT(“KEYALREADYEXISTS”, LCB_ERR_DOCUMENT_EXISTS);
^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20180731/Zend/zend_constants.h:53:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
#define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
^~~~
/tmp/pear/temp/couchbase/couchbase.c:375:5: note: in expansion of macro ‘PCBC_LONG_CONSTANT’
PCBC_LONG_CONSTANT(“KEYALREADYEXISTS”, LCB_ERR_DOCUMENT_EXISTS);
^~~~~~~~~~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.c:376:39: error: ‘LCB_ERR_DOCUMENT_NOT_FOUND’ undeclared (first use in this function); did you mean ‘LCB_OBSERVE_NOT_FOUND’?
PCBC_LONG_CONSTANT(“KEYNOTFOUND”, LCB_ERR_DOCUMENT_NOT_FOUND);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/20180731/Zend/zend_constants.h:53:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
#define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
^~~~
/tmp/pear/temp/couchbase/couchbase.c:376:5: note: in expansion of macro ‘PCBC_LONG_CONSTANT’
PCBC_LONG_CONSTANT(“KEYNOTFOUND”, LCB_ERR_DOCUMENT_NOT_FOUND);
^~~~~~~~~~~~~~~~~~
/tmp/pear/temp/couchbase/couchbase.c: In function ‘zm_info_couchbase’:
/tmp/pear/temp/couchbase/couchbase.c:1016:5: error: unknown type name ‘lcb_STATUS’; did you mean ‘ADJ_STATUS’?
lcb_STATUS err;
^~~~~~~~~~
ADJ_STATUS
make: *** [Makefile:195: couchbase.lo] Error 1
ERROR: `make’ failed
root@myrig:~/couchbase# cat /etc/issue
Debian GNU/Linux 10 \n \lroot@myrig:~/couchbase#
@avsej can you please take a look at this ?
@puthre it looks like you don’t have current libcouchbase installed. Current version is 3.0.6
You can find more info here: SDK Release Notes | Couchbase Docs