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

need --with-curl for a wordpress plugin #32

Open
rhildred opened this issue Sep 15, 2023 · 2 comments
Open

need --with-curl for a wordpress plugin #32

rhildred opened this issue Sep 15, 2023 · 2 comments

Comments

@rhildred
Copy link

I am trying to add --with-curl so that I can run a wordpress plugin. I started just by trying to build the php-wasm package with no changes. I get the following error:

  • 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
    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/tmp69p5suowlibemscripten_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 am really eager to have --with-curl, but I am struggling to get past the build error.

@seanmorris
Copy link
Owner

For this one, I'd need to essentially reimplement libcurl using fetch. Not impossible...

@seanmorris
Copy link
Owner

I've added url_fopen to vrzno. This might not fix curl-specific stuff, but if anyone can fallback on that, its been implemented.

A fetch-based Curl clone is still on the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants