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

configure: error: could not determine libv8 version #239

Closed xprt64 closed 8 years ago

xprt64 commented 8 years ago

I'm trying to compile php-v8js itself but I get this error: configure: error: could not determine libv8 version

This is the log from ./configure:

root@machine:/tmp/v8js# ./configure 
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
checking for gawk... gawk
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr/local
found in /usr
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++11
checking how to allow c++11 narrowing... 
checking for V8 version... NONE
configure: error: could not determine libv8 version

This is my machine:

# cat /proc/version
Linux version 3.10.0-327.10.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Tue Feb 16 17:03:50 UTC 2016
stesie commented 8 years ago

could you please provide the contents of the config.log file, it should contain the exact compiler error thrown

xprt64 commented 8 years ago

config.log.txt

stesie commented 8 years ago

... from the log

./conftest: symbol lookup error: /usr/lib/libv8.so: undefined symbol: _ZTVN6icu_5613UnicodeStringE

... so V8 library is either not compiled or not installed well.

How did you compile V8 and where did you install it to? Did you compile against V8's libicu and not install it?

V8's build compiles example & debug commands, d8, lineprocessor et al. Do those work?

stesie commented 8 years ago

a shot in the dark: you compiled V8 against its internal libicu, installed both off /usr/lib and the runpath in libv8.so is configured wrong.

try

$ chrpath -r '$ORIGIN' /path/to/libv8.so
stesie commented 8 years ago

no feedback, therefore closing. Feel free to re-open as needed.