Build Yjit on my mac
Follow the official document : ruby/yjit
Step
clone the repo and enter the directory
git clone https://github.com/ruby/ruby yjit cd yjit
install the deps first:
brew install openssl readline libyaml
build:
./autogen.sh ./configure --enable-yjit=dev --prefix=$HOME/.rbenv/versions/ruby-yjit --disable-install-doc --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml)" make -j install
I'm use
rbenv
, so I change the--prefix
option to the rbenv versions directory.Use
rbenv versions rbenv global ruby-yjit
Problem
Haven't
id.h
Solve: rebuild ruby-yjit and success
Bison version it to low
Solve: install the lastest version Bison and add export it:
brew install bison export PATH="/opt/homebrew/opt/bison/bin:$PATH"