Skip to content

natives_blob.bin - not found #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rbro opened this issue Sep 22, 2016 · 22 comments
Closed

natives_blob.bin - not found #264

rbro opened this issue Sep 22, 2016 · 22 comments

Comments

@rbro
Copy link
Contributor

rbro commented Sep 22, 2016

I am running CentOS 7 and followed the instructions in README.Linux.md to compile v8. When I try to compile v8js 1.3.2, I'm getting a configure error:

checking for natives_blob.bin... not found
configure: error: Please provide V8 native blob as needed
ERROR: `/tmp/pear/temp/v8js/configure --with-php-config=/usr/local/bin/php-config --with-v8js=/opt/v8' failed

I'm not seeing a file called natives_blob.bin in my v8 directory.

Can you please let me know how to generate this file? I tried installing 1.3.1 instead and the configure worked, but I got a different error during compiling which I believe already was resolved in another issue:

make: *** No rule to make target `/tmp/pear/temp/v8js/v8js_generator_export.cc', needed by `v8js_generator_export.lo'.  Stop.
ERROR: `make' failed

Thanks for your help.

@stesie
Copy link
Member

stesie commented Sep 22, 2016

could you please provide the config.log file contents here

And yes, the latter issue should be fixed meanwhile.

@rbro
Copy link
Contributor Author

rbro commented Sep 22, 2016

Yes, attached is my config.log.

config.log.txt

@stesie
Copy link
Member

stesie commented Sep 22, 2016

the problem is this one

configure:5141: g++ -o conftest -g -O2 -I/opt/v8/include -std=c++11 -I/opt/v8 -Wl,--rpath=/opt/v8/lib -L/opt/v8/lib conftest.cpp -lv8  /opt/v8/lib/libv8_libplatform.a /opt/v8/lib/libv8_libbase.a >&5
g++: error: /opt/v8/lib/libv8_libbase.a: No such file or directory

... it tries to link libv8_libbase.a which apparently doesn't exist, and it even found that out:

configure:5073: checking for libv8_libplatform.a
configure:5084: result: found in /opt/v8/lib
configure:5073: checking for libv8_libbase.a

... but it isn't necessarily needed. Need to check back and try to reproduce (on some other box)

@stesie stesie closed this as completed in 90ca5cb Sep 22, 2016
@stesie
Copy link
Member

stesie commented Sep 22, 2016

Just uploaded version 1.3.3 to PECL that should have that sorted out

@rbro
Copy link
Contributor Author

rbro commented Sep 22, 2016

Thanks for the quick fix. I confirm it's resolved.

pinepain added a commit to phpv8/php-v8 that referenced this issue Sep 27, 2016
There was a report (phpv8/v8js#264) and a fix (phpv8/v8js@90ca5cb) in v8js about missed natives_blob.bin. While php-v8 is not affected directly, it partially uses v8js config so this is a port of that fix.
@Jan-E
Copy link
Contributor

Jan-E commented Oct 7, 2016

Just uploaded version 1.3.3 to PECL that should have that sorted out

@stesie Could you adjust the version number in this repo? It still shows as 1.3.2

@steezeburger
Copy link

steezeburger commented Oct 27, 2016

I'm getting the same errors on MacOS.

Downloading 1.3.3 from PECL's website and refollowing the instructions, I still get the same errors about missing libv8_libbase.a, libv8_libplatform.a, and natives_blob.bin.

Any ideas?

http://hastebin.com/uwutaboson.makefile config.log if interested

Edit: I had to manually copy v8/out/natives_blob.bin and v8/out/snapshot_blob.bin to /usr/local/lib and it seemed to work.

@several27
Copy link

I have this problem as well, missing "out/native/obj.target/src/libv8_libplatform.a" file.

@steezeburger natives_blob.bin and snapshot_blob.bin are missing from out directory as well.

@stesie
Copy link
Member

stesie commented Nov 1, 2016

@Jan-E sure, sorry for messing this up

@stesie
Copy link
Member

stesie commented Nov 1, 2016

@steezeburger I'm a bit unsure/confused, does it work for you now or doesn't it?

I agree that the error message might be misleading, it always complains about missing natives_blob.bin if it isn't able to successfully compile and run a minimalist V8. The problem is that libv8_libbase.a isn't needed on all systems (but some, e.g. MacOS and NixOS Linux need it, Ubuntu Linux doesn't) ... yet libv8_libplatform.a seems to be needed on any platform.

Whether blobs are needed depends on compile flags with V8 itself. It's kindof imposible to detect without just trying and guessing.

So I could change configure to

  • fail if libv8_libplatform.a is missing (and tell exactly that)
  • if libv8_libbase.a is missing, just accept and go on (= no change)
  • if compilation of blob test fails -> tell that (+ hint at config.log file)
  • if blob test-run fails -> explicitly tell that (bit more verbose than current log message)

sounds good?

@several27 which version of V8 are you using?

@stesie stesie reopened this Nov 1, 2016
@steezeburger
Copy link

steezeburger commented Nov 3, 2016

@stesie The last command I was able to run was the ./configure CXXFLAGS="-Wno-c++11-narrowing"

make then fails due to too many errors and warnings

Edit: I believe my errors when running make are from not being on PHP7. I'm currently on 5.6 but will hopefully be upgrading soon for other reasons and to test this.

@mikemherron
Copy link

@stesie Just FYI I am experiencing the same issue as @several27, the libv8_libplatform.a is not generated when building v8, causing the configure command to fail. I'm using V8 5.7.27.

@Jan-E
Copy link
Contributor

Jan-E commented Nov 24, 2016

@mikemherron Smells like the same problem that Windows users are experiencing for every V8 version > 5.1. Ref: http://stackoverflow.com/q/38674676/872051

On Windows you can solve that by

cd obj\v8_libplatform && lib /out:v8_libplatform.lib *.obj
cd obj\v8_libbase && lib /out:v8_libbase.lib *.obj

See my comments in https://github.com/phpv8/v8js/blob/php7/config.w32#L47
I guess there is a comparable link statement on *nix.

@stesie
Copy link
Member

stesie commented Dec 5, 2016

@mikemherron I've now changed config.m4 to pick up libv8_libplatform.so file generated by V8 5.6+

Also fixed that v8js doesn't try to "guess" whether blobs are needed or not. It just uses them, if they are installed along with the libv8.so file.

@stesie stesie closed this as completed Dec 5, 2016
@mikemherron
Copy link

That's great, will try this out over the next few days, thanks.

@sturdynut
Copy link

sturdynut commented Apr 18, 2017

Hello,

I'm running into a very similar issue on CentOS 7. I'd be happy to open a new ticket, but since the errors were nearly identical I figured they were related.

Here is the error from the config.log file:
configure:5069: error: could not find libv8_libplatform library

Here's what I did:

I've installed v8 via:

  • fetch v8
  • cd v8
  • git checkout 5.9.223
    vgclient sync
  • tools/dev/v8gen.py -vv x64.release
  • echo is_component_build = true >> out.gn/x64.release/args.gn
  • ninja -C out.gn/x64.release/
  • sudo mkdir -p /opt/v8/{lib,include}
  • sudo cp out.gn/x64.release/lib*.so out.gn/x64.release/*_blob.bin /opt/v8/lib/
  • sudo cp -R include/* /opt/v8/include/

Then I went to install v8js via:

Here is the error from running the make commands:
make: *** No rule to make target '/usr/local/git-installs/v8js/v8js_generator_export.cc', needed by 'v8js_generator_export.lo'. Stop.

I've attached my config.log

...any ideas? Thanks for the help!! 🙏

config.log.txt

@stesie
Copy link
Member

stesie commented Apr 18, 2017

@sturdynut don't comment on closed tickets, especially not without re-opening them. This is like relying on me to have notifications turned on and handle those (which many tend to not do)

Anyways, regarding your question

... are you really using a fresh checkout? config.log lets me doubt that, since it doesn't seem to do the checks from #301 (which would be needed)

@stesie stesie reopened this Apr 18, 2017
@sturdynut
Copy link

sturdynut commented Apr 18, 2017

@stesie - I'm going to give 5.9.40 a try. I'll let you know if that resolved my problem. Thank you! I was in a rush when I commented, you are right though, thanks!

@sturdynut
Copy link

sturdynut commented Apr 18, 2017

I'm now getting this: checking for libv8_libplatform... checking for libv8_libplatform... configure: error: could not find libv8_libplatform library.

I rebuild v8 using 5.9.40 and am using the master branch from v8js.

I checked my /opt/v8 directory and that file is there.

screen shot 2017-04-18 at 8 41 03 am

@sturdynut
Copy link

I'm going to try this again using php7, I shouldn't be using php 5.6 anyways. I think things should go smoothly with 7. [fingers crossed]

@stesie
Copy link
Member

stesie commented Apr 18, 2017

Yes, #301 wasn't fixed for PHP5, so if you've tried with it before (your comment above implicitly told otherwise) this would be expected

@sturdynut
Copy link

That was my problem. It worked like a charm with php7. This can be closed, thank you.

@stesie stesie closed this as completed Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants