Skip to content

Use "nm" to list actual symbols from the module to check for the "zend_extension_entry" symbol (fixes false positives like xcache) #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2016

Conversation

tianon
Copy link
Member

@tianon tianon commented Jan 7, 2016

No description provided.

tianon added 2 commits January 6, 2016 16:30
…d_extension_entry" symbol (fixes false positives like xcache)
@tianon
Copy link
Member Author

tianon commented Jan 7, 2016

$ docker build -t php:5.6-apache 5.6/apache
  ...
$ docker run -it --rm php:5.6-apache bash
root@18c07d3fc723:/var/www/html# curl -fsSL 'https://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz' -o xcache.tar.gz
root@18c07d3fc723:/var/www/html# mkdir xcache
root@18c07d3fc723:/var/www/html# tar -xf xcache.tar.gz --strip-components=1 -C xcache
root@18c07d3fc723:/var/www/html# cd xcache
root@18c07d3fc723:/var/www/html/xcache# phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
root@18c07d3fc723:/var/www/html/xcache# ./configure --enable-xcache
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 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-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
checking for PHP includes... -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
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
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... no
checking for awk... /usr/bin/awk
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... 1572864
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
root@18c07d3fc723:/var/www/html/xcache# make -j$(nproc)
cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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  -E /var/www/html/xcache/includes.c -o ./includes.i
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/util/xc_stack.c -o util/xc_stack.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/util/xc_trace.c -o util/xc_trace.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_allocator.c -o xcache/xc_allocator.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_allocator_bestfit.c -o xcache/xc_allocator_bestfit.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_compatibility.c -o xcache/xc_compatibility.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_const_string.c -o xcache/xc_const_string.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_extension.c -o xcache/xc_extension.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_ini.c -o xcache/xc_ini.lo 
mkdir xcache/.libs
mkdir util/.libs
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_compatibility.c  -fPIC -DPIC -o xcache/.libs/xc_compatibility.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/util/xc_trace.c  -fPIC -DPIC -o util/.libs/xc_trace.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/util/xc_stack.c  -fPIC -DPIC -o util/.libs/xc_stack.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_allocator_bestfit.c  -fPIC -DPIC -o xcache/.libs/xc_allocator_bestfit.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_allocator.c  -fPIC -DPIC -o xcache/.libs/xc_allocator.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_extension.c  -fPIC -DPIC -o xcache/.libs/xc_extension.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_const_string.c  -fPIC -DPIC -o xcache/.libs/xc_const_string.o
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_mutex.c -o xcache/xc_mutex.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_opcode_spec.c -o xcache/xc_opcode_spec.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_sandbox.c -o xcache/xc_sandbox.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_shm.c -o xcache/xc_shm.lo 
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_ini.c  -fPIC -DPIC -o xcache/.libs/xc_ini.o
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_shm_mmap.c -o xcache/xc_shm_mmap.lo 
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_utils.c -o xcache/xc_utils.lo 
./structinfo.m4 is optional if XCache test is not enabled, feel free if it awk failed to produce it
LANG=C /usr/bin/awk -f /var/www/html/xcache/gen_structinfo.awk < ./includes.i > ./structinfo.m4.tmp && mv ./structinfo.m4.tmp ./structinfo.m4
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_mutex.c  -fPIC -DPIC -o xcache/.libs/xc_mutex.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_opcode_spec.c  -fPIC -DPIC -o xcache/.libs/xc_opcode_spec.o
/usr/bin/m4 -B 102400 -D srcdir='`'"/var/www/html/xcache'" -D builddir='`'".'"  /var/www/html/xcache/processor/main.m4 > ./processor.out.c.tmp
/usr/bin/m4:  cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_shm_mmap.c  -fPIC -DPIC -o xcache/.libs/xc_shm_mmap.o
warning: `m4 -B' may be removed in a future release
AUTOCHECK INFO: runtime autocheck Disabled (optimized build)
AUTOCHECK INFO: zend_compiled_variable: processor looks good
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_shm.c  -fPIC -DPIC -o xcache/.libs/xc_shm.o
AUTOCHECK INFO: zend_try_catch_element: processor looks good
AUTOCHECK INFO: zend_brk_cont_element: processor looks good
AUTOCHECK INFO: HashTable: processor looks good
AUTOCHECK INFO: zend_ast: processor looks good
AUTOCHECK INFO: zval: processor looks good
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
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_sandbox.c  -fPIC -DPIC -o xcache/.libs/xc_sandbox.o
AUTOCHECK INFO: zend_class_entry: processor looks good
AUTOCHECK INFO: znode: processor looks good
AUTOCHECK INFO: zend_op: processor looks good
AUTOCHECK INFO: zend_literal: processor looks good
AUTOCHECK INFO: zend_op_array: processor looks good
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_classinfo_t: processor looks good
AUTOCHECK INFO: xc_autoglobal_t: processor looks good
AUTOCHECK INFO: xc_compilererror_t: processor looks good
AUTOCHECK INFO: xc_entry_data_php_t: processor looks good
AUTOCHECK INFO: xc_entry_t: processor looks good
AUTOCHECK INFO: xc_entry_php_t: processor looks good
AUTOCHECK INFO: xc_entry_var_t: processor looks good
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_utils.c  -fPIC -DPIC -o xcache/.libs/xc_utils.o
mv ./processor.out.c.tmp ./processor.out.c
/bin/grep "export: " ./processor.out.c | /bin/sed "s/.*export:\(.*\):export.*/\1/g" > ./xc_processor.h
cat < ./xc_processor.h > ./xc_processor.h.tmp && mv ./xc_processor.h.tmp ./xc_processor.h
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache.c -o xcache.lo 
cp ./processor.out.c ./xc_processor.c.h
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/mod_cacher/xc_cacher.c -o mod_cacher/xc_cacher.lo 
cat < ./processor.out.c > ./xc_processor.c.h.tmp && mv ./xc_processor.c.h.tmp ./xc_processor.c.h
/bin/bash /var/www/html/xcache/libtool --mode=compile cc  -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_processor.c -o xcache/xc_processor.lo 
mkdir mod_cacher/.libs
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/mod_cacher/xc_cacher.c  -fPIC -DPIC -o mod_cacher/.libs/xc_cacher.o
mkdir .libs
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache.c  -fPIC -DPIC -o .libs/xcache.o
 cc -I. -I/var/www/html/xcache -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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 /var/www/html/xcache/xcache/xc_processor.c  -fPIC -DPIC -o xcache/.libs/xc_processor.o
/var/www/html/xcache/mod_cacher/xc_cacher.c: In function 'xc_stat':
/var/www/html/xcache/mod_cacher/xc_cacher.c:1015:53: warning: passing argument 2 of 'php_stream_locate_url_wrapper' from incompatible pointer type
   wrapper = php_stream_locate_url_wrapper(filepath, &path_for_open, 0 TSRMLS_CC); 
                                                     ^
In file included from /usr/local/include/php/main/php.h:398:0,
                 from ./xcache.h:12,
                 from /var/www/html/xcache/mod_cacher/xc_cache.h:8,
                 from /var/www/html/xcache/mod_cacher/xc_cacher.c:11:
/usr/local/include/php/main/php_streams.h:552:28: note: expected 'const char **' but argument is of type 'char **'
 PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, const char **path_for_open, int options TSRMLS_DC);
                            ^
/bin/bash /var/www/html/xcache/libtool --mode=link cc -DPHP_ATOM_INC -I/var/www/html/xcache/include -I/var/www/html/xcache/main -I/var/www/html/xcache -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   -o xcache.la -export-dynamic -avoid-version -prefer-pic -module -rpath /var/www/html/xcache/modules  xcache.lo util/xc_stack.lo util/xc_trace.lo xcache/xc_allocator.lo xcache/xc_allocator_bestfit.lo xcache/xc_compatibility.lo xcache/xc_const_string.lo xcache/xc_extension.lo xcache/xc_ini.lo xcache/xc_mutex.lo xcache/xc_opcode_spec.lo xcache/xc_processor.lo xcache/xc_sandbox.lo xcache/xc_shm.lo xcache/xc_shm_mmap.lo xcache/xc_utils.lo mod_cacher/xc_cacher.lo 
cc -shared  .libs/xcache.o util/.libs/xc_stack.o util/.libs/xc_trace.o xcache/.libs/xc_allocator.o xcache/.libs/xc_allocator_bestfit.o xcache/.libs/xc_compatibility.o xcache/.libs/xc_const_string.o xcache/.libs/xc_extension.o xcache/.libs/xc_ini.o xcache/.libs/xc_mutex.o xcache/.libs/xc_opcode_spec.o xcache/.libs/xc_processor.o xcache/.libs/xc_sandbox.o xcache/.libs/xc_shm.o xcache/.libs/xc_shm_mmap.o xcache/.libs/xc_utils.o mod_cacher/.libs/xc_cacher.o   -Wl,-soname -Wl,xcache.so -o .libs/xcache.so
creating xcache.la
(cd .libs && rm -f xcache.la && ln -s ../xcache.la xcache.la)
/bin/bash /var/www/html/xcache/libtool --mode=install cp ./xcache.la /var/www/html/xcache/modules
cp ./.libs/xcache.so /var/www/html/xcache/modules/xcache.so
cp ./.libs/xcache.lai /var/www/html/xcache/modules/xcache.la
PATH="$PATH:/sbin" ldconfig -n /var/www/html/xcache/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /var/www/html/xcache/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

root@18c07d3fc723:/var/www/html/xcache# make install 
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
root@18c07d3fc723:/var/www/html/xcache# docker-php-ext-enable xcache
root@18c07d3fc723:/var/www/html/xcache# php -i | grep -i xcache
Additional .ini files parsed => /usr/local/etc/php/conf.d/docker-php-ext-xcache.ini
    with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
    with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo
XCache
XCache Version => 3.2.0
xcache.coredump_directory => no value => no value
xcache.disable_on_crash => Off => Off
xcache.experimental => Off => Off
xcache.test => Off => Off
XCache Cacher
XCache Cacher Module => enabled
xcache.admin.enable_auth => On => On
xcache.allocator => bestfit => bestfit
xcache.cacher => On => On
xcache.count => 1 => 1
xcache.gc_interval => 0 => 0
xcache.mmap_path => /dev/zero => /dev/zero
xcache.readonly_protection => Off => Off
xcache.shm_scheme => mmap => mmap
xcache.size => 0 => 0
xcache.slots => 8K => 8K
xcache.stat => On => On
xcache.ttl => 0 => 0
xcache.var_allocator => bestfit => bestfit
xcache.var_count => 1 => 1
xcache.var_gc_interval => 120 => 120
xcache.var_maxttl => 0 => 0
xcache.var_namespace => no value => no value
xcache.var_namespace_mode => 0 => 0
xcache.var_size => 0 => 0
xcache.var_slots => 8K => 8K
xcache.var_ttl => 0 => 0
PWD => /var/www/html/xcache
_SERVER["PWD"] => /var/www/html/xcache
_ENV["PWD"] => /var/www/html/xcache

@tianon tianon mentioned this pull request Jan 7, 2016
@yosifkit
Copy link
Member

yosifkit commented Jan 7, 2016

LGTM

yosifkit added a commit that referenced this pull request Jan 7, 2016
Use "nm" to list actual symbols from the module to check for the "zend_extension_entry" symbol (fixes false positives like xcache)
@yosifkit yosifkit merged commit 4e1cb2b into docker-library:master Jan 7, 2016
@yosifkit yosifkit deleted the better-zend-check branch January 7, 2016 17:10
tianon added a commit to infosiftr/stackbrew that referenced this pull request Jan 7, 2016
- `docker`: alpine:3.3 (docker-library/docker#7)
- `drupal`: 8.0.2
- `java`: explicit `JAVA_HOME` (docker-library/openjdk#61)
- `php`: 5.5.31, 5.6.17, 7.0.2; fix edge case in `docker-php-ext-enable` (docker-library/php#172)
- `postgres`: 9.5.0; set `PGDATA` perms to `0700` (docker-library/postgres#110)
- `python`: add `alpine` variant for 3.5 (docker-library/python#74)
- `rabbitmq`: fix SSL bugs (docker-library/rabbitmq#55, docker-library/rabbitmq#56)
- `wordpress`: 4.4.1
RichardScothern pushed a commit to RichardScothern/official-images that referenced this pull request Jun 14, 2016
- `docker`: alpine:3.3 (docker-library/docker#7)
- `drupal`: 8.0.2
- `java`: explicit `JAVA_HOME` (docker-library/openjdk#61)
- `php`: 5.5.31, 5.6.17, 7.0.2; fix edge case in `docker-php-ext-enable` (docker-library/php#172)
- `postgres`: 9.5.0; set `PGDATA` perms to `0700` (docker-library/postgres#110)
- `python`: add `alpine` variant for 3.5 (docker-library/python#74)
- `rabbitmq`: fix SSL bugs (docker-library/rabbitmq#55, docker-library/rabbitmq#56)
- `wordpress`: 4.4.1
@vlastv
Copy link

vlastv commented Aug 30, 2016

"nm command not found" in alpine latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants