**ERROR** Could not compile XCache extension

Mike Yo.

Active Member
#1
I have been trying to compile PHP 7.0.4 with xcache and memcache via Litespeed admin, but I am getting an error:

**MAIN_STATUS** retrieved from /usr/local/lsws/phpbuild/buildphp_1458793478.3.progress
Start building PHP 7.0.4 with LSAPI
Configuring PHP build (2-3 minutes)
Compiling PHP (5-10 minutes)
Installing PHP
copy compiled php binary to litespeed directory
Start building XCache Extension
Changing to build directory /usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0
Running PHPize for XCache extension
Configuring XCache extension build
Compiling XCache extension
**ERROR** Could not compile XCache extension

EDIT:
These are the full details:

==============================================
Start building XCache Extension
==============================================
Thu Mar 24 11:32:37 ICT 2016

Changing to build directory /usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0
Running PHPize for XCache extension
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
Configuring XCache extension build
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 for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/lsws/lsphp7
checking for PHP includes... -I/usr/local/lsws/lsphp7/include/php -I/usr/local/lsws/lsphp7/include/php/main -I/usr/local/lsws/lsphp7/include/php/TSRM -I/usr/local/lsws/lsphp7/include/php/Zend -I/usr/local/lsws/lsphp7/include/php/ext -I/usr/local/lsws/lsphp7/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lsws/lsphp7/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix... /usr/local/lsws/lsphp7/include/php
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 for XCache support... yes, shared
checking for XCache handle of compile time constant... yes
checking for XCache optimizer... no
checking for XCache coverager... no
checking for XCache assembler... no
checking for XCache disassembler... no
checking for XCache encoder... no
checking for XCache decoder... no
checking for XCache self test... no
checking for XCache self test... no
checking for gawk... /bin/gawk
checking for m4... /usr/bin/m4
checking for grep... (cached) /bin/grep
checking for sed... /bin/sed
checking for indent... no
checking for cat... /bin/cat
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1966080
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... 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

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
Compiling XCache extension
cc -I. -I/usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0 -DPHP_ATOM_INC -I/usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0/include -I/usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0/main -I/usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0 -I/usr/local/lsws/lsphp7/include/php -I/usr/local/lsws/lsphp7/include/php/main -I/usr/local/lsws/lsphp7/include/php/TSRM -I/usr/local/lsws/lsphp7/include/php/Zend -I/usr/local/lsws/lsphp7/include/php/ext -I/usr/local/lsws/lsphp7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -E /usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0/includes.c -o ./includes.i
./structinfo.m4 is optional if XCache test is not enabled, feel free if it awk failed to produce it
LANG=C /bin/gawk -f /usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0/gen_structinfo.awk < ./includes.i > ./structinfo.m4.tmp && mv ./structinfo.m4.tmp ./structinfo.m4
/usr/bin/m4 -B 102400 -D srcdir='`'"/usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0'" -D builddir='`'".'" /usr/local/lsws/phpbuild/php-7.0.4/xcache-3.2.0/processor/main.m4 > ./processor.out.c.tmp
/usr/bin/m4: Warning: `m4 -B' may be removed in a future release
AUTOCHECK INFO: runtime autocheck Disabled (optimized build)
AUTOCHECK WARN: zend_compiled_variable: missing structinfo, dont panic
AUTOCHECK INFO: zend_try_catch_element: processor looks good
AUTOCHECK INFO: zend_brk_cont_element: processor looks good
AUTOCHECK ERROR: ==== calc HashTable =================
AUTOCHECK expected: "gc","u","nTableMask","arData","nNumUsed","nNumOfElements","nTableSize","nInternalPointer","nNextFreeElement","pDestructor"
AUTOCHECK missing : "gc" "u" "arData" "nNumUsed" "nInternalPointer"
AUTOCHECK ERROR: ==== calc zend_ast =================
AUTOCHECK expected: "kind","attr","lineno","child"
AUTOCHECK missing : "attr" "lineno" "child"
AUTOCHECK ERROR: ==== calc zval =================
AUTOCHECK expected: "value","u1","u2"
AUTOCHECK missing : "u1" "u2"
AUTOCHECK INFO: zend_arg_info: processor looks good
AUTOCHECK INFO: zend_constant: processor looks good
AUTOCHECK INFO: zend_property_info: processor looks good
AUTOCHECK INFO: zend_trait_method_reference: processor looks good
AUTOCHECK INFO: zend_trait_alias: processor looks good
AUTOCHECK INFO: zend_trait_precedence: processor looks good
AUTOCHECK INFO: zend_class_entry: processor looks good
AUTOCHECK ERROR: ==== calc znode =================
AUTOCHECK expected: "op_type","flag","u"
AUTOCHECK missing : "flag"
AUTOCHECK INFO: zend_op: processor looks good
AUTOCHECK WARN: zend_literal: missing structinfo, dont panic
AUTOCHECK ERROR: ==== calc zend_op_array =================
AUTOCHECK expected: "type","arg_flags","fn_flags","function_name","scope","prototype","num_args","required_num_args","arg_info","refcount","this_var","last","opcodes","last_var","T","vars","last_brk_cont","last_try_catch","brk_cont_array","try_catch_array","static_variables","filename","line_start","line_end","doc_comment","early_binding","last_literal","literals","cache_size","run_time_cache","reserved"
AUTOCHECK missing : "arg_flags" "cache_size"
AUTOCHECK INFO: xc_constinfo_t: processor looks good
AUTOCHECK INFO: xc_op_array_info_detail_t: processor looks good
AUTOCHECK INFO: xc_op_array_info_t: processor looks good
AUTOCHECK INFO: xc_funcinfo_t: processor looks good
AUTOCHECK INFO: xc_entry_php_t: processor looks good
AUTOCHECK INFO: xc_entry_var_t: processor looks good
AUTOCHECK ERROR: ==== store HashTable =================
AUTOCHECK ERROR: ==== store zend_ast =================
AUTOCHECK ERROR: ==== store zval =================
AUTOCHECK ERROR: ==== store znode =================
AUTOCHECK ERROR: ==== store zend_op_array =================
AUTOCHECK ERROR: ==== restore HashTable =================
AUTOCHECK ERROR: ==== restore zend_ast =================
AUTOCHECK ERROR: ==== restore zval =================
AUTOCHECK ERROR: ==== restore znode =================
AUTOCHECK ERROR: ==== restore zend_op_array =================
AUTOCHECK ERROR: ==== dprint HashTable =================
AUTOCHECK ERROR: ==== dprint zend_ast =================
AUTOCHECK ERROR: ==== dprint zval =================
AUTOCHECK ERROR: ==== dprint znode =================
AUTOCHECK ERROR: ==== dprint zend_op_array =================
AUTOCHECK ERROR: ==== dasm HashTable =================
AUTOCHECK ERROR: ==== dasm zend_ast =================
AUTOCHECK ERROR: ==== dasm zval =================
AUTOCHECK ERROR: ==== dasm znode =================
AUTOCHECK ERROR: ==== dasm zend_op_array =================
make: *** [processor.out.c] Error 1
**ERROR** Could not compile XCache extension

How can I fix this?

Thank you
 

Mike Yo.

Active Member
#4
I just removed xcache and tried compling again, but this time got this error:
**MAIN_STATUS** retrieved from /usr/local/lsws/phpbuild/buildphp_1458815531.9.progress
Start building PHP 7.0.4 with LSAPI
Configuring PHP build (2-3 minutes)
Compiling PHP (5-10 minutes)
Installing PHP
copy compiled php binary to litespeed directory
Start building MemCache Extension
Changing to build directory /usr/local/lsws/phpbuild/php-7.0.4/memcache-2.2.7
Running PHPize for MemCache extension
Configuring MemCache extension build
Compiling MemCache extension
**ERROR** Could not compile MemCache extension


Is MemCache also not supported?
 
L

Long

Guest
#5
Please put up your result of the following command here:
/usr/local/lsws/lsphp7/bin/phpize
/usr/local/lsws/lsphp7/bin/php-config

Latest MemCache supposed to support php7, maybe V2.2.7 has to be tested to see
 
Last edited by a moderator:

Mike Yo.

Active Member
#6
root@host [~]# /usr/local/lsws/lsphp7/bin/phpize
Cannot find config.m4.
Make sure that you run '/usr/local/lsws/lsphp7/bin/phpize' in the top level source directory of the module

root@host [~]# /usr/local/lsws/lsphp7/bin/php-config
Usage: /usr/local/lsws/lsphp7/bin/php-config [OPTION]
Options:
--prefix [/usr/local/lsws/lsphp7]
--includes [-I/usr/local/lsws/lsphp7/include/php -I/usr/local/lsws/lsphp7/include/php/main -I/usr/local/lsws/lsphp7/include/php/TSRM -I/usr/local/lsws/lsphp7/include/php/Zend -I/usr/local/lsws/lsphp7/include/php/ext -I/usr/local/lsws/lsphp7/include/php/ext/date/lib]
--ldflags []
--libs [-lcrypt -lz -lcrypt -lrt -lmcrypt -lltdl -lpng -lz -lcurl -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -lcurl -lxml2 -lz -lm -lssl -lcrypto -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lssl -lcrypto -lcrypt ]
--extension-dir [/usr/local/lsws/lsphp7/lib/php/extensions/no-debug-non-zts-20151012]
--include-dir [/usr/local/lsws/lsphp7/include/php]
--man-dir [/usr/local/lsws/lsphp7/php/man]
--php-binary [/usr/local/lsws/lsphp7/bin/php]
--php-sapis [ cli litespeed phpdbg cgi]
--configure-options [--prefix=/usr/local/lsws/lsphp7 --with-mysqli --with-zlib --with-gd --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-mbstring --with-iconv --with-mcrypt --with-pdo-mysql --enable-ftp --enable-zip --with-curl --enable-soap --enable-xml --enable-json --with-openssl --enable-bcmath --with-litespeed]
--version [7.0.4]
--vernum [70004]
 
L

Long

Guest
#10
Hi, Mike,

Thanks for providing the info.
From the compilation msg it seems there is compatibility issue with MemCache V2.27 and php7.
But if you google it you will find some working case, using memcached, e.g.,
http://grokbase.com/t/php/pecl-dev/148xb1ayd0/php-memcached-is-available-for-php7-now

I suggest you to download the latest source from memcache or memcached, and try to install it manually.

But thanks for finding the issue and letting us know. I will forward to our developer and got this options showing more accurate info.

Regards
 
#11
ok, I have compiled php 7 without xcache and memcache. It compiled fine.
Now I am trying to make Litespeed use php 7 for php suffix (configured via the management console):
External app:
http://grabilla.com/06318-eb5f7ac7-fa41-4835-984b-d068f2fa0696.png

And script handler:
http://grabilla.com/06318-cf5352f7-3db9-455e-a34f-b4edb5d4cc29.png

When I am testing my scripts, they are all still running php 5.6.19

Note that I am using cPanel/WHM with EasyApache integration.

How can I set it up to work?

Thank you
 
#13
EasyApache 3 does not have php 7 installation option.
Only EA 4 supports php7, but it is still in beta and thus we can not enable it.
Is there any simple way to make this configuration work with LSPHP?
 

Pong

Administrator
Staff member
#14
You can try:
in php handler:
along .php suffix , try to add .php5 and .php70 and all pointing to lsapi lsphp7( probably no need .php70 , but no harm to add it) .

Again, this is not official way to setup php for cPanel.
 
Last edited:
Top