Runit is not compiling and `gdk install` fails on Arch Linux

Overview

With #2439 (closed) resolved, I continued with the one-line installation on Arch Linux. Though when running gdk install it immediately complained about runit not being available:

gdk install

ERROR: Runit is not installed or not available in your PATH.
make[1]: *** [support/makefiles/Makefile.config.mk:260: preflight-checks-run] Error 1
make: *** [support/makefiles/Makefile.timing.mk:4: preflight-checks-timed] Error 2
❌️ ERROR: Failed to install.

Looking at the bootstrap mechanism, it seems bootstrap-common.sh should take care of installing runit from AUR. Running bootstrap-packages in debug mode indicates where the problem is:

INFO: Installing runit
+ cd /tmp
+ git clone --depth 1 https://aur.archlinux.org/runit-systemd.git
Cloning into 'runit-systemd'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 0), reused 7 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (7/7), done.
+ cd runit-systemd
+ makepkg -sri --noconfirm
==> Making package: runit-systemd 2.1.2-2 (Fri 21 Feb 2025 11:23:07 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading runit-2.1.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   167  100   167    0     0   2071      0 --:--:-- --:--:-- --:--:--  2087
100  108k  100  108k    0     0   657k      0 --:--:-- --:--:-- --:--:--  657k
  -> Found _sv
  -> Found runit.service
==> Validating source files with sha256sums...
    runit-2.1.2.tar.gz ... Passed
    _sv ... Passed
    runit.service ... Passed
==> Extracting sources...
  -> Extracting runit-2.1.2.tar.gz with bsdtar
==> Starting prepare()...
==> Starting build()...
sh find-systype.sh > systype
rm -f compile
sh print-cc.sh > compile
chmod 555 compile
rm -f choose
cat warn-auto.sh choose.sh \
> choose
chmod 555 choose
./choose c trydrent direntry.h1 direntry.h2 > direntry.h
rm -f load
sh print-ld.sh > load
chmod 555 load
./choose cl tryflock hasflock.h1 hasflock.h2 > hasflock.h
./choose cl trymkffo hasmkffo.h1 hasmkffo.h2 > hasmkffo.h
./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h
./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h
./compile chkshsgr.c
chkshsgr.c: In function ‘main’:
chkshsgr.c:10:19: error: passing argument 2 of ‘getgroups’ from incompatible pointer type [-Wincompatible-pointer-types]
   10 |   if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
      |                   ^
      |                   |
      |                   short int *
In file included from /usr/include/features.h:524,
                 from /usr/include/unistd.h:25,
                 from chkshsgr.c:3:
/usr/include/bits/unistd.h:147:19: note: expected ‘__gid_t *’ {aka ‘unsigned int *’} but argument is of type ‘short int *’
  147 |                   __fortify_clang_overload_arg (__gid_t *, ,  __list)))
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
chkshsgr.c:10:32: error: implicit declaration of function ‘setgroups’; did you mean ‘getgroups’? [-Wimplicit-function-declaration]
   10 |   if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
      |                                ^~~~~~~~~
      |                                getgroups
make: *** [Makefile:177: chkshsgr.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
+ return 0
+ mark_platform_as_setup packages_arch.txt

The problem seems to be twofold:

  • Runit doesn't compile at all. Having a look at the 2.1.2 AUR package, it seems there was no update since 2017 which could explain the issues. The upstream runit project seems to have released 2.2.0 in the meantime.
  • The script falsely returns 0 even though an error occurred.

Impacted categories

The following categories relate to this issue:

Steps to replicate (optional)

  • Ensure runit-systemd is NOT installed locally as part of a distro package
  • Run the GDK one-line installation
  • Notice that no error is thrown, and the installation completes
  • Run gdk install, which will fail as runit is missing

Proposal (optional)

Happy to work on this issue, and I've already taken a few steps:

  • Extend the makepkg step with a return 1
    • makepkg -sri --noconfirm || return 1
    • I still need to do some debugging if that actually resolves the problem
  • Update to the latest and greatest runit version, ensure the AUR package is being maintained
    • I've already adjusted the PKGBUILD file to use 2.2.0, which seemed to have compiled just fine
    • Thus I "adopted" the orphaned AUR package and I'm working on published a new release

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