カテゴリー
Linux

APC をソースから make でコンパイルしてインストール!!!

まずは小手調べ。お手軽に PECL で APC をインストールするとこうなります♪

つぶさに見ていると、

  • ダウンロード
  • 解凍
  • コンパイル

といったことを連続して行なっているようです。きっと、それらを手動で行えば、ソースからコンパイルすることになると予想します。つまり、お手軽インストールをお手本に、手動インストールを勉強すればよいのです。そう考えると、大分気が楽になります♪

[root@localhost tmp]# pecl install apc
downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 bytes)
.....................................done: 171,591 bytes
55 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Enable internal debugging in APC [no] : 
Enable per request file info about files used from the APC cache [no] : 
Enable spin locks (EXPERIMENTAL) [no] : 
Enable memory protection (EXPERIMENTAL) [no] : 
Enable pthread mutexes (default) [no] : 
Enable pthread read/write locks (EXPERIMENTAL) [yes] : 
building in /var/tmp/pear-build-rootfMOpRH/APC-3.1.13
running: /var/tmp/APC/configure --enable-apc-debug=no --enable-apc-filehits=no --enable-apc-spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=no --enable-apc-pthreadrwlocks=yes
checking for egrep... 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 ANSI C... 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... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/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 whether to enable APC support... yes, shared
checking whether we should enable cache request file info... no
checking whether we should use mmap... yes
checking whether we should use semaphore locking instead of fcntl... no
checking whether we should use pthread mutex locking... no
checking whether we should use pthread read/write locking... yes
pthread rwlocks are supported!
checking whether the target compiler supports builtin atomics... no
configure: WARNING: Disabling pthread rwlocks, because of missing atomic operations
checking whether we should use spin locks... no
checking whether we should enable memory protection... no
checking for zend_set_lookup_function_hook... no
checking for sigaction... yes
checking for union semun... no
checking whether we should enable valgrind support... 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
yes
checking valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking for shm_open in -lrt... yes
checking whether to include code coverage symbols... no
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 recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
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) 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 libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc.c -o apc.lo
mkdir .libs
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc.c  -fPIC -DPIC -o .libs/apc.o
/var/tmp/APC/apc.c: In function 'apc_search_paths':
/var/tmp/APC/apc.c:416: warning: assignment discards qualifiers from pointer target type
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/php_apc.c -o php_apc.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/php_apc.c  -fPIC -DPIC -o .libs/php_apc.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_cache.c -o apc_cache.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_cache.c  -fPIC -DPIC -o .libs/apc_cache.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_compile.c -o apc_compile.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_compile.c  -fPIC -DPIC -o .libs/apc_compile.o
/var/tmp/APC/apc_compile.c:304: warning: 'hot' attribute directive ignored
/var/tmp/APC/apc_compile.c: In function 'my_copy_class_entry':
/var/tmp/APC/apc_compile.c:755: warning: assignment from incompatible pointer type
/var/tmp/APC/apc_compile.c: At top level:
/var/tmp/APC/apc_compile.c:952: warning: 'hot' attribute directive ignored
/var/tmp/APC/apc_compile.c: In function 'apc_copy_class_entry_for_execution':
/var/tmp/APC/apc_compile.c:1956: warning: assignment from incompatible pointer type
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_debug.c -o apc_debug.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_debug.c  -fPIC -DPIC -o .libs/apc_debug.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_fcntl.c -o apc_fcntl.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_fcntl.c  -fPIC -DPIC -o .libs/apc_fcntl.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_main.c -o apc_main.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_main.c  -fPIC -DPIC -o .libs/apc_main.o
/var/tmp/APC/apc_main.c: In function 'apc_compile_cache_entry':
/var/tmp/APC/apc_main.c:421: warning: assignment discards qualifiers from pointer target type
/var/tmp/APC/apc_main.c:452: warning: assignment discards qualifiers from pointer target type
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_mmap.c -o apc_mmap.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_mmap.c  -fPIC -DPIC -o .libs/apc_mmap.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_sem.c -o apc_sem.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_sem.c  -fPIC -DPIC -o .libs/apc_sem.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_shm.c -o apc_shm.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_shm.c  -fPIC -DPIC -o .libs/apc_shm.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_pthreadmutex.c -o apc_pthreadmutex.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_pthreadmutex.c  -fPIC -DPIC -o .libs/apc_pthreadmutex.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_pthreadrwlock.c -o apc_pthreadrwlock.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_pthreadrwlock.c  -fPIC -DPIC -o .libs/apc_pthreadrwlock.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_spin.c -o apc_spin.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_spin.c  -fPIC -DPIC -o .libs/apc_spin.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/pgsql_s_lock.c -o pgsql_s_lock.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/pgsql_s_lock.c  -fPIC -DPIC -o .libs/pgsql_s_lock.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_sma.c -o apc_sma.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_sma.c  -fPIC -DPIC -o .libs/apc_sma.o
/var/tmp/APC/apc_sma.c:180: warning: 'hot' attribute directive ignored
/var/tmp/APC/apc_sma.c:277: warning: 'hot' attribute directive ignored
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_stack.c -o apc_stack.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_stack.c  -fPIC -DPIC -o .libs/apc_stack.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_zend.c -o apc_zend.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_zend.c  -fPIC -DPIC -o .libs/apc_zend.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_rfc1867.c -o apc_rfc1867.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_rfc1867.c  -fPIC -DPIC -o .libs/apc_rfc1867.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_signal.c -o apc_signal.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_signal.c  -fPIC -DPIC -o .libs/apc_signal.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_pool.c -o apc_pool.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_pool.c  -fPIC -DPIC -o .libs/apc_pool.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_iterator.c -o apc_iterator.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_iterator.c  -fPIC -DPIC -o .libs/apc_iterator.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_bin.c -o apc_bin.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_bin.c  -fPIC -DPIC -o .libs/apc_bin.o
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=compile cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/APC/apc_string.c -o apc_string.lo
 cc -D_GNU_SOURCE -I. -I/var/tmp/APC -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/APC/apc_string.c  -fPIC -DPIC -o .libs/apc_string.o
/var/tmp/APC/apc_string.c: In function 'apc_new_interned_string':
/var/tmp/APC/apc_string.c:104: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=link cc -DPHP_ATOM_INC -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/include -I/var/tmp/pear-build-rootfMOpRH/APC-3.1.13/main -I/var/tmp/APC -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o apc.la -export-dynamic -avoid-version -prefer-pic -module -rpath /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/modules  apc.lo php_apc.lo apc_cache.lo apc_compile.lo apc_debug.lo apc_fcntl.lo apc_main.lo apc_mmap.lo apc_sem.lo apc_shm.lo apc_pthreadmutex.lo apc_pthreadrwlock.lo apc_spin.lo pgsql_s_lock.lo apc_sma.lo apc_stack.lo apc_zend.lo apc_rfc1867.lo apc_signal.lo apc_pool.lo apc_iterator.lo apc_bin.lo apc_string.lo -lrt
cc -shared  .libs/apc.o .libs/php_apc.o .libs/apc_cache.o .libs/apc_compile.o .libs/apc_debug.o .libs/apc_fcntl.o .libs/apc_main.o .libs/apc_mmap.o .libs/apc_sem.o .libs/apc_shm.o .libs/apc_pthreadmutex.o .libs/apc_pthreadrwlock.o .libs/apc_spin.o .libs/pgsql_s_lock.o .libs/apc_sma.o .libs/apc_stack.o .libs/apc_zend.o .libs/apc_rfc1867.o .libs/apc_signal.o .libs/apc_pool.o .libs/apc_iterator.o .libs/apc_bin.o .libs/apc_string.o  -lrt  -Wl,-soname -Wl,apc.so -o .libs/apc.so
creating apc.la
(cd .libs && rm -f apc.la && ln -s ../apc.la apc.la)
/bin/sh /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/libtool --mode=install cp ./apc.la /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/modules
cp ./.libs/apc.so /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/modules/apc.so
cp ./.libs/apc.lai /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/modules/apc.la
PATH="$PATH:/sbin" ldconfig -n /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /var/tmp/pear-build-rootfMOpRH/APC-3.1.13/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'.

running: make INSTALL_ROOT="/var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13" install
Installing shared extensions:     /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/lib/php/modules/
Installing header files:          /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/include/php/
running: find "/var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13" | xargs ls -dils
33083   4 drwxr-xr-x 3 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13
33148   4 drwxr-xr-x 4 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr
33152   4 drwxr-xr-x 3 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/include
33153   4 drwxr-xr-x 3 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/include/php
33154   4 drwxr-xr-x 3 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/include/php/ext
33155   4 drwxr-xr-x 2 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/include/php/ext/apc
33156   4 -rw-r--r-- 1 root root   3357  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/include/php/ext/apc/apc_serializer.h
33149   4 drwxr-xr-x 3 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/lib
33150   4 drwxr-xr-x 3 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/lib/php
33151   4 drwxr-xr-x 2 root root   4096  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/lib/php/modules
33147 640 -rwxr-xr-x 1 root root 649974  5月 21 21:05 /var/tmp/pear-build-rootfMOpRH/install-APC-3.1.13/usr/lib/php/modules/apc.so

Build process completed successfully
Installing '/usr/include/php/ext/apc/apc_serializer.h'
Installing '/usr/lib/php/modules/apc.so'
install ok: channel://pecl.php.net/APC-3.1.13
configuration option "php_ini" is not set to php.ini location
You should add "extension=apc.so" to php.ini
[root@localhost tmp]#

ふむふむ。では、ソースからインストールしたく思いますので、早速ですがアンインストールいたします♪

[root@localhost tmp]# pecl uninstall apc
Unable to remove "extension=apc.so" from php.ini
uninstall ok: channel://pecl.php.net/APC-3.1.13
[root@localhost tmp]#

インストールはあんなに複雑でしたのにたったの2行で終了です。。。あわれですね。

では気持ちを切り替えまして、APC をソースから make してインストールするとこうなります!というのを実践していきましょう。

 APC をソースをダウンロード

ソースをダウンロードする必要がありますね!次の本家サイトから、入手します。

[root@localhost tmp]# wget http://pecl.php.net/get/APC-3.1.13.tgz
--2013-05-21 21:21:51--  http://pecl.php.net/get/APC-3.1.13.tgz
pecl.php.net をDNSに問いあわせています... 76.75.200.106
pecl.php.net|76.75.200.106|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 171591 (168K) [application/octet-stream]
`APC-3.1.13.tgz' に保存中

100%[=====================================================>] 171,591     62.3K/s 時間 2.7s    

2013-05-21 21:21:54 (62.3 KB/s) - `APC-3.1.13.tgz' へ保存完了 [171591/171591]

[root@localhost tmp]#

解凍

tar.gz 形式です。普通に解凍いたします。あら、ひとつのファイルだけ、package.xml だけ外にこぼれていらっしゃいますけれども、大丈夫でしょうか。。。うん、気にせず進めましょう。

[root@localhost tmp]# tar zxvf APC-3.1.13.tgz 
package.xml
APC-3.1.13/tests/apc_001.phpt
APC-3.1.13/tests/apc_002.phpt
APC-3.1.13/tests/apc_003.phpt
APC-3.1.13/tests/apc_003b.phpt
APC-3.1.13/tests/apc_004.phpt
APC-3.1.13/tests/apc_005.phpt
APC-3.1.13/tests/apc_006.phpt
APC-3.1.13/tests/apc_007.phpt
APC-3.1.13/tests/apc_008.phpt
APC-3.1.13/tests/apc_009.phpt
APC-3.1.13/tests/apc_010.phpt
APC-3.1.13/tests/apc53_001.phpt
APC-3.1.13/tests/apc53_002.phpt
APC-3.1.13/tests/apc53_003.phpt
APC-3.1.13/tests/apc53_004.phpt
APC-3.1.13/tests/apc53_005.phpt
APC-3.1.13/tests/apc_bin_001.phpt
APC-3.1.13/tests/apc_bin_002-1.inc
APC-3.1.13/tests/apc_bin_002-2.inc
APC-3.1.13/tests/apc_bin_002.phpt
APC-3.1.13/tests/iterator_001.phpt
APC-3.1.13/tests/iterator_002.phpt
APC-3.1.13/tests/iterator_003.phpt
APC-3.1.13/tests/iterator_004.phpt
APC-3.1.13/tests/iterator_005.phpt
APC-3.1.13/tests/iterator_006.phpt
APC-3.1.13/tests/iterator_007.phpt
APC-3.1.13/tests/bug38779.phpt
APC-3.1.13/tests/bug61398.phpt
APC-3.1.13/tests/bug61398_2.phpt
APC-3.1.13/tests/bug62757.phpt
APC-3.1.13/tests/bug62765.phpt
APC-3.1.13/tests/bug62802.phpt
APC-3.1.13/tests/apc54_001.phpt
APC-3.1.13/tests/apc54_002.phpt
APC-3.1.13/tests/apc54_003.phpt
APC-3.1.13/tests/apc54_004.phpt
APC-3.1.13/tests/apc54_005.phpt
APC-3.1.13/tests/apc54_006.phpt
APC-3.1.13/tests/apc54_007.phpt
APC-3.1.13/tests/apc54_008.phpt
APC-3.1.13/tests/apc54_009.phpt
APC-3.1.13/tests/apc54_010.phpt
APC-3.1.13/tests/apc54_011.phpt
APC-3.1.13/tests/apc54_012.phpt
APC-3.1.13/tests/apc54_013.phpt
APC-3.1.13/tests/apc54_014.phpt
APC-3.1.13/tests/apc54_015.phpt
APC-3.1.13/tests/apc54_016.phpt
APC-3.1.13/tests/apc54_017.phpt
APC-3.1.13/tests/apc54_018.phpt
APC-3.1.13/tests/apc54_019.phpt
APC-3.1.13/tests/apc54_020.phpt
APC-3.1.13/tests/apc54_021.phpt
APC-3.1.13/tests/apc54_bug62699_2.phpt
APC-3.1.13/tests/apc54_bug62699.phpt
APC-3.1.13/tests/apc54_error_010_2.phpt
APC-3.1.13/tests/apc54_error_010.phpt
APC-3.1.13/tests/server_test.inc
APC-3.1.13/tests/php_5_3_ns.inc
APC-3.1.13/tests/skipif.inc
APC-3.1.13/tests/data/abc.data
APC-3.1.13/CHANGELOG
APC-3.1.13/INSTALL
APC-3.1.13/LICENSE
APC-3.1.13/NOTICE
APC-3.1.13/TODO
APC-3.1.13/TECHNOTES.txt
APC-3.1.13/apc.c
APC-3.1.13/apc.h
APC-3.1.13/apc_bin.c
APC-3.1.13/apc_bin.h
APC-3.1.13/apc_cache.c
APC-3.1.13/apc_cache.h
APC-3.1.13/apc_compile.c
APC-3.1.13/apc_compile.h
APC-3.1.13/apc_debug.c
APC-3.1.13/apc_debug.h
APC-3.1.13/apc_fcntl.c
APC-3.1.13/apc_fcntl.h
APC-3.1.13/apc_globals.h
APC-3.1.13/apc_lock.h
APC-3.1.13/apc_main.c
APC-3.1.13/apc_main.h
APC-3.1.13/apc_mmap.c
APC-3.1.13/apc_mmap.h
APC-3.1.13/apc_php.h
APC-3.1.13/apc_php_pcre.h
APC-3.1.13/apc_pthreadmutex.c
APC-3.1.13/apc_pthreadmutex.h
APC-3.1.13/apc_pthreadrwlock.c
APC-3.1.13/apc_pthreadrwlock.h
APC-3.1.13/apc_sem.c
APC-3.1.13/apc_sem.h
APC-3.1.13/apc_shm.c
APC-3.1.13/apc_shm.h
APC-3.1.13/apc_sma.c
APC-3.1.13/apc_sma.h
APC-3.1.13/apc_spin.c
APC-3.1.13/apc_spin.h
APC-3.1.13/apc_windows_srwlock_kernel.c
APC-3.1.13/apc_windows_srwlock_kernel.h
APC-3.1.13/apc_stack.c
APC-3.1.13/apc_stack.h
APC-3.1.13/apc_string.h
APC-3.1.13/apc_string.c
APC-3.1.13/apc_zend.c
APC-3.1.13/apc_zend.h
APC-3.1.13/apc_signal.c
APC-3.1.13/apc_signal.h
APC-3.1.13/apc_iterator.c
APC-3.1.13/apc_iterator.h
APC-3.1.13/apc_pool.c
APC-3.1.13/apc_pool.h
APC-3.1.13/config.m4
APC-3.1.13/config.w32
APC-3.1.13/php_apc.c
APC-3.1.13/php_apc.h
APC-3.1.13/pgsql_s_lock.c
APC-3.1.13/pgsql_s_lock.h
APC-3.1.13/apc_fcntl_win32.c
APC-3.1.13/apc_rfc1867.c
APC-3.1.13/apc_serializer.h
APC-3.1.13/apc.php
[root@localhost tmp]#

ソースファイルをコンパイル

解凍ディレクトリに移動して、なんかいろいろやります。意味は全くわかっておりません><。

  1. phpize
  2. ./configure
  3. make

と行っていきます。意味はわかっておりません><。まずは移動です。

[root@localhost tmp]# cd APC-3.1.13
[root@localhost APC-3.1.13]#

1.phpize

php という文字列があることから、コンパイルするときになんか PHP となかよくニャンニャンしてくださいね、という感じのコマンドだと思います。

[root@localhost APC-3.1.13]# phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
[root@localhost APC-3.1.13]#

2../configure

技術的な情報を求めてネットを徘徊しておりますと、たまにこのコマンドが目に入ります。そのたびにわたくし、「./」はなぜあるのでしょう?と思っています。といっても、外して試してみたりしませんけれどもね。今は最後まで通すことが先決です!

さて ./configure ですが、やたらとチェックしていらっしゃいます。そしてちらっと PECL でのインストールを見ますと、./configure にオプションが指定されております。

このことからおそらく、今の環境で make できるのか?そして指定されたオプションを受け入れて make できるのか?という、下調べ、準備体操、尖兵、斥候、のような役割をしているのではないでしょうか?うまくいきましたら、堂々と make が通ってゆくのです。

[root@localhost APC-3.1.13]# ./configure
checking for egrep... 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 ANSI C... 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... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/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 whether to enable APC support... yes, shared
checking whether we should enable cache request file info... no
checking whether we should use mmap... yes
checking whether we should use semaphore locking instead of fcntl... no
checking whether we should use pthread mutex locking... yes
pthread mutexs are supported!
checking whether we should use pthread read/write locking... no
checking whether the target compiler supports builtin atomics... no
checking whether we should use spin locks... no
checking whether we should enable memory protection... no
checking for zend_set_lookup_function_hook... no
checking for sigaction... yes
checking for union semun... no
checking whether we should enable valgrind support... 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
yes
checking valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking for shm_open in -lrt... yes
checking whether to include code coverage symbols... no
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 recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
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) 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 libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
[root@localhost APC-3.1.13]#

3.make

make がコンパイルだそうですけれども、ああ、ええ、なんかよくわからないことを行なってらっしゃいます。よくわかりませんが、最後の方の「Libraries have been installed in: /tmp/APC-3.1.13/modules」と「Don’t forget to run ‘make test’.」をおさえておけばよさそうです。

[root@localhost APC-3.1.13]# make
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc.c -o apc.lo 
mkdir .libs
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc.c  -fPIC -DPIC -o .libs/apc.o
/tmp/APC-3.1.13/apc.c: In function 'apc_search_paths':
/tmp/APC-3.1.13/apc.c:416: warning: assignment discards qualifiers from pointer target type
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/php_apc.c -o php_apc.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/php_apc.c  -fPIC -DPIC -o .libs/php_apc.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_cache.c -o apc_cache.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_cache.c  -fPIC -DPIC -o .libs/apc_cache.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_compile.c -o apc_compile.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_compile.c  -fPIC -DPIC -o .libs/apc_compile.o
/tmp/APC-3.1.13/apc_compile.c:304: warning: 'hot' attribute directive ignored
/tmp/APC-3.1.13/apc_compile.c: In function 'my_copy_class_entry':
/tmp/APC-3.1.13/apc_compile.c:755: warning: assignment from incompatible pointer type
/tmp/APC-3.1.13/apc_compile.c: At top level:
/tmp/APC-3.1.13/apc_compile.c:952: warning: 'hot' attribute directive ignored
/tmp/APC-3.1.13/apc_compile.c: In function 'apc_copy_class_entry_for_execution':
/tmp/APC-3.1.13/apc_compile.c:1956: warning: assignment from incompatible pointer type
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_debug.c -o apc_debug.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_debug.c  -fPIC -DPIC -o .libs/apc_debug.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_fcntl.c -o apc_fcntl.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_fcntl.c  -fPIC -DPIC -o .libs/apc_fcntl.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_main.c -o apc_main.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_main.c  -fPIC -DPIC -o .libs/apc_main.o
/tmp/APC-3.1.13/apc_main.c: In function 'apc_compile_cache_entry':
/tmp/APC-3.1.13/apc_main.c:421: warning: assignment discards qualifiers from pointer target type
/tmp/APC-3.1.13/apc_main.c:452: warning: assignment discards qualifiers from pointer target type
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_mmap.c -o apc_mmap.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_mmap.c  -fPIC -DPIC -o .libs/apc_mmap.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_sem.c -o apc_sem.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_sem.c  -fPIC -DPIC -o .libs/apc_sem.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_shm.c -o apc_shm.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_shm.c  -fPIC -DPIC -o .libs/apc_shm.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_pthreadmutex.c -o apc_pthreadmutex.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_pthreadmutex.c  -fPIC -DPIC -o .libs/apc_pthreadmutex.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_pthreadrwlock.c -o apc_pthreadrwlock.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_pthreadrwlock.c  -fPIC -DPIC -o .libs/apc_pthreadrwlock.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_spin.c -o apc_spin.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_spin.c  -fPIC -DPIC -o .libs/apc_spin.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/pgsql_s_lock.c -o pgsql_s_lock.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/pgsql_s_lock.c  -fPIC -DPIC -o .libs/pgsql_s_lock.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_sma.c -o apc_sma.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_sma.c  -fPIC -DPIC -o .libs/apc_sma.o
/tmp/APC-3.1.13/apc_sma.c:180: warning: 'hot' attribute directive ignored
/tmp/APC-3.1.13/apc_sma.c:277: warning: 'hot' attribute directive ignored
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_stack.c -o apc_stack.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_stack.c  -fPIC -DPIC -o .libs/apc_stack.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_zend.c -o apc_zend.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_zend.c  -fPIC -DPIC -o .libs/apc_zend.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_rfc1867.c -o apc_rfc1867.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_rfc1867.c  -fPIC -DPIC -o .libs/apc_rfc1867.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_signal.c -o apc_signal.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_signal.c  -fPIC -DPIC -o .libs/apc_signal.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_pool.c -o apc_pool.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_pool.c  -fPIC -DPIC -o .libs/apc_pool.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_iterator.c -o apc_iterator.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_iterator.c  -fPIC -DPIC -o .libs/apc_iterator.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_bin.c -o apc_bin.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_bin.c  -fPIC -DPIC -o .libs/apc_bin.o
/bin/sh /tmp/APC-3.1.13/libtool --mode=compile cc  -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/APC-3.1.13/apc_string.c -o apc_string.lo 
 cc -I. -I/tmp/APC-3.1.13 -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/APC-3.1.13/apc_string.c  -fPIC -DPIC -o .libs/apc_string.o
/tmp/APC-3.1.13/apc_string.c: In function 'apc_new_interned_string':
/tmp/APC-3.1.13/apc_string.c:104: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type
/bin/sh /tmp/APC-3.1.13/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/APC-3.1.13/include -I/tmp/APC-3.1.13/main -I/tmp/APC-3.1.13 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o apc.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/APC-3.1.13/modules  apc.lo php_apc.lo apc_cache.lo apc_compile.lo apc_debug.lo apc_fcntl.lo apc_main.lo apc_mmap.lo apc_sem.lo apc_shm.lo apc_pthreadmutex.lo apc_pthreadrwlock.lo apc_spin.lo pgsql_s_lock.lo apc_sma.lo apc_stack.lo apc_zend.lo apc_rfc1867.lo apc_signal.lo apc_pool.lo apc_iterator.lo apc_bin.lo apc_string.lo -lrt
cc -shared  .libs/apc.o .libs/php_apc.o .libs/apc_cache.o .libs/apc_compile.o .libs/apc_debug.o .libs/apc_fcntl.o .libs/apc_main.o .libs/apc_mmap.o .libs/apc_sem.o .libs/apc_shm.o .libs/apc_pthreadmutex.o .libs/apc_pthreadrwlock.o .libs/apc_spin.o .libs/pgsql_s_lock.o .libs/apc_sma.o .libs/apc_stack.o .libs/apc_zend.o .libs/apc_rfc1867.o .libs/apc_signal.o .libs/apc_pool.o .libs/apc_iterator.o .libs/apc_bin.o .libs/apc_string.o  -lrt  -Wl,-soname -Wl,apc.so -o .libs/apc.so
creating apc.la
(cd .libs && rm -f apc.la && ln -s ../apc.la apc.la)
/bin/sh /tmp/APC-3.1.13/libtool --mode=install cp ./apc.la /tmp/APC-3.1.13/modules
cp ./.libs/apc.so /tmp/APC-3.1.13/modules/apc.so
cp ./.libs/apc.lai /tmp/APC-3.1.13/modules/apc.la
PATH="$PATH:/sbin" ldconfig -n /tmp/APC-3.1.13/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/APC-3.1.13/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@localhost APC-3.1.13]#

ちなみに、インストールされたものを見てみましょう。「Libraries have been installed in: /tmp/APC-3.1.13/modules」とのことですのでこの場所を覗いてみればよろしいですね♪どれどれ♪

[root@localhost APC-3.1.13]# ll /tmp/APC-3.1.13/modules/
合計 648
-rw-r--r-- 1 root root    764  5月 21 21:31 apc.la
-rwxr-xr-x 1 root root 653140  5月 21 21:31 apc.so
[root@localhost APC-3.1.13]#

そして「Don’t forget to run ‘make test’.」とおっしゃっていらっしゃいますのでテストも行ってみます。

あ、不合格のテストがございますね。。。でも気にせず進めてみます。インストールは、失敗するかも知れませんね。

[root@localhost APC-3.1.13]# make test

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

=====================================================================
PHP         : /usr/bin/php 
PHP_SAPI    : cli
PHP_VERSION : 5.4.15
ZEND_VERSION: 2.4.0
PHP_OS      : Linux - Linux localhost.localdomain 2.6.18-348.4.1.el5 #1 SMP Tue Apr 16 16:02:56 EDT 2013 i686
INI actual  : /tmp/APC-3.1.13/tmp-php.ini
More .INIs  :  
CWD         : /tmp/APC-3.1.13
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2013-05-21 22:00:58
=====================================================================
PASS APC: classes with namespaces (php 5.3) [tests/apc53_001.phpt] 
PASS APC: global spaces (php 5.3) [tests/apc53_002.phpt] 
PASS APC: anonymous functions (php 5.3) [tests/apc53_003.phpt] 
PASS APC: closures (php 5.3) [tests/apc53_004.phpt] 
PASS APC: goto (php 5.3) [tests/apc53_005.phpt] 
PASS APC: bug #62398 (php 5.4) [tests/apc54_001.phpt] 
PASS APC: interned strings same method names (php 5.4 nts) [tests/apc54_002.phpt] 
FAIL APC: Bug #6219054_0Couldn't fetch DOMProcessingInstruction with APC and native obj (php 5.4 nts) [tests/apc54_003.phpt] 
FAIL APC: Bug #6245654_0Incorrect description of notice variation 1 (php 5.4 nts) [tests/apc54_004.phpt] 
PASS APC: Bug #62456c54_Incorrect description of notice variation 2 (php 5.4 nts) [tests/apc54_005.phpt] 
PASS APC: Bug #62419c54_RuntimeException throws fatal error if passing a previous exception to the ctor (php 5.4) [tests/apc54_006.phpt] 
PASS APC: bug #62302 apc.include_once_override=1 made everything crash [tests/apc54_007.phpt] 
FAIL APC: Bug #61912 Memory corruption in ext/dom (php 5.4) [tests/apc54_008.phpt] 
FAIL APC: Bug #61824 apc produces strange notice (php 5.4) [tests/apc54_009.phpt] 
PASS APC: Bug #61515 Cached script shows different result from uncached (php 5.4) [tests/apc54_010.phpt] 
PASS APC: Bug #61219c54_method not found on 2nd request (php 5.4) [tests/apc54_011.phpt] 
PASS APC: Bug #61164 Crash with $_SERVER and ?: operator (php 5.4) [tests/apc54_012.phpt] 
PASS APC: Closures basic test [tests/apc54_013.phpt] 
PASS APC: Bug #61742 preload_path does not work due to incorrect string length (variant 1) (php 5.4) [tests/apc54_014.phpt] 
PASS APC: Test parent class properties in child class (php 5.4) [tests/apc54_015.phpt] 
PASS APC: Test trait properties in using class (simple) (php 5.4) [tests/apc54_016.phpt] 
PASS APC: Test use trait properties in a class and its parent (php 5.4) [tests/apc54_017.phpt] 
PASS APC: Bug #59938 APCIterator fails with large user cache [tests/apc54_018.phpt] 
PASS APC: Bug #59907c54_Issue with custom stream wrapper, include and APC [tests/apc54_019.phpt] 
PASS APC: APCIterater basic test on file (php 5.4) [tests/apc54_020.phpt] 
PASS APC: APCIterator file + apc_delete_file() (php 5.4) [tests/apc54_021.phpt] 
PASS APC: Bug #62699 Wrong behavior with traits [tests/apc54_bug62699.phpt] 
PASS APC: Bug #62699 Wrong behavior with traits (variant 2) [tests/apc54_bug62699_2.phpt] 
FAIL Trying to exclude trait method multiple times (origin Zend/tests/traits/error_010.phpt) [tests/apc54_error_010.phpt] 
FAIL Exclude trait method [tests/apc54_error_010_2.phpt] 
PASS APC: apc_store/fetch with strings [tests/apc_001.phpt] 
PASS APC: apc_store/fetch with objects [tests/apc_002.phpt] 
SKIP APC: apc_store/fetch with objects (php pre-5.3) [tests/apc_003.phpt] 
PASS APC: apc_store/fetch with objects (php 5.3) [tests/apc_003b.phpt] 
PASS APC: apc_store/fetch with bools [tests/apc_004.phpt] 
PASS APC: apc_store/fetch with arrays of objects [tests/apc_005.phpt] 
PASS APC: apc_store/fetch reference test [tests/apc_006.phpt] 
PASS APC: apc_inc/apc_dec test [tests/apc_007.phpt] 
PASS APC: apc_cas test [tests/apc_008.phpt] 
PASS APC: apc_delete_file test [tests/apc_009.phpt] 
PASS APC: apc_store/fetch/add with array of key/value pairs. [tests/apc_010.phpt] 
PASS APC: bindump user cache [tests/apc_bin_001.phpt] 
PASS APC: bindump file cache part 1 [tests/apc_bin_002.phpt] 
PASS Bug #61398 APC fails to find class methods on user stream wrappers [tests/bug38779.phpt] 
PASS Bug #61398 APC fails to find class methods (based on bug #38779) [tests/bug61398.phpt] 
PASS Bug #61398 APC fails to find class methods (based on ext/standard/tests/file/fopencookie.phpt) [tests/bug61398_2.phpt] 
PASS Bug #62757 (php-fpm carshed when used apc_bin_dumpfile with apc.serializer) [tests/bug62757.phpt] 
PASS Bug #62765 (apc_bin_dumpfile report Fatal error when there is "goto" in function) [tests/bug62765.phpt] 
PASS Bug #62802 (Crash when use apc_bin_dump/load) [tests/bug62802.phpt] 
PASS APC: APCIterator general [tests/iterator_001.phpt] 
PASS APC: APCIterator regex [tests/iterator_002.phpt] 
PASS APC: APCIterator chunk size [tests/iterator_003.phpt] 
PASS APC: APCIterator regex & chunk size & list [tests/iterator_004.phpt] 
PASS APC: APCIterator delete [tests/iterator_005.phpt] 
PASS APC: APCIterator formats [tests/iterator_006.phpt] 
PASS APC: APCIterator Overwriting the ctor [tests/iterator_007.phpt] 
=====================================================================
TIME END 2013-05-21 22:02:29

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   30
---------------------------------------------------------------------

Number of tests :   56                55
Tests skipped   :    1 (  1.8%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    6 ( 10.7%) ( 10.9%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   49 ( 87.5%) ( 89.1%)
---------------------------------------------------------------------
Time taken      :   91 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
APC: Bug #62190	Couldn't fetch DOMProcessingInstruction with APC and native obj (php 5.4 nts) [tests/apc54_003.phpt]
APC: Bug #62456	Incorrect description of notice variation 1 (php 5.4 nts) [tests/apc54_004.phpt]
APC: Bug #61912 Memory corruption in ext/dom (php 5.4) [tests/apc54_008.phpt]
APC: Bug #61824 apc produces strange notice (php 5.4) [tests/apc54_009.phpt]
Trying to exclude trait method multiple times (origin Zend/tests/traits/error_010.phpt) [tests/apc54_error_010.phpt]
Exclude trait method [tests/apc54_error_010_2.phpt]
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.	You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: n
[root@localhost APC-3.1.13]#

ソースからコンパイルした APC をインストール!

make コマンドでインストールです。あっさりしたものですね。先ほどテストに不合格のものがあっても、インストールは成功しました。となりますと、動かないかもしれませんね。

[root@localhost APC-3.1.13]# make install
Installing shared extensions:     /usr/lib/php/modules/
Installing header files:          /usr/include/php/
[root@localhost APC-3.1.13]#

ともあれ、インストールの確認をしてみましょう。上記の2つの場所に、コンパイルした2つのファイルがきっとあります。

apc.so は /use/lib/php/modules/ にありました。ところが、/usr/include/php/ にはそれっぽいものがありません。ですが、日付が1つだけ新しいことから、ここでしょう!進んで行きまして最奥を調べてみますと、、、あれれ。apc.la ではありませんね。apc_serializer.z、、、一体何があったのでしょうか?

謎です。ですけれども、ここでまた PECL でのインストールを盗み見ますと、同じファイル「Installing ‘/usr/include/php/ext/apc/apc_serializer.h’」と「Installing ‘/usr/lib/php/modules/apc.so’」とがインストールされておりますので大丈夫でしょう。

[root@localhost APC-3.1.13]# ll /usr/lib/php/modules/
合計 5520
-rwxr-xr-x 1 root root  653140  5月 21 22:10 apc.so
-rwxr-xr-x 1 root root   65416  5月  9 16:14 curl.so
-rwxr-xr-x 1 root root 2706752  5月  9 16:14 fileinfo.so
-rwxr-xr-x 1 root root  318352  5月  9 16:14 gd.so
-rwxr-xr-x 1 root root   36504  5月  9 16:14 json.so
-rwxr-xr-x 1 root root 1169872  5月  9 16:14 mbstring.so
-rwxr-xr-x 1 root root   42744  5月  9 16:14 mysql.so
-rwxr-xr-x 1 root root  116820  5月  9 16:14 mysqli.so
-rwxr-xr-x 1 root root   89824  5月  9 16:14 pdo.so
-rwxr-xr-x 1 root root   25612  5月  9 16:14 pdo_mysql.so
-rwxr-xr-x 1 root root   21324  5月  9 16:14 pdo_sqlite.so
-rwxr-xr-x 1 root root  260804  5月  9 16:14 phar.so
-rwxr-xr-x 1 root root   89480  5月  9 16:14 zip.so
[root@localhost APC-3.1.13]# ll /usr/include/php/
合計 24
drwxr-xr-x  2 root root 4096  5月  9 21:32 TSRM
drwxr-xr-x  2 root root 4096  5月  9 21:32 Zend
drwxr-xr-x 22 root root 4096  5月 21 21:05 ext
drwxr-xr-x  2 root root 4096  5月  9 16:13 include
drwxr-xr-x  3 root root 4096  5月  9 21:32 main
drwxr-xr-x  4 root root 4096  5月  9 16:13 sapi
[root@localhost APC-3.1.13]# ll /usr/include/php/ext/
apc/      ereg/     hash/     libxml/   mysqlnd/  session/  standard/ 
date/     filter/   iconv/    mbstring/ pcre/     sockets/  xml/      
dom/      gd/       json/     mysqli/   pdo/      spl/      
[root@localhost APC-3.1.13]# ll /usr/include/php/ext/apc/
合計 4
-rw-r--r-- 1 root root 3357  5月 21 22:10 apc_serializer.h
[root@localhost APC-3.1.13]#

ソースからインストールした APC の設定!動作確認ですっ!

make test に失敗しましたけれども、動くかどうか確認してみましょう。そのためにはまず、PHP の設定です。php.ini に記述しても良いのですけれども、yum でインストールしたときのやり方を採用いたします。つまり、/etc/php.d/ に設定ファイルを作成し、自動的に読み込んでいただきます。

実は、事前に yum でインストールした時の設定ファイルをバックアップしておりまして、これを使ってみます。

「/etc/php.d/apc.ini」ファイルとして置き、内容は次です。

; Enable apc extension module
extension = apc.so

; Options for the APC module version >= 3.1.3
; See http://www.php.net/manual/en/apc.configuration.php

; This can be set to enable the APC opcode cache
; Don't set this option if another opcode cache is enabled
apc.enable_opcode_cache=1

; This can be set to 0 to disable APC. 
;apc.enabled=1

; The size of each shared memory segment, with M/G suffixe
apc.shm_size=64M

; The shared memory size reserved for strings, with M/G suffixe
apc.shm_strings_buffer=8M

; A "hint" about the number of distinct source files that will be included or 
; requested on your web server. Set to zero or omit if you are not sure;
;apc.num_files_hint=1000

; Just like num_files_hint, a "hint" about the number of distinct user cache
; variables to store.  Set to zero or omit if you are not sure;
;apc.user_entries_hint=4096

; The number of seconds a cache entry is allowed to idle in a slot in case this
; cache entry slot is needed by another entry.
;apc.ttl=0

; use the SAPI request start time for TTL
;apc.use_request_time=1

; The number of seconds a user cache entry is allowed to idle in a slot in case
; this cache entry slot is needed by another entry.
;apc.user_ttl=0

; The number of seconds that a cache entry may remain on the garbage-collection list. 
;apc.gc_ttl=3600

; On by default, but can be set to off and used in conjunction with positive
; apc.filters so that files are only cached if matched by a positive filter.
;apc.cache_by_default=1

; A comma-separated list of POSIX extended regular expressions.
;apc.filters=

; The mktemp-style file_mask to pass to the mmap module 
apc.mmap_file_mask=/tmp/apc.XXXXXX

; This file_update_protection setting puts a delay on caching brand new files.
;apc.file_update_protection=2

; Setting this enables APC for the CLI version of PHP (Mostly for testing and debugging).
;apc.enable_cli=0

; Prevents large files from being cached
;apc.max_file_size=1M

; Whether to stat the main script file and the fullpath includes.
;apc.stat=1

; Vertification with ctime will avoid problems caused by programs such as svn or rsync by making 
; sure inodes have not changed since the last stat. APC will normally only check mtime.
;apc.stat_ctime=0

; If on, then relative paths are canonicalized in no-stat mode.
; If set, then files included via stream wrappers can not be cached
; as realpath() does not support stream wrappers.
;apc.canonicalize=1

; With write_lock enabled, only one process at a time will try to compile an 
; uncached script while the other processes will run uncached
;apc.write_lock=1

; Logs any scripts that were automatically excluded from being cached due to early/late binding issues.
;apc.report_autofilter=0

; RFC1867 File Upload Progress hook handler
;apc.rfc1867=0
;apc.rfc1867_prefix =upload_
;apc.rfc1867_name=APC_UPLOAD_PROGRESS
;apc.rfc1867_freq=0
;apc.rfc1867_ttl=3600

; Enables APC handling of signals, such as SIGSEGV, that write core files when signaled. 
; APC will attempt to unmap the shared memory segment in order to exclude it from the core file
;apc.coredump_unmap=0

; Records a md5 hash of files. 
;apc.file_md5=0

; not documented
;apc.preload_path=

上手に読み込んでいただけるでしょうか。確認してみます。あ、大丈夫ですね。設定ファイルで未記入の項目も、デフォルトの値が表示されています。

[root@localhost tmp]# php -i | grep apc
Additional .ini files parsed => /etc/php.d/apc.ini,
apc
MMAP File Mask => /tmp/apc.XXXXXX
apc.cache_by_default => On => On
apc.canonicalize => On => On
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On
apc.file_md5 => Off => Off
apc.file_update_protection => 2 => 2
apc.filters => no value => no value
apc.gc_ttl => 3600 => 3600
apc.include_once_override => Off => Off
apc.lazy_classes => Off => Off
apc.lazy_functions => Off => Off
apc.max_file_size => 1M => 1M
apc.mmap_file_mask => /tmp/apc.XXXXXX => /tmp/apc.XXXXXX
apc.num_files_hint => 1000 => 1000
apc.preload_path => no value => no value
apc.report_autofilter => Off => Off
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS
apc.rfc1867_prefix => upload_ => upload_
apc.rfc1867_ttl => 3600 => 3600
apc.serializer => default => default
apc.shm_segments => 1 => 1
apc.shm_size => 64M => 64M
apc.shm_strings_buffer => 8M => 8M
apc.slam_defense => On => On
apc.stat => On => On
apc.stat_ctime => Off => Off
apc.ttl => 0 => 0
apc.use_request_time => On => On
apc.user_entries_hint => 4096 => 4096
apc.user_ttl => 0 => 0
apc.write_lock => On => On
[root@localhost tmp]#

最後に、Apache を再起動してインストールは完了です。

[root@localhost tmp]# /etc/init.d/httpd restart
httpd を停止中:                                            [  OK  ]
httpd を起動中:                                            [  OK  ]
[root@localhost tmp]#

果たして動くのか?ソースからコンパイルした APC の動作確認!!!

なんといっても、make test に不合格項目がございますからね。。。ここまできて実は動かないなんてオチもありえます。確かめてみましょう。

さて、この環境には WordPress を入れています。しばらく適当にいじってみて、APC のキャッシュ状況を確認します。そのためのツールが用意されていますが、、、えっとどこに、、、あ、ありました。探すときは、以前に書きました次の投稿が参考になりました。

最初にダウンロードしたファイルを解凍して APC-3.1.13 ディレクトリにたくさんのファイルが展開されましたが、その中にありました!apc.php です。これを Apache のドキュメントルート配下に置きまして、ブラウザからアクセスします。。。どうかな?おー、OK です♪

スクリーンショット 2013-05-21 23.01.12.png

最後に、ソースからコンパイルした APC をアンインストールします。。。

最後に潜んでいやがりましたよ><。問題点が。アンインストールのコマンドを受け付けていただけません!

[root@localhost APC-3.1.13]# make uninstall
make: *** ターゲット `uninstall' を make するルールがありません.  中止.
[root@localhost APC-3.1.13]#

インストールはできても、アンインストールはできない。

これでは、いけませんね。

ここでインストールを思い出してみます。なんか裏でいろいろやっていたかもしれませんが、実際には2つのファイルを置いただけです。そして、apc.ini を作って置いただけです。

この逆を行えばよさそうですね。

削除するべきなのは次の3つのファイルです。

  • /usr/include/php/ext/apc/apc_serializer.h
  • /usr/lib/php/modules/apc.so
  • /etc/php.d/apc.ini

いきなり削除しますのは怖いですので、ファイルを移動して APC がオフになることを確認します。3つのファイルはそれから削除すればよいです。

[root@localhost APC-3.1.13]# mv /usr/include/php/ext/apc/apc_serializer.h /tmp/apc_serializer.h
[root@localhost APC-3.1.13]# mv /usr/lib/php/modules/apc.so /tmp/apc.so
[root@localhost APC-3.1.13]# mv /etc/php.d/apc.ini /tmp/apc.ini
[root@localhost APC-3.1.13]#

そして Apache を再起動です♪

先ほどキャッシュ状況を把握するのに見た apc.php にアクセスしてみますと無慈悲に「No cache info available. APC does not appear to be running.」とのメッセージのみです。また、コマンドで確認してみても、APC が無効になっていることがわかります。

[root@localhost APC-3.1.13]# php -i | grep apc
[root@localhost APC-3.1.13]#

以上で、APC をソースからインストール、動作確認、アンインストールができることが実感できました♪

補足

  • pear list -a でインストールされた PEAR を表示しても、ソースからコンパイルしてインストールした APC は表示されない
  • PECL でインストールした APC をアンインストールすると、/usr/lib/php/modules/ から apc.so が削除され、/usr/include/php/ext/apc/ から apc_serializer.h が削除される。/usr/include/php/ext/apc/ ディレクトリは削除されない。
  • よって、ソースからコンパイルしてインストールした APC をアンインストールするときは、apc.so と apc_serializer.h を削除するだけでよい。ディレクトリは削除しなくてよい。

おわりに

予想通り、やってみればなあんだ!難しくないです!です。そもそもなぜソースからのインストールをやってみようかと思ったかといいますと、インストールされる場所を制御する必要に迫られたからなのです。

今回のインストール実践では、インストールするディレクトリを指定しませんでした。これは、単純に指定する方法がわからなかったからです。ですけれども、全体の流れは把握いたしましたので、きっと大きな苦労なしに、指定できるようになると思います。

きっと ./configure のオプションで、インストール先が指定できると思うのです!

最後に、PECL でのインストールに加えて、次のページが参考になりました。必要なコマンドをポイントを絞ってご紹介されているので、大変助かりました♪ありがとうございます!

以上です。

「APC をソースから make でコンパイルしてインストール!!!」への1件の返信

コメントを残す