make[1]: Entering directory '/var/tmp/portage/app-admin/sudo-1.9.5_p2-r1/work/sudo-1.9.5p2/lib/util' /bin/dash ../../scripts/mkinstalldirs /var/tmp/portage/app-admin/sudo-1.9.5_p2-r1/image/usr/libexec/sudo mkdir /var/tmp/portage/app-admin/sudo-1.9.5_p2-r1/image/usr/libexec mkdir /var/tmp/portage/app-admin/sudo-1.9.5_p2-r1/image/usr/libexec/sudo case "-Wl,--version-script,util.map" in \ *-no-install*) ;; \ *) if [ X"yes" = X"yes" ]; then \ INSTALL_BACKUP='' slibtool --tag=disable-static --quiet --mode=install /bin/dash ../../install-sh -c -o 0 -g 0 libsudo_util.la /var/tmp/portage/app-admin/sudo-1.9.5_p2-r1/image/usr/libexec/sudo; \ fi;; \ esac /bin/dash: 0: Illegal option -g slibtool: exec error upon slbt_exec_install_entry(), line 380: (see child process error messages). slibtool: < returned to > slbt_exec_install(), line 705. make[1]: *** [Makefile:285: install] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-admin/sudo-1.9.5_p2-r1/work/sudo-1.9.5p2/lib/util' make: *** [Makefile:190: install] Error 2 * ERROR: app-admin/sudo-1.9.5_p2-r1::gentoo failed (install phase): * emake failed
Created attachment 691239 [details] sudo-1.9.5_p2-r1:20210313-131025.log buildlog
I'm using SHELL=/bin/dash and CONFIG_SHELL=/bin/dash
This seems to be due to a combination of slibtool and CONFIG_SHELL=/bin/dash, individually both work. Furthermore, /bin/sh == dash + slibtool works fine too, seems to be because you're setting CONFIG_SHELL.
> Furthermore, /bin/sh == dash + slibtool works fine too, seems to be because you're setting CONFIG_SHELL. Does it actually use /bin/sh without CONFIG_SHELL? This looks suspicious: slibtool --tag=disable-static
Fails with CONFIG_SHELL=/bin/mksh too, it does not fail with CONFIG_SHELL=/bin/sh when mksh == /bin/sh.
I think this is a slibtool bug. https://dev.midipix.org/cross/slibtool/blob/f23d994965845536db0e6b21fc9c65091184b3f5/f/src/logic/slbt_exec_install.c#_593 In slibtool both /bin/sh and /bin/bash are hardcoded so that the options, '-c -o 0 -g 0' are passed to install-sh while when using /bin/dash or /bin/mksh they are passed to passed to the shell instead. I think slibtool should probably not assume /bin/sh or /bin/bash. Its also arguably that sudo should not be using install-sh to install .la files and that users should probably set their /bin/sh symlink appropriately instead of setting CONFIG_SHELL=/bin/dash, if necessary set CONFIG_SHELL=/bin/sh.
Upstream slibtool issue: https://dev.midipix.org/cross/slibtool/issue/29
Fixed in slibtool-9999. https://dev.midipix.org/cross/slibtool/c/430840c
Fixed in slibtool-0.5.32.