zendtech / ZendOptimizerPlus

Other
914 stars 142 forks source link

Zend Optimizer 7.0.5 Build Error #213

Closed LukeMauldin closed 9 years ago

LukeMauldin commented 9 years ago

When building Zend Optimizer 7.0.5 with PHP 5.6 I get the error below. This is based on the Dockerfile below. A similar Dockerfile using the php-5.4-apache as the source does not give me the error.

Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
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 whether to enable Zend OPcache support...
yes, shared
checking for mprotect...
yes
checking for sysvipc shared memory support...
yes
checking for mmap() using MAP_ANON shared memory support...
yes
checking for mmap() using /dev/zero shared memory support...
yes
checking for mmap() using shm_open() shared memory support...
no
checking for mmap() using regular file shared memory support...
yes
checking "whether flock struct is linux ordered"...
"yes"
checking "whether flock struct is BSD ordered"...
"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 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
/bin/bash /root/ZendOptimizerPlus-7.0.5/libtool --mode=compile cc  -I. -I/root/ZendOptimizerPlus-7.0.5 -DPHP_ATOM_INC -I/root/ZendOptimizerPlus-7.0.5/include -I/root/ZendOptimizerPlus-7.0.5/main -I/root/ZendOptimizerPlus-7.0.5 -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 /root/ZendOptimizerPlus-7.0.5/ZendAccelerator.c -o ZendAccelerator.lo
mkdir .libs
cc -I. -I/root/ZendOptimizerPlus-7.0.5 -DPHP_ATOM_INC -I/root/ZendOptimizerPlus-7.0.5/include -I/root/ZendOptimizerPlus-7.0.5/main -I/root/ZendOptimizerPlus-7.0.5 -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 /root/ZendOptimizerPlus-7.0.5/ZendAccelerator.c  -fPIC -DPIC -o .libs/ZendAccelerator.o
/root/ZendOptimizerPlus-7.0.5/ZendAccelerator.c:39:35: fatal error: TSRM/tsrm_virtual_cwd.h: No such file or directory
 #include "TSRM/tsrm_virtual_cwd.h"

Dockerfile:


FROM php:5.6-apache

ENV DEBIAN_FRONTEND noninteractive

#Create and expose webiste directory
RUN mkdir -p /var/www/html/public
VOLUME ["/var/www/html"]

# Setup Apache and PHP
RUN     apt-get -o 'Acquire::CompressionTypes::Order::="gz"' update && \
    apt-get install -y --no-install-recommends \
    libmcrypt-dev \
    libbz2-dev \
    libpng12-dev && \
    docker-php-ext-install mcrypt bz2 gd mbstring zip pdo_mysql mysql mysqli pcntl bcmath && \
    apt-get purge --auto-remove -y libmcrypt-dev libbz2-dev libpng12-dev && \
    apt-get install -y --no-install-recommends libmcrypt4 libbz2-1.0 libpng12-0 && \
    a2enmod rewrite && \
    a2enmod expires 

# Copy config files
COPY config/apache.conf /etc/apache2/apache2.conf
COPY config/php.ini /usr/local/etc/php/php.ini

# Configure opcache
RUN     apt-get install --no-install-recommends unzip && \
    curl -L -o /root/opcache.zip -L https://github.com/zendtech/ZendOptimizerPlus/archive/v7.0.5.zip && \
    cd /root && \
    unzip opcache.zip && \
    cd /root/ZendOptimizerPlus-7.0.5 && \
    /usr/local/bin/phpize && \
    ./configure --with-php-config=/usr/local/bin/php-config && \
    make  && \
    make install && \
    cd /root && \
    rm -fr /root/ZendOptimizerPlus-7.0.5 && \
    rm -fr /root/opcache.zip

# Configure xdebug
RUN     curl -L -o /root/xdebug.tgz https://pecl.php.net/get/xdebug-2.3.2.tgz && \
    cd /root && \
    tar -zxvf xdebug.tgz && \
    cd /root/xdebug-2.3.2 && \
    /usr/local/bin/phpize && \
    ./configure --enable-xdebug --with-php-config=/usr/local/bin/php-config && \
    make  && \
    make install && \
    cd /root && \
    rm -fr /root/xdebug-2.3.2 && \
    rm -fr /root/xdebug.tgz
dstogov commented 9 years ago

php-5.6 uses the embedded opcache. This repo is for php vetrsions before 5.5.

On Mon, Jun 15, 2015 at 3:14 PM, LukeMauldin notifications@github.com wrote:

When building Zend Optimizer 7.0.5 with PHP 5.6 I get the error below. This is based on the Dockerfile below. A similar Dockerfile using the php-5.4-apache as the source does not give me the error.

Configuring for: PHP Api Version: 20131106 Zend Module Api No: 20131226 Zend Extension Api No: 220131226 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 whether to enable Zend OPcache support... yes, shared checking for mprotect... yes checking for sysvipc shared memory support... yes checking for mmap() using MAP_ANON shared memory support... yes checking for mmap() using /dev/zero shared memory support... yes checking for mmap() using shm_open() shared memory support... no checking for mmap() using regular file shared memory support... yes checking "whether flock struct is linux ordered"... "yes" checking "whether flock struct is BSD ordered"... "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 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 /bin/bash /root/ZendOptimizerPlus-7.0.5/libtool --mode=compile cc -I. -I/root/ZendOptimizerPlus-7.0.5 -DPHP_ATOM_INC -I/root/ZendOptimizerPlus-7.0.5/include -I/root/ZendOptimizerPlus-7.0.5/main -I/root/ZendOptimizerPlus-7.0.5 -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 /root/ZendOptimizerPlus-7.0.5/ZendAccelerator.c -o ZendAccelerator.lo mkdir .libs cc -I. -I/root/ZendOptimizerPlus-7.0.5 -DPHP_ATOM_INC -I/root/ZendOptimizerPlus-7.0.5/include -I/root/ZendOptimizerPlus-7.0.5/main -I/root/ZendOptimizerPlus-7.0.5 -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 /root/ZendOptimizerPlus-7.0.5/ZendAccelerator.c -fPIC -DPIC -o .libs/ZendAccelerator.o �[91m/root/ZendOptimizerPlus-7.0.5/ZendAccelerator.c:39:35: fatal error: TSRM/tsrm_virtual_cwd.h: No such file or directory

include "TSRM/tsrm_virtual_cwd.h"

Dockerfile:

FROM php:5.6-apache

ENV DEBIAN_FRONTEND noninteractive

Create and expose webiste directory

RUN mkdir -p /var/www/html/public VOLUME ["/var/www/html"]

Setup Apache and PHP

RUN apt-get -o 'Acquire::CompressionTypes::Order::="gz"' update && \ apt-get install -y --no-install-recommends \ libmcrypt-dev \ libbz2-dev \ libpng12-dev && \ docker-php-ext-install mcrypt bz2 gd mbstring zip pdo_mysql mysql mysqli pcntl bcmath && \ apt-get purge --auto-remove -y libmcrypt-dev libbz2-dev libpng12-dev && \ apt-get install -y --no-install-recommends libmcrypt4 libbz2-1.0 libpng12-0 && \ a2enmod rewrite && \ a2enmod expires

Copy config files

COPY config/apache.conf /etc/apache2/apache2.conf COPY config/php.ini /usr/local/etc/php/php.ini

Configure opcache

RUN apt-get install --no-install-recommends unzip && \ curl -L -o /root/opcache.zip -L https://github.com/zendtech/ZendOptimizerPlus/archive/v7.0.5.zip && \ cd /root && \ unzip opcache.zip && \ cd /root/ZendOptimizerPlus-7.0.5 && \ /usr/local/bin/phpize && \ ./configure --with-php-config=/usr/local/bin/php-config && \ make && \ make install && \ cd /root && \ rm -fr /root/ZendOptimizerPlus-7.0.5 && \ rm -fr /root/opcache.zip

Configure xdebug

RUN curl -L -o /root/xdebug.tgz https://pecl.php.net/get/xdebug-2.3.2.tgz && \ cd /root && \ tar -zxvf xdebug.tgz && \ cd /root/xdebug-2.3.2 && \ /usr/local/bin/phpize && \ ./configure --enable-xdebug --with-php-config=/usr/local/bin/php-config && \ make && \ make install && \ cd /root && \ rm -fr /root/xdebug-2.3.2 && \ rm -fr /root/xdebug.tgz

— Reply to this email directly or view it on GitHub https://github.com/zendtech/ZendOptimizerPlus/issues/213.

LukeMauldin commented 9 years ago

Thank you.