oraoto / pib

PHP in Browser (powered by WebAssembly)
https://oraoto.github.io/pib/
Apache License 2.0
956 stars 112 forks source link

Compile with icu ? #32

Open mhf-ir opened 5 years ago

mhf-ir commented 5 years ago

Could be php wasm compile with icu for using awesome php intl library in client side ?

Dexus commented 4 years ago

@oraoto can you please share your configs and or other informations? i can't get it work to compile or run the configure part. because it's always say

checking for icu-uc >= 50.1 icu-io icu-i18n... no
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:

No package 'icu-uc' found
No package 'icu-io' found
No package 'icu-i18n' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

but I run only your git repo and there is nothing changed yet

oraoto commented 4 years ago

@Dexus Sorry, icu doesn’t compile yet. I should remove --enable-intl in build.sh

Dexus commented 4 years ago

@oraoto okay, i found a way to do it. Will create a PR in the next day's will test a bit and then you will get the PR.

Goddard commented 4 years ago

Awesome thanks, running into this as well.

Dexus commented 4 years ago

Hey, i would like to give a small update: It looks like it works now to compile it. But will need a bit more investigation. But it makes hope, that it will work in the near future.

icu_pib

Goddard commented 4 years ago

What version of the emsdk are you using? I noticed it worked fine when using version 1.39.0, but the latest as 3 days ago failed.

I saw it had something to do with emar instead of emcc or something? I played with it a little but decide to just use a slightly older version and it worked.

Dexus commented 4 years ago

I use the latest emsdk provided via https://github.com/trzecieu/emscripten-docker (I use the Ubuntu version).

my problem is that i don't get the ICU symbols when i compile it at last...

I compile all libs (libxml2, libxslt, ICU) myself, and i see that it use the icu 65.1 but it does not get the symbols yet, same as with the default system ICU62.1 that comes with emsdk as port (you need to build you own with the same version to compile it correctly via -s USE_ICU=1 but again it dont find the symbols.

I will update my fork, tomorrow so you can have a look and maybe you have other ideas.