phalcon / cphalcon

High performance, full-stack PHP framework delivered as a C extension.
https://phalcon.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 1.96k forks source link

docker php:7-fpm-alpine install cphalcon-3.0.1 #12173

Closed cq-z closed 7 years ago

cq-z commented 8 years ago
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
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
**# _expr: syntax error
./configure: line 2563: test: =: unary operator expected
expr: syntax error
./configure: line 2570: test: =: unary operator expected
expr: syntax error
./configure: line 2577: test: =: unary operator expected_**
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -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-20151012
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.14.3 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable phalcon... yes, shared
checking whether HAVE_BUNDLED_PCRE is declared... yes
checking for ext/pcre/php_pcre.h... yes
checking whether HAVE_JSON is declared... yes
checking for ext/json/php_json.h... yes
checking for ld used by gcc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/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... 98304
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/x86_64-alpine-linux-musl/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
cq-z commented 8 years ago
expr: syntax error
./configure: line 2563: test: =: unary operator expected
expr: syntax error
./configure: line 2570: test: =: unary operator expected
expr: syntax error
./configure: line 2577: test: =: unary operator expected
sergeyklay commented 7 years ago

@cq-z Could you please try master branch?

sergeyklay commented 7 years ago

Also we need steps to reproduce issue (versions, console commands, etc)

cq-z commented 7 years ago

sorry, The previous version could not be found .it is notification . new version https://github.com/cq-z/docker-lnmp/tree/master/php70 command: docker build -t test ./php70 image

cq-z commented 7 years ago

The program can run no problem docker -v Docker version 17.04.0-ce-rc2, build 2f35d73

sergeyklay commented 7 years ago

@cq-z Could you please try again 3.1.x branch?

cq-z commented 7 years ago

download link:https://codeload.github.com/phalcon/cphalcon/tar.gz/3.1.x

Step 8/23 : RUN cd /home/cphalcon-3.1.x/build    && ./install     && echo "extension=phalcon.so" > /usr/local/etc/php/conf.d/phalcon.ini     && cd ../../ && rm -r ./cphalcon-3.1.x
 ---> Running in 0aa7627d3763
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
expr: syntax error
./configure: line 2563: test: =: unary operator expected
appending configuration tag "CXX" to libtool
make: Warning: File '/home/cphalcon-3.1.x/build/php7/64bits/phalcon.zep.c' has modification time 602 s in the future
mkdir .libs
 gcc -I. -I/home/cphalcon-3.1.x/build/php7/64bits -DPHP_ATOM_INC -I/home/cphalcon-3.1.x/build/php7/64bits/include -I/home/cphalcon-3.1.x/build/php7/64bits/main -I/home/cphalcon-3.1.x/build/php7/64bits -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 -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -fvisibility=hidden -c /home/cphalcon-3.1.x/build/php7/64bits/phalcon.zep.c  -fPIC -DPIC -o .libs/phalcon.o
In file included from /usr/local/include/php/main/php_network.h:126:0,
                 from /usr/local/include/php/ext/standard/file.h:26,
                 from /home/cphalcon-3.1.x/build/php7/64bits/phalcon.zep.c:187:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
  ^
cq-z commented 7 years ago

image

sergeyklay commented 7 years ago

What kind of Bash are you using? What is the version?

sergeyklay commented 7 years ago

@cq-z Also please provide expr version expr --version | head -1

cq-z commented 7 years ago

Your question is this? iterm2 Build 3.0.15

cq-z commented 7 years ago

it's docker bulid not find command expr . bash is bash bash-4.3#

cq-z commented 7 years ago

this is? bash-4.3# /usr/bin/expr --help BusyBox v1.24.2 (2017-01-18 14:13:46 GMT) multi-call binary.

sergeyklay commented 7 years ago

As you can see

expr: syntax error

this is expr bug inside container, not in the host system.

sergeyklay commented 7 years ago

For example

$ expr --version | head -1                                                                                                                                     
expr (GNU coreutils) 5.2.1                                                                                                                                                          
$ expr -- hello                                                                                                                                                
hello                                                                                                                                                                               
$ expr --version | head -1                                                                                                                            
expr (GNU sh-utils) 2.0                                                                                                                                                             
$ expr -- hello                                                                                                                                       
expr: syntax error
cq-z commented 7 years ago

it's docker bulid image .not find this cmd. find expr is /usr/bin/expr . but this result is running

bash-4.3# /usr/bin/expr --version
--version
sergeyklay commented 7 years ago

PHP's configure script uses expr. So it is PHP bug: https://bugs.php.net/bug.php?id=39835 (see last comment)

cq-z commented 7 years ago

think you.the yac also have this warning. Laruence say is It's ok。

cq-z commented 7 years ago

thank you much