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

Building failure on macOS Monterey (12.4) #251

Closed
NeoNeuron opened this issue May 24, 2022 · 8 comments
Closed

Building failure on macOS Monterey (12.4) #251

NeoNeuron opened this issue May 24, 2022 · 8 comments

Comments

@NeoNeuron
Copy link

I tried to install mini_racer-0.6.2, either using gem or bundle, and got the following error log. It seems like an issue of compiler ldflags, and I'm wondering whether I can manually customize the flags by replacing with -std=c++11. Or is there anyway else to fix this issue? Thanks!

current directory: /Users/kchen/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mini_racer-0.6.2/ext/mini_racer_extension
/Users/kchen/.rbenv/versions/3.0.2/bin/ruby -I /Users/kchen/.rbenv/versions/3.0.2/lib/ruby/3.0.0 -r ./siteconf20220524-91238-bi0vse.rb extconf.rb
checking for -lpthread... yes
checking for -lobjc... yes
creating Makefile

current directory: /Users/kchen/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\= clean

current directory: /Users/kchen/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/mini_racer-0.6.2/ext/mini_racer_extension
make DESTDIR\=
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.bundle
g++-11: error: unrecognized command-line option '-stdlib=libc++'
make: *** [mini_racer_extension.bundle] Error 1

make failed, exit code 2

The gem environment I use is show below.

RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.22
  - RUBY VERSION: 3.0.2 (2021-07-07 patchlevel 107) [x86_64-darwin21]
  - INSTALLATION DIRECTORY: /Users/kchen/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0
  - USER INSTALLATION DIRECTORY: /Users/kchen/.gem/ruby/3.0.0
  - RUBY EXECUTABLE: /Users/kchen/.rbenv/versions/3.0.2/bin/ruby
  - GIT EXECUTABLE: /Library/Developer/CommandLineTools/usr/bin/git
  - EXECUTABLE DIRECTORY: /Users/kchen/.rbenv/versions/3.0.2/bin
  - SPEC CACHE DIRECTORY: /Users/kchen/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/kchen/.rbenv/versions/3.0.2/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-darwin-21
  - GEM PATHS:
     - /Users/kchen/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0
     - /Users/kchen/.gem/ruby/3.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/kchen/.rbenv/versions/3.0.2/bin
     - /usr/local/Cellar/rbenv/1.2.0/libexec
     - /Users/kchen/.gem/ruby/3.0.2/bin
     - /Users/kchen/.rbenv/shims
     - /Applications/Julia-1.5.app/Contents/Resources/julia/bin
     - /Users/kchen/miniconda3/bin
     - /Users/kchen/miniconda3/condabin
     - /Library/Developer/CommandLineTools/usr/bin
     - /usr/local/opt/llvm/bin
     - /usr/local/opt/ruby/bin
     - /usr/local/lib/ruby/gems/3.0.2/bin
     - /Users/kchen/.rbenv/shims
     - /usr/local/opt/ruby/bin
     - /usr/local/go/bin
     - /Applications/workbench/bin_macosx64
     - /usr/local/texlive/2018/bin/x86_64-darwin
     - /Users/kchen/install/linux-19.2.0/tools/perf
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Library/TeX/texbin
     - /opt/X11/bin
@jzhang-0
Copy link

I also have the issue.

@vocdex
Copy link

vocdex commented Jun 18, 2022

I had the same issue when building jekyll-folio theme.

@tisba
Copy link
Collaborator

tisba commented Dec 9, 2022

Hey @NeoNeuron, @jzhang-0, @vocdex 👋

Any of you still on macOS 12.4 (Monterey)? Could you try this again and make sure you run on the latest version of rubygems (3.3.26 I think)?

I'm not entirely sure, but that might also be related how rbenv sets up Ruby.

Unfortunately I don't have Monterey to reproduce with updated versions…

@Frexuz
Copy link

Frexuz commented Jan 25, 2023

Still failing here. Monterey, Rubygems 3.4.5.

mini_racer (0.6.3)
  libv8-node (~> 16.10.0.0)

@crookedneighbor
Copy link

Failing for me on Mac OS Ventura, 13.3

mini_racer (0.6.3)
  libv8-node (~> 16.10.0.0)

@tisba
Copy link
Collaborator

tisba commented May 23, 2023

Can you give more context, @Frexuz, @crookedneighbor? Exact macOS version, what exact error message are you getting etc etc.

I just used tart to get myself a Monterey (12.6) VM. Just installed "Xcode Command Line Tools" and rvm. Used rvm to install Ruby 3.2.2 and had no issues installing mini_Racer 0.6.3 at all.

I'm happy to look further, but again, need more information. Please also make sure to follow https://github.com/rubyjs/mini_racer#supported-ruby-versions--troubleshooting, update to the latest available Ruby, rubygems and bundler.

@tisba
Copy link
Collaborator

tisba commented May 26, 2023

Just tested and confirmed with the newly released mini_racer 0.6.4 under Monterey 12.6 and Ventura 13.4. Works out of the box.

Since we're lacking information on the issue, and a few new macOS and mini_racer versions were released, I'm going to close this one now. Please let me know if the issue persists!

@tisba tisba closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2023
@crookedneighbor
Copy link

@tisba it looks like I was able to install with the new version! Thanks!

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

6 participants