Skip to content
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

Precompiled Binary Notes - Some Issues I ran Into #33

Open
protosam opened this issue Sep 15, 2018 · 2 comments
Open

Precompiled Binary Notes - Some Issues I ran Into #33

protosam opened this issue Sep 15, 2018 · 2 comments

Comments

@protosam
Copy link

I'm glad to see something like this pop up! I've been looking into embedding v8 engine and Javascript core into applications off an on for years. This is pretty good.

When I did this, I noticed that data.tar.gz does not produce a data/ directory when I tested this in Ubuntu from WSL.

I had to do these exact steps to get it working:

# mkdir libv8 && cd $_
# go get -d github.com/augustoroman/v8
# wget -O libv8.gem https://rubygems.org/downloads/libv8-6.3.292.48.1-x86_64-linux.gem
# tar -xf libv8.gem
# tar -xf data.tar.gz
# ln -s $(pwd)/vendor/v8/include $GOPATH/src/github.com/augustoroman/v8/include
# ln -s $(pwd)/vendor/v8/out/x64.release $GOPATH/src/github.com/augustoroman/v8/libv8
# cd $GOPATH/src/github.com/augustoroman/v8
# go test

I also tried to get the most recent version compiled. I visited https://rubygems.org/gems/libv8/versions/ and found 6.7.288.46.1 initially for linux. The download link was at the bottom right hand side of the page, kinda tucked away.

It might be worth making mention of this for others that want to use this package. Anyway, it's missing object files:

$ wget -O libv8.gem https://rubygems.org/downloads/libv8-6.7.288.46.1-x86_64-linux.gem
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/sam/.wget-hsts'. HSTS will be disabled.
--2018-09-15 14:54:33--  https://rubygems.org/downloads/libv8-6.7.288.46.1-x86_64-linux.gem
Resolving rubygems.org (rubygems.org)... 2a04:4e42::70, 2a04:4e42:400::70, 2a04:4e42:200::70, ...
Connecting to rubygems.org (rubygems.org)|2a04:4e42::70|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8121856 (7.7M) [application/octet-stream]
Saving to: ‘libv8.gem’

libv8.gem                                                              100%[==========================================================================================================================================================================>]   7.75M  22.4MB/s    in 0.3s    

2018-09-15 14:54:34 (22.4 MB/s) - ‘libv8.gem’ saved [8121856/8121856]


$ tar -xf libv8.gem 

$ tar xzf data.tar.gz 

$ ls -lah
total 16M
drwxr-xr-x 1 sam sam 4.0K Sep 15 14:54 .
drwxr-xr-x 1 sam sam 4.0K Sep 15 14:53 ..
-r--r--r-- 1 sam sam  268 Jul  6 07:02 checksums.yaml.gz
-r--r--r-- 1 sam sam 7.8M Jul  6 07:02 data.tar.gz
drwxr-xr-x 1 sam sam 4.0K Sep 15 14:54 ext
drwxr-xr-x 1 sam sam 4.0K Sep 15 14:54 lib
-rw-r--r-- 1 sam sam 7.8M Jul  6 07:45 libv8.gem
-r--r--r-- 1 sam sam  810 Jul  6 07:02 metadata.gz
drwxr-xr-x 1 sam sam 4.0K Sep 15 14:54 vendor

$ find .
.
./checksums.yaml.gz
./data.tar.gz
./ext
./ext/libv8
./ext/libv8/.location.yml
./ext/libv8/location.rb
./ext/libv8/paths.rb
./lib
./lib/libv8
./lib/libv8/version.rb
./lib/libv8.rb
./libv8.gem
./metadata.gz
./vendor
./vendor/v8
./vendor/v8/include
./vendor/v8/include/libplatform
./vendor/v8/include/libplatform/libplatform-export.h
./vendor/v8/include/libplatform/libplatform.h
./vendor/v8/include/libplatform/v8-tracing.h
./vendor/v8/include/v8-inspector-protocol.h
./vendor/v8/include/v8-inspector.h
./vendor/v8/include/v8-platform.h
./vendor/v8/include/v8-profiler.h
./vendor/v8/include/v8-testing.h
./vendor/v8/include/v8-util.h
./vendor/v8/include/v8-value-serializer-version.h
./vendor/v8/include/v8-version-string.h
./vendor/v8/include/v8-version.h
./vendor/v8/include/v8.h
./vendor/v8/include/v8config.h
./vendor/v8/out.gn
./vendor/v8/out.gn/libv8
./vendor/v8/out.gn/libv8/obj
./vendor/v8/out.gn/libv8/obj/libv8_libbase.a
./vendor/v8/out.gn/libv8/obj/libv8_libplatform.a
./vendor/v8/out.gn/libv8/obj/libv8_monolith.a
@augustoroman
Copy link
Owner

Thanks for the info. What version of go and what version of ubuntu/windows were you using?

@protosam
Copy link
Author

@augustoroman
I think I was on go 1.10 at the time of opening this issue. I'm on 1.11 now and the steps are the same for me.

I'm on Ubuntu 18.04 LTS in WSL on Windows 10 version 1803, OS Build 17134.407

After further testing, I think WSL might not be relevant here. With Ubuntu 18.04 LTS in a VM, I found the steps to still be the same as I prior mentioned above.

If you need me to do anything else, let me know. I'd be happy to test anything out to help contribute. I appreciate that this boiler plate exists and it was fun testing this out back when I did.

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

2 participants