Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Publish libv8-5.9.211.38.1-x86_64-darwin-18.gem to rubygems #275

Closed
courtland opened this issue Nov 30, 2018 · 11 comments
Closed

Publish libv8-5.9.211.38.1-x86_64-darwin-18.gem to rubygems #275

courtland opened this issue Nov 30, 2018 · 11 comments

Comments

@courtland
Copy link

I realize 5.9.211.38.1 is outdated, but I deploy to FreeBSD and develop under macOS, and due to issue #253 I am stuck at mini_racer 0.1.12 w/ libv8 5.9.211.38.1. Would it be possible to publish a binary gem for this version that works with macOS Mojave? Having a hard time getting it to compile manually. Thanks.

@ignisf
Copy link
Collaborator

ignisf commented Dec 1, 2018

Hey, sure!

@ignisf
Copy link
Collaborator

ignisf commented Dec 1, 2018

@courtland
Copy link
Author

courtland commented Dec 3, 2018

Thanks! libv8 seems to install great, but I now have problems with mini_racer 0.1.12 (most recent version that requires a libv8 version that compiles under FreeBSD). I realize this is not exactly a libv8 issue, and mini_racer likely has a fix in newer versions, but I am wondering why it worked under darwin-17 and not 18 (Mojave). Any ideas? Thanks again.

Here is the relevant error log

~/app/console: gem install vendor/cache/libv8-5.9.211.38.1-x86_64-darwin-18.gem 
Successfully installed libv8-5.9.211.38.1-x86_64-darwin-18
Parsing documentation for libv8-5.9.211.38.1-x86_64-darwin-18
Installing ri documentation for libv8-5.9.211.38.1-x86_64-darwin-18
Done installing documentation for libv8 after 0 seconds
1 gem installed

~/app/console: gem install mini_racer -v '0.1.12' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR:  Error installing mini_racer:
	ERROR: Failed to build gem native extension.

    current directory: /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12/ext/mini_racer_extension
/Users/nick/.rvm/rubies/ruby-2.5.3/bin/ruby -r ./siteconf20181203-6349-s8tzd8.rb extconf.rb
checking for -lpthread... yes
checking for -lobjc... yes
creating Makefile

current directory: /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12/ext/mini_racer_extension
make "DESTDIR=" clean

current directory: /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
clang: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
In file included from mini_racer_extension.cc:2:
In file included from /Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby.h:33:
In file included from /Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/ruby.h:2040:
/Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/intern.h:47:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/intern.h:47:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
mini_racer_extension.cc:489:35: error: no member named 'IdleNotification' in 'v8::Isolate'
    return isolate_info->isolate->IdleNotification(NUM2INT(idle_time_in_ms)) ? Qtrue : Qfalse;
           ~~~~~~~~~~~~~~~~~~~~~  ^
mini_racer_extension.cc:705:6: error: no member named 'TerminateExecution' in 'v8::V8'
        V8::TerminateExecution(args->GetIsolate());
        ~~~~^
mini_racer_extension.cc:729:11: error: no type named 'TerminateExecution' in 'v8::V8'
      V8::TerminateExecution(isolate);
      ~~~~^
mini_racer_extension.cc:1002:9: error: no type named 'TerminateExecution' in 'v8::V8'
    V8::TerminateExecution(isolate);
    ~~~~^
2 warnings and 4 errors generated.
make: *** [mini_racer_extension.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12 for inspection.
Results logged to /Users/nick/.rvm/gems/ruby-2.5.3/extensions/x86_64-darwin-18/2.5.0/mini_racer-0.1.12/gem_make.out

@ignisf
Copy link
Collaborator

ignisf commented Dec 3, 2018

Are you certain you've uninstalled all versions of libv8 and mini_racer and fixed the version of libv8 in the gemfile?

@courtland
Copy link
Author

Yeah , I think so. I had the same thought, and just to be sure completely reinstalled ruby with rvm.

~/Downloads: gem list

*** LOCAL GEMS ***

bigdecimal (default: 1.3.4)
bundler (default: 1.16.6)
bundler-unload (1.0.2)
cmath (default: 1.0.0)
csv (default: 1.0.0)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
etc (default: 1.0.0)
executable-hooks (1.6.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
gdbm (default: 2.0.0)
gem-wrappers (1.4.0)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
json (default: 2.1.0)
minitest (5.10.3)
net-telnet (0.1.1)
openssl (default: 2.1.2)
power_assert (1.1.1)
psych (default: 3.0.2)
rake (12.3.0)
rdoc (default: 6.0.1)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
test-unit (3.2.7)
webrick (default: 1.4.2)
xmlrpc (0.3.0)
zlib (default: 1.0.0)
~/Downloads: gem install libv8-5.9.211.38.1-x86_64-darwin-18.gem 
Successfully installed libv8-5.9.211.38.1-x86_64-darwin-18
Parsing documentation for libv8-5.9.211.38.1-x86_64-darwin-18
Installing ri documentation for libv8-5.9.211.38.1-x86_64-darwin-18
Done installing documentation for libv8 after 0 seconds
1 gem installed
~/Downloads: gem install mini_racer -v 0.1.12
Fetching: mini_racer-0.1.12.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing mini_racer:
	ERROR: Failed to build gem native extension.

    current directory: /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12/ext/mini_racer_extension
/Users/nick/.rvm/rubies/ruby-2.5.3/bin/ruby -r ./siteconf20181203-27299-1f6fzjq.rb extconf.rb
checking for -lpthread... yes
checking for -lobjc... yes
creating Makefile

current directory: /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12/ext/mini_racer_extension
make "DESTDIR=" clean

current directory: /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
clang: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
In file included from mini_racer_extension.cc:2:
In file included from /Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby.h:33:
In file included from /Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/ruby.h:2040:
/Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/intern.h:47:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/Users/nick/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/intern.h:47:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
2 warnings generated.
linking shared-object mini_racer_extension.bundle
clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mini_racer_extension.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/nick/.rvm/gems/ruby-2.5.3/gems/mini_racer-0.1.12 for inspection.
Results logged to /Users/nick/.rvm/gems/ruby-2.5.3/extensions/x86_64-darwin-18/2.5.0/mini_racer-0.1.12/gem_make.out

@ryantstone
Copy link

I'm in the exact same situation and am receiving the exact same error. Libv8 is not installed.

@ignisf
Copy link
Collaborator

ignisf commented Dec 4, 2018

ld: library not found for -lstdc++ D:

@hector
Copy link

hector commented Dec 13, 2018

+1
I also need this binary to test locally :)

@drborges
Copy link

Hey there guys! I was running into the very same issue the entire day yesterday, and just now, after reading this thread, I was able to get mini_racer -v '0.1.9' installed on a MacOS Mojave.

Here's what I did:

  1. Downloaded libv8-5.9.211.38.1-x86_64-darwin-18.gem
  2. gem install libv8-5.9.211.38.1-x86_64-darwin-18.gem
  3. gem install mini_racer -v '0.1.9' At this point I was able to reproduce the same error reported by @courtland
  4. Following the instructions on this blog post solved the ld: library not found for -lstdc++.

@ignisf Thanks for putting that binary together, it did save the day <3

@ignisf
Copy link
Collaborator

ignisf commented Dec 15, 2018

@drborges thanks, that's a nice find. I will push it to rubygems!

@ignisf
Copy link
Collaborator

ignisf commented Dec 15, 2018

The binary is pushed to rubygems. For future reference, the old mini_racer versions can be built after applying the workaround here: https://blog.driftingruby.com/updated-to-mojave/ (Mirror in case this link dies)

@ignisf ignisf closed this as completed Dec 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants