After some digging, I figured that I needed gcc6
.
There is a line at the docs on https://github.com/rbenv/ruby-build/wiki#arch-linux, but not much information on how to use it:
If needed, install
gcc6
from the AUR.
Here is how to do it:
Install gcc6
from AUR (note: takes a long time to compile)
Install with:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/lib/openssl-1.1 --with-gcc=gcc-6" asdf install ruby 3.1.0