Closed sang4lv closed 9 years ago
/private/tmp/pear/temp/v8js/v8js_class.cc:949:1: error: constant expression evaluates to -1 which cannot be narrowed to type 'zend_uint' (aka 'unsigned int') [-Wc++11-narrowing]
... these are actually caused by PHP internal macros, which cast -1 to unsigned integer. This is of course problematic, but needs to be fixed by PHP folks somewhen. gcc accepts that, but clang doesn't. However you can pass CXXFLAGS="-Wno-c++11-narrowing" to configure to make clang accept that as well. The unfortunate thing is that you have to install manually (i.e. not use pecl then)
See https://medium.com/@mouneyrac/installing-v8js-on-yosemite-65cedc6b728d how to do that.
Changed config.m4
so it auto-adds -Wno-c++11-narrowing
if supported by the compiler.
I am following a post to install v8js, and I got the following output. I have install
v8
via Homebrew (v.4.1.0.27), andlibv8
gem (libv8-3.16.14.9-x86_64-darwin-14).