Missing ERB dependency on Arch (Cannot load such file -- erb)
Overview
I've tried to run the GDK one-line installation on Arch Linux, and it fails to compile the different ruby versions during the bootstrap phase:
-> ./configure "--prefix=$HOME/.asdf/installs/ruby/3.2.4" --enable-shared --with-ext=openssl,psych,+
-> make -j 4
BUILD FAILED (Arch Linux on x86_64 using ruby-build 20250215)
You can inspect the build directory at /tmp/ruby-build.20250220111753.164246.iundUZ
See the full build log at /tmp/ruby-build.20250220111753.164246.log
Looking at the build logs, one can spot the following error:
[...]
building Rust YJIT (release mode)
/bin/sh ./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp
rbconfig.rb updated
compiling dln.c
compiling localeinit.c
creating verconf.h
./tool/generic_erb.rb:6:in `require': cannot load such file -- erb (LoadError)
from ./tool/generic_erb.rb:6:in `<main>'
make[1]: *** [uncommon.mk:1058: verconf.h] Error 1
make[1]: *** Waiting for unfinished jobs....
Based on further investigation, and mainly thanks to a ruby-build issue, I noticed that it is sufficient to install ERB via the distro package manager to fix the issue:
sudo pacman -S ruby-erb
Impacted categories
The following categories relate to this issue:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Steps to replicate (optional)
- Ensure
ruby-erbis NOT installed locally as part of a distro package - Run the GDK one-line installation
- Notice the compilation issues when the bootstrap phase tries to compile the different ruby versions
- Install
ruby-erbvia the distro package manager - Run
make bootstrapor the whole one-line installation again - Ruby versions should be compiled successfully
Proposal (optional)
I could not yet conclude if this is a generic issue or only caused by my machine. Though I'd propose, if ruby-erb indeed needs to be provided by the OS, the following possible options:
- Add an entry to the troubleshooting/ruby section (happy to contribute that with a MR)
- Include a check and/or installation step in the bootstrap phase to install the missing dependencies
- Alternatively instruct the users to install the missing dependency
Environment (optional)
- Operating system name:
Linux 6.13.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 08 Feb 2025 18:54:55 +0000 x86_64 GNU/Linux - Architecture:
x86_64 - gdk.yml
--- asdf: opt_out: false - Ruby version:
ruby 3.3.7 (2025-01-15 revision be31f993d7) [x86_64-linux] - GDK version:
d41ad4c2
Edited by Michael Hofer