-
Notifications
You must be signed in to change notification settings - Fork 121
libv8 fails to build on Catalina 10.15 #282
Comments
Have you tried this ? |
this will not work with mini racer which requires newer versions of v8 |
@alex-tazy yes i did, nothing :< @ignisf any workarounds maybe or something ? I will be very thankful Thanks :) |
This works for me (macOS Catalina 10.15): gem install libv8 -v '3.16.14.19' -- --with-system-v8 |
If you don’t have system version of v8 (perhaps you have difficulty compiling it anyway or because you’re nervous relying on some package manager which has different version), you can do the following to fix the build:
This assumes you have typical developer setup on Mac – latest Xcode with command-line tools installed. If you’re wondering how to translate this to It took me a lot of time to get to this. Default gyp config for this version of v8 sets deployment target to 10.5 which is no longer supported by the latest version of Xcode. If you raise it just to 10.6, it’ll start complaining about missing header files from standard library. If you include standard library using the hint on command-line, linker will complain it’s not supported for this deployment target. If you raise the deployment target to 10.9, everything will work. But then you can remove explicit stdlib. Eventually, I tried setting deployment target to Catalina (10.15) – and it compiles. Could have saved some time, right? 😅 Possibly, there are other configuration combinations which might be more useful if someone wants to fix this in 3.16 branch while not breaking support for different compilers/OSes. |
@frzng Thank you, it worked here! I spent several hours trying to fix this, and finally, I arrived here 😅 . |
if somebody gets error installing therubyracer, try |
I can confirm this worked on Catalina with ruby 2.1.2p95 (legacy project). I added:
to my .zshrc |
|
This worked for me:
|
@ignisf Trying to upgrade mini_racer to latest on catalina. Edit: actually read the stuff above. Gonna try some stuff. |
You are a freaking hero! Thank you!! |
This is what finally worked for me on Catalina:
|
Nothing in this thread has worked for me so far. I've come across multiple threads in various Github repos and on StackOverflow all suggesting the same steps, and a subset of other participants reporting that these steps are not working. I think people are overlooking this line from the error when running
This sounds to me like the initial compilation of v8, or brew's setting of symlinks, or something, failed. Or, libv8's installer is accepting the string "(Libv8::Location::System::NotFoundError)" as a version or path and then reporting a successful installation when it did not actually succeed. Fwiw, it's at least partly working, as I get this as a result:
If I try removing the
My understanding from brew's post on the matter is that Catalina (and Mojave) don't have libstdc++ anymore. Unfortunately, it has no effect if I try adding the suggested flag: It also made no difference if I set |
Thanks bro!!! <3 Worked on Catalina 10.15.5 |
Hi all, we've published binary versions for Catalina for both the current 7.3 release and the upcoming 8.4 release. Users of |
I'm having the same issue, none of the solutions online works for me. |
I had trouble installing the development dependencies on my local machine and was pointed towards using `mini_racer` over `therubyracer` in this comment: rubyjs/libv8#282 (comment) It seems like therubyracer was previously only used for the tests, so in order to verify that this works I ran `bundle exec rspec` and verified that all tests succeeded.
If you are still struggling, particularly on https://stackoverflow.com/questions/64956972/how-can-i-install-gem-libv8-in-mac-os-big-sur-11-0 For prior to For Apple Silicon M1 chips: Installing the gems I attempted to set up |
@wtfiwtz This issue thread is about problems building on Catalina, which have been resolved. Issues building on Big Sur should be handled in a separate thread. |
Thank You so Much. Working on Catalina 10.15.6 |
Thanks |
I can confirm this works with Monteray 12.2 but bumping up the deployment target to 12.2 |
I just had this problem on an old project with Rails 5 again, where I use Docker with I could install Until I realized, that in my Docker setup I like to use |
macos 10.15.1 Beta (19B86a)
gem version 3.16.14.19
x86_64-darwin19
i tried to compile locally, but still the same error
The text was updated successfully, but these errors were encountered: