phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

"unicode/uchar.h" not found while building V8 #238

Closed teameh closed 8 years ago

teameh commented 8 years ago

Trying to build V8 from scratch for usage with php. Following this guide: https://github.com/phpv8/v8js/blob/php7/README.Linux.md

But got stuck on this error while building with Gyp:

fatal error: 'unicode/uchar.h' file not found #include "unicode/uchar.h"

It doesn't seem to be related to V8.. but here's the full log: https://gist.github.com/tiemevanveen/9da423d5afeb120d9eb026d8727b8ddc

I did install libicu-dev.. so the unicode/uchar.h header should be present right? What am I doing wrong?

teameh commented 8 years ago

Follow up issue for https://github.com/phpv8/v8js/pull/237 upon @stesie's request.

I did not create an issue here in the first place because I thought that my issue did not lie with phpv8 but with v8 itself.. But any help is very welcome!

Which version of V8 are you trying to compile?

Latest.

Trying to build v8 with it's own version of libicu now..

teameh commented 8 years ago

Same thing.. https://gist.github.com/tiemevanveen/cee253baa630fc44b2e1b05a3ee161e8

Line 2 $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git Line 13 $ export PATH=pwd/depot_tools:"$PATH" Line 16 $ fetch v8 Line 35 $ cd v8 Line 38 $ gclient sync Line 101 $ export GYPFLAGS="-Dv8_use_external_startup_data=0" Line 104 $ export GYPFLAGS="${GYPFLAGS} -Dlinux_use_bundled_gold=0" Line 107 $ make native library=shared snapshot=on -j8

Or might I still be building with system icu because I've set that flag earlier.. I reloaded vagrant..

teameh commented 8 years ago

Just retried with V8 v5.1.99 and I don't have any unicode problems there.. https://gist.github.com/tiemevanveen/61cc1d5980abcd7f45e3aeb93e8214bf

stesie commented 8 years ago

I've tried with latest version as well, ... and seems like its currently broken ... tried with Debian Jessie and Ubuntu Precise. I'm not yet sure if it's a temporary problem with their build system or things really have changed (but feels more like the former)

teameh commented 8 years ago

Weird right? I feel like we should file an issue on their side but their issue tracker it not really easy to deal with.. (And I'm lacking the knowledge)

stesie commented 8 years ago

filed an issue on V8's tracker --> https://bugs.chromium.org/p/v8/issues/detail?id=5177

laukaichung commented 8 years ago

Mine is stuck at this error too. I follow your guideline

stesie commented 8 years ago

... as the bug on V8 issue tracker is still open and they say that the use_system_icu feature is a best effort one, I'd change the build recipe back to using V8's internal libicu ...