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.83k stars 200 forks source link

GCC 4.4 no longer supported? #142

Closed rosmo closed 9 years ago

rosmo commented 9 years ago

Just tried compiling the latest master and it seems like C++11 closures are being used in a few places (eg. v8js_class.cc:500, v8js_v8object_class.cc:334). Apparently GCC 4.4 doesn't implement those yet, but it's still a pretty commonplace compiler (rhel6). Unfortunately my C++-fu isn't all that great, especially with the new features.

stesie commented 9 years ago

Yes, V8Js meanwhile uses closures and those are supported from GCC 4.5 on only. Since v8 itself requires c++11 also, I don't think that that's too much of a problem though.

rosmo commented 9 years ago

V8 compiles on GCC 4.4 just fine though (4.4 supports a subset of c++11)... I'll look into this a bit later, since we're using RHEL 6.

stesie commented 9 years ago

Which version of v8 do you use?

The latest versions ship a pre-compiled clang compiler (via depot-tools) that's used for compilation; so maybe it works just due to that?

stesie commented 9 years ago

@rosmo ping; how do you compile latest V8 with GCC 4.4? Or do you use an out-dated version?

rosmo commented 9 years ago

@stesie, Yeah, I think I tried compiling it with 3.24.9. I just looked at my V8 4.2 RPM and it's such a mess with the git provided dependencies, I have no idea what it actually used to compile it.

rosmo commented 9 years ago

I'm in process of preparing a proper V8 4.x RPM for EL 6, which uses the new compiler from some centos repo, so I think this can be closed.

rosmo commented 9 years ago

For future reference to anyone attempting compilation on RHEL 6:

export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc
export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
export CXX=/opt/rh/devtoolset-2/root/usr/bin/c++
export PATH=/opt/rh/devtoolset-2/root/usr/bin:$PATH