php-to-c-extension
php-to-c-extension copied to clipboard
Install Failed
hi tried to clone this repo then run composer install and follow example php build_extensions.php Dummy.php but there a error
Installing zephir...
You need to run this command from the top level of the working tree.
sh: autogen.sh: No such file or directory
./install-json: line 5: ./configure: No such fie or directory
make: *** No targets specified and no makefile found. Stop.
./install: line 11: re2c: command not found
error: re2c is not installed
Error: PHP Parser Error: Syntax error, unexpected '<', expecting T_STRING on line 3
- environment Ubuntu
re2c is not installed
Yo have to install re2c
@sergeyklay thanks for notice :) , several error still append like this https://gitlab.com/renlight10/phpc/builds/8745147
Can't exec "aclocal": No such file or directory
sudo apt-get install automake
Try installing automate and the issue should be solved.
Oops I mean automake:)
thanks, automake resolve aclocal but build keep failed https://gitlab.com/renlight10/phpc/builds/8765516
is there any missing dependency in ci ?
# Select image from https://hub.docker.com/_/php/
image: php:5.6
before_script:
# Install git, the php image doesn't have installed
- apt-get update -yqq
- apt-get install sudo -yqq
- apt-get install zip -yqq
- apt-get install unzip -yqq
- apt-get install automake -yqq
- apt-get install git -yqq
- apt-get install build-essential -yqq
- apt-get install re2c -yqq
- apt-get install libpcre3-dev -yqq
# Install composer
- curl -sS https://getcomposer.org/installer | php
# Install all project dependencies
- php composer.phar install
test:
script:
- php build_extensions.php Dummy.php
- php -dextension=dummy.so test.php
Did php install properly?
To install Zephir, please follow these steps: https://docs.zephir-lang.com/en/latest/install.html#prerequisites
Getting the same error:
Lucass-MBP:PHP lucasmaliszewski$ brew install re2c
Warning: re2c 1.0.1 is already installed
Lucass-MBP:PHP lucasmaliszewski$ php php-to-c-extension/build_extensions.php Project/
Installing zephir...
**sh: autogen.sh: No such file or directory**
./install-json: line 5: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
error: re2c is not installed
Error: PHP Parser Error: Syntax error, unexpected '<', expecting T_STRING on line 3
Lucass-MBP:PHP lucasmaliszewski$
Also:
Lucass-MBP:PHP lucasmaliszewski$ brew install automake
Warning: automake 1.15.1 is already installed
Lucass-MBP:PHP lucasmaliszewski$ brew install make
Warning: make 4.2.1_1 is already installed
Lucass-MBP:PHP lucasmaliszewski$
And:
Lucass-MBP:PHP lucasmaliszewski$ zephir help
_____ __ _
/__ / ___ ____ / /_ (_)____
/ / / _ \/ __ \/ __ \/ / ___/
/ /__/ __/ /_/ / / / / / /
/____/\___/ .___/_/ /_/_/_/
/_/
Zephir version 0.9.11-534bd284df
Usage:
command [options] ...
json-c is empty, need to clone into it, but you'll then have further errors. git clone https://github.com/json-c/json-c.git
@LucasMaliszewski
Warning: re2c 1.0.1 is already installed
Note: In most cases Zephir does not work (still) with re2c 1.x
It's due to this commit: https://github.com/phalcon/zephir/commit/a0a973c81bd1f6079c58df79eb6aeb2279647d5d
Add git clone https://github.com/phalcon/json-c
just before git submodule update --init
in vendor/phalcon/zephir/install-json
.