Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue on ppa:ondrej/php #97

Closed
MichaelNino opened this issue Nov 25, 2019 · 15 comments
Closed

Compilation issue on ppa:ondrej/php #97

MichaelNino opened this issue Nov 25, 2019 · 15 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@MichaelNino
Copy link

Hi,

I'm very excited about the possibilities for this extension!!! :-)

Describe the bug

Should I build against staging branch? When I built against master it didn't complete.

Steps to reproduce

Followed installation instructions in README for staging branch

Expected behavior

php examples/simple.php didn't run

Actual behavior

/home/michael/php/php-ext-wasm# php examples/simple.php
PHP Warning:  Use of undefined constant WASM_TYPE_I32 - assumed 'WASM_TYPE_I32' (this will throw an Error in a future version of PHP) in /home/michael/php/php-ext-wasm/lib/Prelude.php on line 7
PHP Warning:  Use of undefined constant WASM_TYPE_I64 - assumed 'WASM_TYPE_I64' (this will throw an Error in a future version of PHP) in /home/michael/php/php-ext-wasm/lib/Prelude.php on line 8
PHP Warning:  Use of undefined constant WASM_TYPE_F32 - assumed 'WASM_TYPE_F32' (this will throw an Error in a future version of PHP) in /home/michael/php/php-ext-wasm/lib/Prelude.php on line 9
PHP Warning:  Use of undefined constant WASM_TYPE_F64 - assumed 'WASM_TYPE_F64' (this will throw an Error in a future version of PHP) in /home/michael/php/php-ext-wasm/lib/Prelude.php on line 10
PHP Fatal error:  Uncaught Error: Call to undefined function Wasm\wasm_fetch_bytes() in /home/michael/php/php-ext-wasm/lib/Instance.php:75
Stack trace:
#0 /home/michael/php/php-ext-wasm/examples/simple.php(7): Wasm\Instance->__construct('/home/michael/p...')
#1 {main}
  thrown in /home/michael/php/php-ext-wasm/lib/Instance.php on line 75
@MichaelNino MichaelNino added the 🐞 bug Something isn't working label Nov 25, 2019
@Hywan
Copy link
Contributor

Hywan commented Nov 25, 2019

Hello,

Did you run composer install before?
Also, it seems the extension isn't properly installed, or basically not enabled. Try with php -d extension=wasm examples/simple.php maybe.

@Hywan Hywan self-assigned this Nov 25, 2019
@Hywan
Copy link
Contributor

Hywan commented Nov 25, 2019

Also, you should use the master branch, not staging. This one is for testing purposes.

@MichaelNino
Copy link
Author

MichaelNino commented Nov 26, 2019

When I built "staging" branch, I did run composer install. I don't get that far with "master" branch. Please note the following:

just v0.5.1
rustc 1.39.0
php 7.2.24-0ubuntu0.18.04.1
composer 1.9.0

So I did what you recommended. I checked out "master" and the provided following output is from just build. The error is Makefile:194: recipe for target 'wasm.lo' failed.

> git clone https://github.com/wasmerio/php-ext-wasm.git
> cd php-ext-wasm
> just build &> build.out

Cleaning..
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
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-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20170718
checking for PHP installed headers prefix... /usr/include/php/20170718
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.2.1 (ok)
checking for gawk... gawk
checking whether to enable wasm support... yes, shared
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) 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
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
/bin/bash /home/michael/php/php-ext-wasm/src/libtool --mode=compile g++  -I. -I/home/michael/php/php-ext-wasm/src -DPHP_ATOM_INC -I/home/michael/php/php-ext-wasm/src/include -I/home/michael/php/php-ext-wasm/src/main -I/home/michael/php/php-ext-wasm/src -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -std=c++11   -c /home/michael/php/php-ext-wasm/src/wasm.cc -o wasm.lo 
libtool: compile:  g++ -I. -I/home/michael/php/php-ext-wasm/src -DPHP_ATOM_INC -I/home/michael/php/php-ext-wasm/src/include -I/home/michael/php/php-ext-wasm/src/main -I/home/michael/php/php-ext-wasm/src -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -std=c++11 -c /home/michael/php/php-ext-wasm/src/wasm.cc  -fPIC -DPIC -o .libs/wasm.o
Makefile:194: recipe for target 'wasm.lo' failed

@Hywan
Copy link
Contributor

Hywan commented Nov 28, 2019

I think libtool is failing because of -DPIC. Can you run the command without it?

In general, can you try the following commands:

export PATH="$HOME/.cargo/bin:$PATH"
export CXX="gcc"
EXTENSION="$HOME/project/src"
cd $EXTENSION
PHP_PREFIX=$(php-config --prefix)
PHP_PREFIX_BIN=$PHP_PREFIX/bin
$PHP_PREFIX_BIN/phpize --clean
$PHP_PREFIX_BIN/phpize
./configure --with-php-config=$PHP_PREFIX_BIN/php-config
/bin/bash $EXTENSION/libtool --mode=compile $CXX -I. -I$EXTENSION -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php -I$PHP_PREFIX/include/php/main -I$PHP_PREFIX/include/php/TSRM -I$PHP_PREFIX/include/php/Zend -I$PHP_PREFIX/include/php/ext -I$PHP_PREFIX/include/php/ext/date/lib -DHAVE_CONFIG_H -c $EXTENSION/wasm.cc -o wasm.lo -fPIC
$CXX -I. -I$EXTENSION -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php -I$PHP_PREFIX/include/php/main -I$PHP_PREFIX/include/php/TSRM -I$PHP_PREFIX/include/php/Zend -I$PHP_PREFIX/include/php/ext -I$PHP_PREFIX/include/php/ext/date/lib -DHAVE_CONFIG_H -c $EXTENSION/wasm.cc  -DPIC -o .libs/wasm.o -fPIC
/bin/bash $EXTENSION/libtool --mode=link cc -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php -I$PHP_PREFIX/include/php/main -I$PHP_PREFIX/include/php/TSRM -I$PHP_PREFIX/include/php/Zend -I$PHP_PREFIX/include/php/ext -I$PHP_PREFIX/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o wasm.la -export-dynamic -avoid-version -prefer-pic -module -rpath $EXTENSION/modules  wasm.lo -Wl,-rpath,$EXTENSION/. -L$EXTENSION/. -lwasmer_runtime_c_api -fPIC
cc -shared  .libs/wasm.o  -L$EXTENSION/. -lwasmer_runtime_c_api  -Wl,-rpath -Wl,$EXTENSION/. -Wl,-soname -Wl,wasm.so -o .libs/wasm.so -fPIC
# Finally…
sudo make install-modules

Does it work?

@crevillo
Copy link

crevillo commented Nov 30, 2019

hello. i'm more or less in same situation. executing the commands you suggest, i still get same error as @MichaelNino . let me know if i can help with more info.

edit: maybe the problem is different for me. this is the output i get

carlos@carlos:~/php-ext-wasm/src$ /bin/bash $EXTENSION/libtool --mode=compile $CXX -I. -I$EXTENSION -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php -I$PHP_PREFIX/include/php/main -I$PHP_PREFIX/include/php/TSRM -I$PHP_PREFIX/include/php/Zend -I$PHP_PREFIX/include/php/ext -I$PHP_PREFIX/include/php/ext/date/lib -DHAVE_CONFIG_H -c $EXTENSION/wasm.cc -o wasm.lo -fPIC
libtool: compile:  gcc -I. -I/home/carlos/php-ext-wasm/src -DPHP_ATOM_INC -I/home/carlos/php-ext-wasm/src/include -I/home/carlos/php-ext-wasm/src/main -I/home/carlos/php-ext-wasm/src -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 -c /home/carlos/php-ext-wasm/src/wasm.cc -fPIC  -fPIC -DPIC -o .libs/wasm.o
In file included from /home/carlos/php-ext-wasm/src/wasm.cc:19:
/home/carlos/php-ext-wasm/src/wasm.hh:23:10: fatal error: php.h: No existe el archivo o el directorio
   23 | #include "php.h"
      |          ^~~~~~~
compilation terminated.

@MichaelNino
Copy link
Author

MichaelNino commented Dec 1, 2019

The reason why both @crevillo and myself are both failing at: #include "php.h" is because the include path in your shell script @Hywan isn't finding the PHP source code our location that your source code is located. I'm running Ubuntu 18.04 and my source is installed at: /usr/include/php/20170718 because my repository is at: ppa:ondrej/php.

I'm not a C/C++ programmer but it would be helpful if you could update your shell script so that it is more configurable. I could probably wade through it and figure it out but I'm having surgery in a couple of days and didn't want this ticket to get stale.

Thanks for your assistance @Hywan!

@Hywan
Copy link
Contributor

Hywan commented Dec 2, 2019

If you see php-config and if php-config --prefix returns a valid path for you, I don't see why you should have a compilation problem with the commands above. Can you check that please?

@crevillo
Copy link

crevillo commented Dec 2, 2019

still no luck. i have a sh script right now with this content

export PATH="$HOME/.cargo/bin:$PATH"
export CXX="gcc"
EXTENSION="/home/carlosrevillo/workspace/php-ext-wasm/src"
cd $EXTENSION
PHP_PREFIX=$(php-config --prefix)
PHP_PREFIX_BIN=$PHP_PREFIX/bin
$PHP_PREFIX_BIN/phpize --clean
$PHP_PREFIX_BIN/phpize
./configure --with-php-config=$PHP_PREFIX_BIN/php-config
/bin/bash $EXTENSION/libtool --mode=compile $CXX -I. -I$EXTENSION -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php/20170718 -I$PHP_PREFIX/include/php/20170718/main -I$PHP_PREFIX/include/php/20170718/TSRM -I$PHP_PREFIX/include/php/20170718/Zend -I$PHP_PREFIX/include/php/20170718/ext -I$PHP_PREFIX/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -c $EXTENSION/wasm.cc -o wasm.lo -fPIC
$CXX -I. -I$EXTENSION -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php/20170718 -I$PHP_PREFIX/include/php/20170718/main -I$PHP_PREFIX/include/php/20170718/TSRM -I$PHP_PREFIX/include/php/20170718/Zend -I$PHP_PREFIX/include/php/20170718/ext -I$PHP_PREFIX/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -c $EXTENSION/wasm.cc  -DPIC -o .libs/wasm.o -fPIC
/bin/bash $EXTENSION/libtool --mode=link cc -DPHP_ATOM_INC -I$EXTENSION/include -I$EXTENSION/main -I$EXTENSION -I$PHP_PREFIX/include/php/20170718 -I$PHP_PREFIX/include/php/20170718/main -I$PHP_PREFIX/include/php/20170718/TSRM -I$PHP_PREFIX/include/php/20170718/Zend -I$PHP_PREFIX/include/php/20170718/ext -I$PHP_PREFIX/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o wasm.la -export-dynamic -avoid-version -prefer-pic -module -rpath $EXTENSION/modules  wasm.lo -Wl,-rpath,$EXTENSION/. -L$EXTENSION/. -lwasmer_runtime_c_api -fPIC
cc -shared  .libs/wasm.o  -L$EXTENSION/. -lwasmer_runtime_c_api  -Wl,-rpath -Wl,$EXTENSION/. -Wl,-soname -Wl,wasm.so -o .libs/wasm.so -fPIC
# Finally…
sudo make install-modules```

output is

carlosrevillo@PU0713:~/workspace/php-ext-wasm$ ./build.sh 
Cleaning..
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
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-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20170718
checking for PHP installed headers prefix... /usr/include/php/20170718
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... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable wasm support... yes, shared
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) 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
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
libtool: compile:  gcc -I. -I/home/carlosrevillo/workspace/php-ext-wasm/src -DPHP_ATOM_INC -I/home/carlosrevillo/workspace/php-ext-wasm/src/include -I/home/carlosrevillo/workspace/php-ext-wasm/src/main -I/home/carlosrevillo/workspace/php-ext-wasm/src -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -c /home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc -fPIC  -fPIC -DPIC -o .libs/wasm.o
In file included from /home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:19:0:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.hh:229:5: error: ‘wasmer_trampoline_buffer_t’ does not name a type; did you mean ‘wasmer_import_func_t’?
     wasmer_trampoline_buffer_t *trampoline_buffer;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~
     wasmer_import_func_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc: In function ‘bool initialize_wasm_imports(HashTable*, std::__cxx11::list<wasm_imported_function*>**, wasmer_import_t**, uint32_t*)’:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:966:33: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             trampoline_context->trampoline_buffer = NULL;
                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:13: error: ‘wasmer_trampoline_buffer_builder_t’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:13: note: suggested alternative: ‘wasmer_import_object_iter_t’
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_object_iter_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:49: error: ‘trampoline_builder’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                 ^~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:49: note: suggested alternative: ‘trampoline_context’
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                 ^~~~~~~~~~~~~~~~~~
                                                 trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:70: error: ‘wasmer_trampoline_buffer_builder_new’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:18: error: ‘wasmer_trampoline_callable_t’ was not declared in this scope
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:18: note: suggested alternative: ‘trampoline_context’
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:48: error: expected primary-expression before ‘)’ token
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                                                ^
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:970:46: error: ‘wasmer_trampoline_buffer_builder_add_callinfo_trampoline’ was not declared in this scope
             unsigned long trampoline_index = wasmer_trampoline_buffer_builder_add_callinfo_trampoline(
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:13: error: ‘wasmer_trampoline_buffer_t’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:13: note: suggested alternative: ‘wasmer_import_func_t’
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_func_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:41: error: ‘trampoline’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                         ^~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:41: note: suggested alternative: ‘tmpfile’
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                         ^~~~~~~~~~
                                         tmpfile
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:54: error: ‘wasmer_trampoline_buffer_builder_build’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:979:33: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             trampoline_context->trampoline_buffer = trampoline;
                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:982:19: error: ‘wasmer_trampoline_callable_t’ does not name a type; did you mean ‘trampoline_context’?
             const wasmer_trampoline_callable_t *trampoline_callable = wasmer_trampoline_buffer_get_trampoline(trampoline, trampoline_index);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:986:36: error: ‘trampoline_callable’ was not declared in this scope
                 (void (*)(void *)) trampoline_callable,
                                    ^~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:986:36: note: suggested alternative: ‘trampoline_context’
                 (void (*)(void *)) trampoline_callable,
                                    ^~~~~~~~~~~~~~~~~~~
                                    trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc: In function ‘void wasm_instance_destructor(zend_resource*)’:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:65: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
                                                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:13: error: ‘wasmer_trampoline_buffer_destroy’ was not declared in this scope
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:13: note: suggested alternative: ‘wasmer_import_func_destroy’
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_func_destroy
In file included from /home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:19:0:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.hh:229:5: error: ‘wasmer_trampoline_buffer_t’ does not name a type; did you mean ‘wasmer_import_func_t’?
     wasmer_trampoline_buffer_t *trampoline_buffer;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~
     wasmer_import_func_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc: In function ‘bool initialize_wasm_imports(HashTable*, std::__cxx11::list<wasm_imported_function*>**, wasmer_import_t**, uint32_t*)’:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:966:33: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             trampoline_context->trampoline_buffer = NULL;
                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:13: error: ‘wasmer_trampoline_buffer_builder_t’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:13: note: suggested alternative: ‘wasmer_import_object_iter_t’
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_object_iter_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:49: error: ‘trampoline_builder’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                 ^~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:49: note: suggested alternative: ‘trampoline_context’
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                 ^~~~~~~~~~~~~~~~~~
                                                 trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:70: error: ‘wasmer_trampoline_buffer_builder_new’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:18: error: ‘wasmer_trampoline_callable_t’ was not declared in this scope
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:18: note: suggested alternative: ‘trampoline_context’
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:48: error: expected primary-expression before ‘)’ token
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                                                ^
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:970:46: error: ‘wasmer_trampoline_buffer_builder_add_callinfo_trampoline’ was not declared in this scope
             unsigned long trampoline_index = wasmer_trampoline_buffer_builder_add_callinfo_trampoline(
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:13: error: ‘wasmer_trampoline_buffer_t’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:13: note: suggested alternative: ‘wasmer_import_func_t’
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_func_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:41: error: ‘trampoline’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                         ^~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:41: note: suggested alternative: ‘tmpfile’
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                         ^~~~~~~~~~
                                         tmpfile
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:54: error: ‘wasmer_trampoline_buffer_builder_build’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:979:33: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             trampoline_context->trampoline_buffer = trampoline;
                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:982:19: error: ‘wasmer_trampoline_callable_t’ does not name a type; did you mean ‘trampoline_context’?
             const wasmer_trampoline_callable_t *trampoline_callable = wasmer_trampoline_buffer_get_trampoline(trampoline, trampoline_index);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:986:36: error: ‘trampoline_callable’ was not declared in this scope
                 (void (*)(void *)) trampoline_callable,
                                    ^~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:986:36: note: suggested alternative: ‘trampoline_context’
                 (void (*)(void *)) trampoline_callable,
                                    ^~~~~~~~~~~~~~~~~~~
                                    trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc: In function ‘void wasm_instance_destructor(zend_resource*)’:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:65: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
                                                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:13: error: ‘wasmer_trampoline_buffer_destroy’ was not declared in this scope
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:13: note: suggested alternative: ‘wasmer_import_func_destroy’
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_func_destroy
libtool:   error: 'wasm.lo' is not a valid libtool object
cc: error: .libs/wasm.o: No existe el archivo o el directorio
/bin/bash /home/carlosrevillo/workspace/php-ext-wasm/src/libtool --mode=compile gcc  -I. -I/home/carlosrevillo/workspace/php-ext-wasm/src -DPHP_ATOM_INC -I/home/carlosrevillo/workspace/php-ext-wasm/src/include -I/home/carlosrevillo/workspace/php-ext-wasm/src/main -I/home/carlosrevillo/workspace/php-ext-wasm/src -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H     -c /home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc -o wasm.lo 
libtool: compile:  gcc -I. -I/home/carlosrevillo/workspace/php-ext-wasm/src -DPHP_ATOM_INC -I/home/carlosrevillo/workspace/php-ext-wasm/src/include -I/home/carlosrevillo/workspace/php-ext-wasm/src/main -I/home/carlosrevillo/workspace/php-ext-wasm/src -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -c /home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc  -fPIC -DPIC -o .libs/wasm.o
In file included from /home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:19:0:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.hh:229:5: error: ‘wasmer_trampoline_buffer_t’ does not name a type; did you mean ‘wasmer_import_func_t’?
     wasmer_trampoline_buffer_t *trampoline_buffer;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~
     wasmer_import_func_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc: In function ‘bool initialize_wasm_imports(HashTable*, std::__cxx11::list<wasm_imported_function*>**, wasmer_import_t**, uint32_t*)’:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:966:33: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             trampoline_context->trampoline_buffer = NULL;
                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:13: error: ‘wasmer_trampoline_buffer_builder_t’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:13: note: suggested alternative: ‘wasmer_import_object_iter_t’
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_object_iter_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:49: error: ‘trampoline_builder’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                 ^~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:49: note: suggested alternative: ‘trampoline_context’
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                 ^~~~~~~~~~~~~~~~~~
                                                 trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:969:70: error: ‘wasmer_trampoline_buffer_builder_new’ was not declared in this scope
             wasmer_trampoline_buffer_builder_t *trampoline_builder = wasmer_trampoline_buffer_builder_new();
                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:18: error: ‘wasmer_trampoline_callable_t’ was not declared in this scope
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:18: note: suggested alternative: ‘trampoline_context’
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:972:48: error: expected primary-expression before ‘)’ token
                 (wasmer_trampoline_callable_t *) imported_function_trampoline,
                                                ^
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:970:46: error: ‘wasmer_trampoline_buffer_builder_add_callinfo_trampoline’ was not declared in this scope
             unsigned long trampoline_index = wasmer_trampoline_buffer_builder_add_callinfo_trampoline(
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:13: error: ‘wasmer_trampoline_buffer_t’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:13: note: suggested alternative: ‘wasmer_import_func_t’
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_func_t
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:41: error: ‘trampoline’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                         ^~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:41: note: suggested alternative: ‘tmpfile’
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                         ^~~~~~~~~~
                                         tmpfile
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:978:54: error: ‘wasmer_trampoline_buffer_builder_build’ was not declared in this scope
             wasmer_trampoline_buffer_t *trampoline = wasmer_trampoline_buffer_builder_build(trampoline_builder);
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:979:33: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             trampoline_context->trampoline_buffer = trampoline;
                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:982:19: error: ‘wasmer_trampoline_callable_t’ does not name a type; did you mean ‘trampoline_context’?
             const wasmer_trampoline_callable_t *trampoline_callable = wasmer_trampoline_buffer_get_trampoline(trampoline, trampoline_index);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:986:36: error: ‘trampoline_callable’ was not declared in this scope
                 (void (*)(void *)) trampoline_callable,
                                    ^~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:986:36: note: suggested alternative: ‘trampoline_context’
                 (void (*)(void *)) trampoline_callable,
                                    ^~~~~~~~~~~~~~~~~~~
                                    trampoline_context
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc: In function ‘void wasm_instance_destructor(zend_resource*)’:
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:65: error: ‘struct wasm_imported_function’ has no member named ‘trampoline_buffer’
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
                                                                 ^~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:13: error: ‘wasmer_trampoline_buffer_destroy’ was not declared in this scope
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/carlosrevillo/workspace/php-ext-wasm/src/wasm.cc:1166:13: note: suggested alternative: ‘wasmer_import_func_destroy’
             wasmer_trampoline_buffer_destroy(imported_function->trampoline_buffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             wasmer_import_func_destroy
Makefile:194: recipe for target 'wasm.lo' failed
make: *** [wasm.lo] Error 1

finally, output related to php-config

carlosrevillo@PU0713:~/workspace/php-ext-wasm$ php-config
Usage: /usr/bin/php-config [OPTION]
Options:
  --prefix            [/usr]
  --includes          [-I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib ]
  --ldflags           [-L/usr/lib/php/20170718  -L/usr/lib/x86_64-linux-gnu]
  --libs              [-lcrypt   -largon2 -lresolv -lcrypt -lz -lpcre -lrt -lm -ldl -lnsl  -lxml2 -lssl -lcrypto -lsodium -lcrypt -largon2 -largon2 -lcrypt ]
  --extension-dir     [/usr/lib/php/20170718]
  --include-dir       [/usr/include/php/20170718]
  --man-dir           [/usr/share/man]
  --php-binary        [/usr/bin/php7.2]
  --php-sapis         [cli ]
  --phpapi            [20170718]
  --configure-options [--includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --disable-silent-rules --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-cli --disable-cgi --disable-phpdbg --with-config-file-path=/etc/php/7.2/cli --with-config-file-scan-dir=/etc/php/7.2/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --cache-file=/build/php7.2-_8xW3p/php7.2-7.2.25/config.cache --libdir=${prefix}/lib/php --libexecdir=${prefix}/lib/php --datadir=${prefix}/share/php/7.2 --program-suffix=7.2 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --with-pic --with-layout=GNU --without-pear --enable-filter --with-openssl=yes --with-password-argon2=/usr --with-pcre-regex=/usr --enable-hash --with-mhash=/usr --enable-libxml --enable-session --with-sodium --with-system-tzdata --with-zlib=/usr --with-zlib-dir=/usr --enable-dtrace --enable-pcntl --with-libedit=shared,/usr build_alias=x86_64-linux-gnu host_alias=x86_64-linux-gnu CFLAGS=-g -O2 -fdebug-prefix-map=/build/php7.2-_8xW3p/php7.2-7.2.25=. -fstack-protector-strong -Wformat -Werror=format-security -O2 -Wall -pedantic -fsigned-char -fno-strict-aliasing -g]
  --version           [7.2.25-1+ubuntu18.04.1+deb.sury.org+1]
  --vernum            [70225]
carlosrevillo@PU0713:~/workspace/php-ext-wasm$ php-config --prefix
/usr```

@MichaelNino
Copy link
Author

Hey @Hywan php-config --prefix returns "/usr". However php.h is located in "/usr/include/php/20170718/main/php.h". This is why the shell script variable PHP_PREFIX and EXTENSION cannot be used to find "php.h" isn't not located underneath "php-ext-wasm" source tree. Make sense?

@crevillo
Copy link

crevillo commented Dec 4, 2019

hello. it is working for now after following this other issue #93

the line recommended by @Hywan there does the trick. i thought it was merged in the master branch, but it isn't, right?

@Hywan
Copy link
Contributor

Hywan commented Dec 4, 2019

@crevillo I was about to point #93 to you. Wasmer 0.11 has been released and it contains the bug fix. I'll update the master branch of php-ext-wasm today to include the new version of Wasmer.

@Hywan
Copy link
Contributor

Hywan commented Dec 4, 2019

@crevillo Done, see #98.

@Hywan
Copy link
Contributor

Hywan commented Dec 4, 2019

@MichaelNino I'm not sure #98 will be able to fix your issue, but can you retry with the last shell commands I provided in #97 (comment), and tell me the exact output please.

Normally, php-config --prefix returns the root that has an acces to all PHP directories, such as include/php/20170718/.

@MichaelNino
Copy link
Author

MichaelNino commented Dec 12, 2019

@Hywan I used Ubuntu on Windows Subsystem to verify that php-ext-wasm installs properly. I used the Ubuntu repository to install php7.2 however the Digital Ocean server that is experiencing the issue uses the ppa:ondrej/php repository I indicated earlier. For now, I will use the Ubuntu repository however the ppa:ondrej/php repository as you may already know is very popular and used quite often for a variety of reasons including but not limited to concurrent versions of PHP.

Thanks for your assistance. I will be evaluating the extension. There so many opportunities for inter-op and integration! Thanks again! :-)

@Hywan Hywan changed the title Call to undefined function Wasm\wasm_fetch_bytes() Compilation issue on ppa:ondrej/php Dec 12, 2019
@Hywan
Copy link
Contributor

Hywan commented Dec 12, 2019

I'll try to run a test on ppa:ondrej/php. Thanks for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants