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

checking for V8 version... NONE :: configure: error: could not determine libv8 version #496

Closed jhohlfeld closed 1 year ago

jhohlfeld commented 1 year ago

Hi,

when following the instructions in https://github.com/phpv8/v8js/blob/php8/README.Linux.md, I run into problems with the ./configure step:

./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS"
...
checking for V8 Javascript Engine... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for C standard version... c++14
checking how to allow c++14 narrowing... -Wno-narrowing
checking for libv8_libplatform... found
checking for V8 version... NONE
configure: error: could not determine libv8 version

I have compiled v8 version 11.1.155 under Debian 11 inside Docker (see attached Dockerfile).

/opt/v8/{lib,include} is in place and rpath to /opt/v8/lib/*.so was successfully applied.

Is there any known issue regarding the version detection in ./config.m4 for this version of v8?

config.log Dockerfile

stesie commented 1 year ago

Hej,

I haven't tried V8 11.x myself so far to be honest. Yet from a brief look into the config.log file you've posted, the problem seems to be

/opt/v8/include/v8-maybe.h:106:45: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                             ^~~~~~~~~~~~~~~~~~~~~
      |                                             is_lvalue_reference

https://en.cppreference.com/w/cpp/types/is_lvalue_reference states, that is_lvalue_reference_v is a c++17 feature. However config.m4 enables c++14 "only".

Please try changing config.m4 to try c++17 (instead of c++14)

stesie commented 1 year ago

php8 branch tries c++17 auto-detection as well now, hence I'm closing this.