wasmerio / wasmer-php

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

Recipe for target 'wasm.la' failed #123

Closed Eligioo closed 12 months ago

Eligioo commented 4 years ago

Thanks for the bug report!

Describe the bug

error: Recipe build failed with exit code 2

Steps to reproduce

just build
Cleaning..
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 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/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20190902
checking for PHP installed headers prefix... /usr/include/php/20190902
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable wasm support... yes, shared
checking for a sed that does not truncate output... /bin/sed
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: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/bash /home/stefan/code/rust/wasmer-php/src/libtool --mode=compile g++  -I. -I/home/stefan/code/rust/wasmer-php/src -DPHP_ATOM_INC -I/home/stefan/code/rust/wasmer-php/src/include -I/home/stefan/code/rust/wasmer-php/src/main -I/home/stefan/code/rust/wasmer-php/src -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib  -DHAVE_CONFIG_H  -std=c++11   -c /home/stefan/code/rust/wasmer-php/src/wasm.cc -o wasm.lo 
mkdir .libs
 g++ -I. -I/home/stefan/code/rust/wasmer-php/src -DPHP_ATOM_INC -I/home/stefan/code/rust/wasmer-php/src/include -I/home/stefan/code/rust/wasmer-php/src/main -I/home/stefan/code/rust/wasmer-php/src -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -DHAVE_CONFIG_H -std=c++11 -c /home/stefan/code/rust/wasmer-php/src/wasm.cc  -DPIC -o .libs/wasm.o
/home/stefan/code/rust/wasmer-php/src/wasm.cc: In function ‘void zim_WasmArrayBuffer___construct(zend_execute_data*, zval*)’:
/home/stefan/code/rust/wasmer-php/src/wasm.cc:108:113: 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/stefan/code/rust/wasmer-php/src/wasm.cc: In function ‘void zim_WasmArrayBuffer_grow(zend_execute_data*, zval*)’:
/home/stefan/code/rust/wasmer-php/src/wasm.cc:174:119: 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/stefan/code/rust/wasmer-php/src/wasm.cc: In function ‘void zif_WasmTypedArray___construct(zend_execute_data*, zval*)’:
/home/stefan/code/rust/wasmer-php/src/wasm.cc:2029:105: 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/stefan/code/rust/wasmer-php/src/wasm.cc:2041:9: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long {aka long int}’ [-Wformat=]
         );
         ^
/home/stefan/code/rust/wasmer-php/src/wasm.cc:2047:105: 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/stefan/code/rust/wasmer-php/src/wasm.cc:2099:13: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘zend_long {aka long int}’ [-Wformat=]
             );
             ^
/home/stefan/code/rust/wasmer-php/src/wasm.cc: In function ‘void zif_WasmTypedArray_offset_get(zend_execute_data*, zval*)’:
/home/stefan/code/rust/wasmer-php/src/wasm.cc:2202:9: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘zend_long {aka long int}’ [-Wformat=]
         );
         ^
/home/stefan/code/rust/wasmer-php/src/wasm.cc: In function ‘void zif_WasmTypedArray_offset_set(zend_execute_data*, zval*)’:
/home/stefan/code/rust/wasmer-php/src/wasm.cc:2285:9: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘zend_long {aka long int}’ [-Wformat=]
         );
         ^
/home/stefan/code/rust/wasmer-php/src/wasm.cc: In function ‘void zif_WasmTypedArray_offset_unset(zend_execute_data*, zval*)’:
/home/stefan/code/rust/wasmer-php/src/wasm.cc:2406:9: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘zend_long {aka long int}’ [-Wformat=]
         );
         ^
/bin/bash /home/stefan/code/rust/wasmer-php/src/libtool --mode=link cc -DPHP_ATOM_INC -I/home/stefan/code/rust/wasmer-php/src/include -I/home/stefan/code/rust/wasmer-php/src/main -I/home/stefan/code/rust/wasmer-php/src -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -o wasm.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/stefan/code/rust/wasmer-php/src/modules  wasm.lo -Wl,-rpath,/home/stefan/code/rust/wasmer-php/src/. -L/home/stefan/code/rust/wasmer-php/src/. -lwasmer
cc -shared  .libs/wasm.o  -L/home/stefan/code/rust/wasmer-php/src/. -lwasmer  -Wl,-rpath -Wl,/home/stefan/code/rust/wasmer-php/src/. -Wl,-soname -Wl,wasm.so -o .libs/wasm.so
/home/stefan/code/rust/wasmer-php/src/./libwasmer.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:197: recipe for target 'wasm.la' failed
make: *** [wasm.la] Error 1
error: Recipe `build` failed with exit code 2

Additional info

php -v PHP 7.4.10 (cli) (built: Sep 9 2020 06:36:14) ( NTS )