Open Crell opened 1 year ago
Is the problem still occurring with the latest updates?
I got i different error message, i think i was able to get further
Now type 'make' to compile libxml2.USERID= docker-compose -p phpwasm run --rm -e PKG_CONFIG_PATH=/src/lib/lib/pkgconfig -e PRELOAD_ASSETS='preload/' -e INITIAL_MEMORY=1024MB -e ENVIRONMENT=web-drupal -e PHP_BRANCH=php-8.2.4 -e EMCC_CORES=`nproc` -e EMCC_ALLOW_FASTCOMP=1 -w /src/third_party/libxml2/ emscripten-builder emconfigure ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/src/lib/ | (which pv > /dev/null && pv --name 'lib/lib/libxml2.la' || cat)
+ which pv
++ nproc
bash: nproc: command not found
+ USERID=
+ docker-compose -p phpwasm run --rm -e PKG_CONFIG_PATH=/src/lib/lib/pkgconfig -e PRELOAD_ASSETS=preload/ -e INITIAL_MEMORY=1024MB -e ENVIRONMENT=web-drupal -e PHP_BRANCH=php-8.2.4 -e EMCC_CORES= -e EMCC_ALLOW_FASTCOMP=1 -w /src/third_party/libxml2/ emscripten-builder emconfigure ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/src/lib/
+ cat
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
extra=v2.9.10
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... /emsdk_portable/fastcomp/emscripten/emcc
checking whether the C compiler works... no
configure: error: in `/src/third_party/libxml2':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure: ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/src/lib/
make: *** [lib/lib/libxml2.la] Error 77
Did you ever get past your error @jimmywarting ? I am experiencing the same thing. When I do a docker-compose run
emconfigure works for libxml2, but not from the make command.
Hi Again:
I got further. During troubleshooting I noticed we both had bash: nproc: command not found
. I fixed that first by brew install coreutils
. I don't think it made any difference though.
I deleted the original from and uncommented the below.
FROM emscripten/emsdk:latest
MAINTAINER Sean Morris <sean@seanmorr.is>
That way I got up to:
Building PHP for web (drupal)
++ nproc
+ USERID=
+ docker-compose -p phpwasm run --rm -e PKG_CONFIG_PATH=/src/lib/lib/pkgconfig -e PRELOAD_ASSETS=preload/ -e INITIAL_MEMORY=1024MB -e ENVIRONMENT=web-drupal -e PHP_BRANCH=php-8.2.4 -e EMCC_CORES=4 -e EMCC_ALLOW_FASTCOMP=1 -w /src/third_party/php8.2-src/ emscripten-builder emcc -O3 -o ../../build/php-web-drupal.js --llvm-lto 2 -s 'EXPORTED_FUNCTIONS=["_pib_init", "_pib_destroy", "_pib_run", "_pib_exec" "_pib_refresh", "_main", "_php_embed_init", "_php_embed_shutdown", "_php_embed_shutdown", "_zend_eval_string", "_exec_callback", "_del_callback"]' -s 'EXPORTED_RUNTIME_METHODS=["ccall", "UTF8ToString", "lengthBytesUTF8"]' -s ENVIRONMENT=web-drupal -s MAXIMUM_MEMORY=2048mb -s INITIAL_MEMORY=1024MB -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s 'EXPORT_NAME='\''PHP'\''' -s MODULARIZE=1 -s INVOKE_RUN=0 -s USE_ZLIB=1 /src/lib/pib_eval.o /src/lib/libphp.a /src/lib/lib/libxml2.a --preload-file preload/ -s ENVIRONMENT=web
emcc:WARNING: --llvm-lto ignored when using llvm backend
cache:INFO: generating system asset: symbol_lists/9e524983b986714c65f6ca072c93f38a4827e441.json... (this will be cached in "/emsdk/upstream/emscripten/cache/symbol_lists/9e524983b986714c65f6ca072c93f38a4827e441.json" for subsequent builds)
cache:INFO: - ok
ports:INFO: retrieving port: zlib from https://github.com/madler/zlib/archive/refs/tags/v1.2.13.tar.gz
ports:INFO: unpacking port: zlib
cache:INFO: generating port: sysroot/lib/wasm32-emscripten/libz.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libz.a" for subsequent builds)
system_libs:INFO: compiled 15 inputs
cache:INFO: - ok
wasm-ld: error: /src/lib/libphp.a(internal_functions.o): undefined symbol: pdo_sqlite_module_entry
emcc: error: '/emsdk/upstream/bin/wasm-ld -o ../../build/php-web-drupal.wasm /src/lib/pib_eval.o /src/lib/libphp.a /src/lib/lib/libxml2.a -L/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten /emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libz.a -lGL -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpvsg1gk4llibemscripten_js_symbols.so --import-undefined --strip-debug --export-if-defined=pib_init --export-if-defined=pib_destroy --export-if-defined=pib_run "--export-if-defined=pib_exec\" \"_pib_refresh" --export-if-defined=main --export-if-defined=php_embed_init --export-if-defined=php_embed_shutdown --export-if-defined=zend_eval_string --export-if-defined=exec_callback --export-if-defined=del_callback --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__errno_location --export-if-defined=__get_temp_ret --export-if-defined=__set_temp_ret --export-if-defined=malloc --export-if-defined=free --export-if-defined=__wasm_call_ctors --export-table -z stack-size=65536 --initial-memory=1073741824 --max-memory=2147483648 --no-entry --global-base=1024' failed (returned 1)
make: *** [php-web-drupal.wasm] Error 1
I deleted my working folder and started over as I couldn't remember if I tested after brew install coreutils
Now I get undefined symbol: pdo_sqlite_module_entry
error, which is the same as when I added the extra step:
It still fails in the same place. I reasoned that it was broken because of emsdk no longer including fastcomp (https://github.com/emscripten-core/emscripten/issues/11319). So I changed the dockerfile to have:
RUN set -euxo pipefail;\
apt-get update; \
emsdk install 1.39.18-fastcomp; \
Unfortunately it errors in the same place with undefined symbol: pdo_sqlite_module_entry
still. My product idea depends on being able to use this wordpress plugin so I will keep on trying. Since it wasn't working anyways I moved both places in the dockerfile to:
FROM emscripten/emsdk:latest
MAINTAINER Sean Morris <sean@seanmorr.is>
SHELL ["/bin/bash", "-c"]
RUN set -euxo pipefail;\
apt-get update; \
emsdk install latest; \
I would really appreciate any help!!!!
@rhildred Can you pull the latest master
and give it another shot? I've made some changes and its now building with emscripten 3.1.43.
Hi @seanmorris . Thanks for the update. I will give it a try.
It still fails in the same place. I reasoned that it was broken because of emsdk no longer including fastcomp (emscripten-core/emscripten#11319). So I changed the dockerfile to have:
RUN set -euxo pipefail;\ apt-get update; \ emsdk install 1.39.18-fastcomp; \
Unfortunately it errors in the same place with
undefined symbol: pdo_sqlite_module_entry
still. My product idea depends on being able to use this wordpress plugin so I will keep on trying. Since it wasn't working anyways I moved both places in the dockerfile to:FROM emscripten/emsdk:latest MAINTAINER Sean Morris <sean@seanmorr.is> SHELL ["/bin/bash", "-c"] RUN set -euxo pipefail;\ apt-get update; \ emsdk install latest; \
I would really appreciate any help!!!!
I dug through this, and it happens when the binary was built with vrzno, but not pdo. PDO is now turned on by default to prevent this from happening.
Vrzno and PDO will eventually become shared libraries.
Trying to run
make
ends with this error:When I try to run the
php-web.wasm
target's dependencies directly, I see there is a warning from SQLite:I don't know if that's related or not.