wasmerio / wasmer-php

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

just build with Docker image php-7.2-fpm #102

Closed kids-return closed 4 years ago

kids-return commented 4 years ago

just build

/bin/bash /tmp/pear/temp/php-ext-wasm/src/libtool --mode=compile g++  -I. -I/tmp/pear/temp/php-ext-wasm/src -DPHP_ATOM_INC -I/tmp/pear/temp/php-ext-wasm/src/include -I/tmp/pear/temp/php-ext-wasm/src/main -I/tmp/pear/temp/php-ext-wasm/src -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  -DHAVE_CONFIG_H  -std=c++11   -c /tmp/pear/temp/php-ext-wasm/src/wasm.cc -o wasm.lo
mkdir .libs
 g++ -I. -I/tmp/pear/temp/php-ext-wasm/src -DPHP_ATOM_INC -I/tmp/pear/temp/php-ext-wasm/src/include -I/tmp/pear/temp/php-ext-wasm/src/main -I/tmp/pear/temp/php-ext-wasm/src -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 -DHAVE_CONFIG_H -std=c++11 -c /tmp/pear/temp/php-ext-wasm/src/wasm.cc  -DPIC -o .libs/wasm.o
/bin/bash /tmp/pear/temp/php-ext-wasm/src/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/php-ext-wasm/src/include -I/tmp/pear/temp/php-ext-wasm/src/main -I/tmp/pear/temp/php-ext-wasm/src -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  -DHAVE_CONFIG_H  -g -O2    -o wasm.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/php-ext-wasm/src/modules  wasm.lo -Wl,-rpath,/tmp/pear/temp/php-ext-wasm/src/. -L/tmp/pear/temp/php-ext-wasm/src/. -lwasmer_runtime_c_api
cc -shared  .libs/wasm.o  -L/tmp/pear/temp/php-ext-wasm/src/. -lwasmer_runtime_c_api  -Wl,-rpath -Wl,/tmp/pear/temp/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 undefined symbol `executor_globals' 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

pecl install wasm

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuser79G7f4/wasm-0.5.0/libtool --mode=compile   -I. -I/tmp/pear/temp/wasm/src -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuser79G7f4/wasm-0.5.0/include -I/tmp/pear/temp/pear-build-defaultuser79G7f4/wasm-0.5.0/main -I/tmp/pear/temp/wasm/src -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  -DHAVE_CONFIG_H     -c /tmp/pear/temp/wasm/src/wasm.cc -o wasm.lo
libtool: unrecognized option `-I.'
Try `libtool --help' for more information.
make: *** [Makefile:194: wasm.lo] Error 1
ERROR: `make' failed

I don't know what went wrong Providing a Dockerfile might be a better option

Hywan commented 4 years ago

Sorry for the late reply. I think it's a duplicate of #64. Closing this one :-).