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 #139

Closed temuri416 closed 9 years ago

temuri416 commented 9 years ago

Hi,

An attempt to compile v8js on Ubuntu14.10 results in:

checking for gawk... gawk
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... 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 for V8 version... NONE
configure: error: could not determine libv8 version

What could be wrong there?

Thanks!

temuri416 commented 9 years ago

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

temuri416 commented 9 years ago

this did the trick:

sudo cp out/native/lib.target/lib*.so /usr/lib/x86_64-linux-gnu/

v8js now compiles fine.

stesie commented 9 years ago

Well, after all that's what is already written in README.Linux.md file; despite that you've copied to /usr/lib/x86_64-linux-gnu/

I'd assume that you already had libicu installed by Ubuntu's package manager and didn't overwrite it with the version from v8 project (which makes sense); but as libv8 is compiled against its own libicu it doesn't work. Hence the recommendation to place both libv8 as well as its dependencies into a folder off the normal library load paths.

I'm closing this issue now; please re-open if you think current README file doesn't make that clear enough

cheers ~stesie

markhughes commented 9 years ago

Ran into this issue myself,

sudo cp out/native/lib.target/lib*.so /usr/lib/x86_64-linux-gnu/ solved my issue, thanks @temuri416 for pointing this out!

I was following all the instructions in https://github.com/preillyme/v8js/blob/master/README.Linux.md but it did not click that x86_64-linux-gnu was also a factor - maybe a quick side note should be added in?

temuri416 commented 9 years ago

Last time I used this to compile:

https://hub.docker.com/r/stesie/v8js/~/dockerfile/

rosmo commented 9 years ago

Proper distro (ie. not Ubuntu) people might find this useful: https://github.com/rosmo/v8-rpm

stesie commented 9 years ago

@rosmo feel free to add a link to README.Linux.md or so, via a pull request.

zaxap83 commented 6 years ago

in my case (debian stretch x64) - cp out.gn/x64.release/lib*.so /usr/lib/x86_64-linux-gnu/****