"zephir_parser extension not loaded....." problem appeared when I try to zephir build

my English is so poor.......

I have install the zephir following the Tutorial (on http://docs.zephir-lang.com/en/latest/tutorial.html). But when I try to excute "zephir build",a problem appeared below:

$ zephir build

zephir_parser extension not loaded, compiling it

re2c: error: cannot open scanner.c

make: *** No rule to make target `clean'.  Stop.

Preparing for parser compilation...

configure: error: Cannot find php-config. Please use --with-php-config=PATH

Compiling the parser...

make: *** No targets specified and no makefile found.  Stop.



PHP Warning:  copy(modules/zephir_parser.so): failed to open stream: No such file or directory in

/home/gaoliang/softSRC/zephir-master/Library/Compiler.php on line 271


Warning: copy(modules/zephir_parser.so): failed to open stream: No such file or directory in

/home/gaoliang/softSRC/zephir-master/Library/Compiler.php on line 271

Zephir\Exception: The zephir parser extension could not be found or compiled!

Hoping someone could help me or give a suggestion to solve the probrom.Thanks very much!

Additional Comments:

1.the requirements has checked OK:

  gcc >= 4.x/clang >= 3.x

  re2c 0.13 or later

  gnu make 3.81 or later

  autoconf 2.31 or later

  automake 1.14 or later

  libpcre3

2.PHP installed at:

$ which php

/usr/bin/php

$ ls -l  /usr/bin/php

lrwxrwxrwx 1 root root 22  1月 31 09:56 /usr/bin/php -> /usr/local/php/bin/php*

First you need install Zephir.

$ git clone [email protected]:phalcon/zephir.git
$ cd zephir
$ sudo ./install -c


88
edited Aug '16

I have same issue, while Zephir is installed: $ zephir help Zephir version 0.9.4a-dev-121e9b4bf1 ...

$ zephir build zephirparser extension not loaded, compiling it ./buildlinux.sh: regel 9: re2c: opdracht niet gevonden error: re2c is not installed Preparing for parser compilation... configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. Compiling the parser... make: * Er is geen regel om doel '/root/zephir/parser/parser/parser.c' te maken, nodig voor 'parser/parser.lo'. Gestopt. make: * Wachten op onvoltooide taken...

mkdir .libs gcc -I. -I/root/zephir/parser -DPHPATOMINC -I/root/zephir/parser/include -I/root/zephir/parser/main -I/root/zephir/parser -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 -DHAVECONFIGH -g -O2 -c /root/zephir/parser/zephirparser.c -fPIC -DPIC -o .libs/zephirparser.o

Warning: copy(modules/zephir_parser.so): failed to open stream: No such file or directory in /root/zephir/Library/Compiler.php on line 280 Zephir\Exception: The zephir parser extension could not be found or compiled!

modules/zephir_parser.so just is not in the directory...

I'm using CentOS 7 with cpanel / php5.6

error: re2c is not installed

Have you installed re2c?

I have same issue, while Zephir is installed: $ zephir help Zephir version 0.9.4a-dev-121e9b4bf1 ...

$ zephir build zephirparser extension not loaded, compiling it ./buildlinux.sh: regel 9: re2c: opdracht niet gevonden error: re2c is not installed Preparing for parser compilation... configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. Compiling the parser... make: * Er is geen regel om doel '/root/zephir/parser/parser/parser.c' te maken, nodig voor 'parser/parser.lo'. Gestopt. make: * Wachten op onvoltooide taken...

mkdir .libs gcc -I. -I/root/zephir/parser -DPHPATOMINC -I/root/zephir/parser/include -I/root/zephir/parser/main -I/root/zephir/parser -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 -DHAVECONFIGH -g -O2 -c /root/zephir/parser/zephirparser.c -fPIC -DPIC -o .libs/zephirparser.o

Warning: copy(modules/zephir_parser.so): failed to open stream: No such file or directory in /root/zephir/Library/Compiler.php on line 280 Zephir\Exception: The zephir parser extension could not be found or compiled!

modules/zephir_parser.so just is not in the directory...

I'm using CentOS 7 with cpanel / php5.6



88

I did now install re2c. But before on other server I had it working without re2c just fine. Still installing the normal way didn't work:

composer global require phalcon/zephir cd /root/.composer/vendor/phalcon/zephir ./install -c

> zephir build zephirparser extension not loaded, compiling it sh: ./buildlinux.sh: Toegang geweigerd Preparing for parser compilation... Compiling the parser... make: * * * Er is geen regel om doel '/root/.composer/vendor/phalcon/zephir/parser/parser/parser.c' te maken, nodig voor 'parser/parser.lo'. Gestopt. make: * * * Wachten op onvoltooide taken... mkdir .libs gcc -I. -I/root/.composer/vendor/phalcon/zephir/parser -DPHPATOMINC -I/root/.composer/vendor/phalcon/zephir/parser/include -I/root/.composer/vendor/phalcon/zephir/parser/main -I/root/.composer/vendor/phalcon/zephir/parser -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 -DHAVECONFIGH -g -O2 -c /root/.composer/vendor/phalcon/zephir/parser/zephirparser.c -fPIC -DPIC -o .libs/zephirparser.o Warning: copy(modules/zephir_parser.so): failed to open stream: No such file or directory in /root/.composer/vendor/phalcon/zephir/Library/Compiler.php on line 280 Zephir\Exception: The zephir parser extension could not be found or compiled!

I now copied the install from other working server to this one and got it working ok. Just can't discover why the regular install does not work, except that some files are missing in parser/modules/...



88
edited Aug '16

Coping the Zephir 9.3 install from other server and then doing a

composer update

worked fine now: I have 9.4 up and running. Directly installing 9.4 did still not work.

$ zephir fullclean # note here
$ zephir build
edited Sep '16
$ git clone https://github.com/phalcon/zephir
Cloning into 'zephir'...
remote: Counting objects: 29795, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 29795 (delta 2), reused 0 (delta 0), pack-reused 29787
Receiving objects: 100% (29795/29795), 15.36 MiB | 1.92 MiB/s, done.
Resolving deltas: 100% (22167/22167), done.
Checking connectivity... done.

$ cd zephir && ./install -c

$ zephir fullclean
[sudo] password for izman: 
sudo: phpize: command not found
./clean: 11: ./clean: phpize: not found


$ zephir build
zephir_parser extension not loaded, compiling it
Parser statistics: 127 terminals, 99 nonterminals, 459 rules
                   947 states, 0 parser table entries, 0 conflicts
Parser statistics: 127 terminals, 99 nonterminals, 459 rules
                   947 states, 0 parser table entries, 0 conflicts
make: *** No rule to make target 'clean'.  Stop.
Preparing for parser compilation...
sh: 1: phpize: not found
sh: 1: ./configure: not found
Compiling the parser...
make: *** No targets specified and no makefile found.  Stop.


PHP Warning:  copy(modules/zephir_parser.so): failed to open stream: No such file or directory in /home/izman/zephir/Library/Compiler.php on line 282
PHP Stack trace:
PHP   1. {main}() /home/izman/zephir/compiler.php:0
PHP   2. Zephir\Bootstrap::boot() /home/izman/zephir/compiler.php:21
PHP   3. Zephir\Commands\CommandAbstract->execute() /home/izman/zephir/Library/Bootstrap.php:200
PHP   4. Zephir\Compiler->build() /home/izman/zephir/Library/Commands/CommandAbstract.php:108
PHP   5. Zephir\Compiler->install() /home/izman/zephir/Library/Compiler.php:1418
PHP   6. Zephir\Compiler->compile() /home/izman/zephir/Library/Compiler.php:1334
PHP   7. Zephir\Compiler->generate() /home/izman/zephir/Library/Compiler.php:1196
PHP   8. Zephir\Compiler->recursivePreCompile() /home/izman/zephir/Library/Compiler.php:967
PHP   9. Zephir\Compiler->preCompile() /home/izman/zephir/Library/Compiler.php:372
PHP  10. Zephir\Compiler->compileParser() /home/izman/zephir/Library/Compiler.php:308
PHP  11. copy() /home/izman/zephir/Library/Compiler.php:282
Zephir\Exception: The zephir parser extension could not be found or compiled!

$ zephir help

 _____              __    _
/__  /  ___  ____  / /_  (_)____
  / /  / _ \/ __ \/ __ \/ / ___/
 / /__/  __/ /_/ / / / / / /
/____/\___/ .___/_/ /_/_/_/
         /_/

Zephir version 0.9.4a-dev-1e1c234ef0