wasmerio / wasmer-php

🐘🕸️ WebAssembly runtime for PHP
https://wasmerio.github.io/wasmer-php/wasm/
MIT License
1.01k stars 42 forks source link

just build with php 7.3 #89

Closed beatscode closed 4 years ago

beatscode commented 5 years ago

after running just build I recieve the following. Does php-ext-wasm not support 7.3?

Running ubuntu 19.04

just build                                                                                                                       master
Cleaning..
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
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... /home/alex/.linuxbrew/Cellar/php/7.3.11
checking for PHP includes... -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/main -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/TSRM -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/Zend -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext/date/lib
checking for PHP extension directory... /home/alex/.linuxbrew/Cellar/php/7.3.11/pecl/20180731
checking for PHP installed headers prefix... /home/alex/.linuxbrew/Cellar/php/7.3.11/include/php
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 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
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... 
checking if g++ static flag  works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... unsupported
configure: creating ./config.status
config.status: creating config.h
/bin/bash /home/alex/projects/php-ext-wasm/src/libtool --mode=compile g++  -I. -I/home/alex/projects/php-ext-wasm/src -DPHP_ATOM_INC -I/home/alex/projects/php-ext-wasm/src/include -I/home/alex/projects/php-ext-wasm/src/main -I/home/alex/projects/php-ext-wasm/src -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/main -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/TSRM -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/Zend -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext/date/lib  -DHAVE_CONFIG_H  -std=c++11   -c /home/alex/projects/php-ext-wasm/src/wasm.cc -o wasm.lo 
mkdir .libs
 g++ -I. -I/home/alex/projects/php-ext-wasm/src -DPHP_ATOM_INC -I/home/alex/projects/php-ext-wasm/src/include -I/home/alex/projects/php-ext-wasm/src/main -I/home/alex/projects/php-ext-wasm/src -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/main -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/TSRM -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/Zend -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext/date/lib -DHAVE_CONFIG_H -std=c++11 -c /home/alex/projects/php-ext-wasm/src/wasm.cc  -DPIC -o .libs/wasm.o
/home/alex/projects/php-ext-wasm/src/wasm.cc: In function ‘void zim_WasmArrayBuffer___construct(zend_execute_data*, zval*)’:
/home/alex/projects/php-ext-wasm/src/wasm.cc:108:55: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
         zend_throw_exception_ex(zend_ce_exception, 0, "Buffer length must be positive; given %lld.", byte_length);
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc: In function ‘void zim_WasmArrayBuffer_grow(zend_execute_data*, zval*)’:
/home/alex/projects/php-ext-wasm/src/wasm.cc:174:55: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
         zend_throw_exception_ex(zend_ce_exception, 0, "Number of pages must be positive; given %lld.", number_of_pages);
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc: In function ‘void zif_WasmTypedArray___construct(zend_execute_data*, zval*)’:
/home/alex/projects/php-ext-wasm/src/wasm.cc:2029:55: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
         zend_throw_exception_ex(zend_ce_exception, 0, "Offset must be non-negative; given %lld.", offset);
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc:2038:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
             "Offset must be smaller than the array buffer length; given %lld, buffer length is %zu.",
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             offset,
             ~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc:2047:55: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
         zend_throw_exception_ex(zend_ce_exception, 2, "Length must be non-negative; given %lld.", length);
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc:2096:17: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
                 "Length must not be greater than the buffer length; given %lld, maximum length is %zu.",
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 length,
                 ~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc: In function ‘void zif_WasmTypedArray_offset_get(zend_execute_data*, zval*)’:
/home/alex/projects/php-ext-wasm/src/wasm.cc:2199:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
             "Offset is outside the view range [0; %zu]; given %lld.",
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc:2201:13:
             offset
             ~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc: In function ‘void zif_WasmTypedArray_offset_set(zend_execute_data*, zval*)’:
/home/alex/projects/php-ext-wasm/src/wasm.cc:2282:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
             "Offset is outside the view range [0; %zu]; given %lld.",
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc:2284:13:
             offset
             ~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc: In function ‘void zif_WasmTypedArray_offset_unset(zend_execute_data*, zval*)’:
/home/alex/projects/php-ext-wasm/src/wasm.cc:2403:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘zend_long’ {aka ‘long int’} [-Wformat=]
             "Offset is outside the view range [0; %zu]; given %lld.",
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/projects/php-ext-wasm/src/wasm.cc:2405:13:
             offset
             ~~~~~~
/bin/bash /home/alex/projects/php-ext-wasm/src/libtool --mode=link cc -DPHP_ATOM_INC -I/home/alex/projects/php-ext-wasm/src/include -I/home/alex/projects/php-ext-wasm/src/main -I/home/alex/projects/php-ext-wasm/src -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/main -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/TSRM -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/Zend -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext -I/home/alex/.linuxbrew/Cellar/php/7.3.11/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o wasm.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/alex/projects/php-ext-wasm/src/modules  wasm.lo -Wl,-rpath,/home/alex/projects/php-ext-wasm/src/. -L/home/alex/projects/php-ext-wasm/src/. -lwasmer_runtime_c_api
cc -shared  .libs/wasm.o  -L/home/alex/projects/php-ext-wasm/src/. -lwasmer_runtime_c_api  -Wl,-rpath -Wl,/home/alex/projects/php-ext-wasm/src/. -Wl,-soname -Wl,wasm.so -o .libs/wasm.so
/usr/bin/ld: .libs/wasm.o: relocation R_X86_64_PC32 against symbol `wasm_array_buffer_class_entry_handlers' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [Makefile:199: wasm.la] Error 1
error: Recipe `build` failed with exit code 2
Hywan commented 4 years ago

Hello,

The project works on PHP 7.3. What's the minor version of the PHP binary you use?

Hywan commented 4 years ago

(just tested with 7.3.8, it works well)

Hywan commented 4 years ago

Closing due to inactivity, please re-open if you need any assistance.