Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775869 - app-admin/sudo-1.9.5_p2-r1 /bin/dash: 0: Illegal option -g
Summary: app-admin/sudo-1.9.5_p2-r1 /bin/dash: 0: Illegal option -g
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash slibtool
  Show dependency tree
 
Reported: 2021-03-13 21:47 UTC by Alessandro Barbieri
Modified: 2021-03-22 17:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sudo-1.9.5_p2-r1:20210313-131025.log (sudo-1.9.5_p2-r1:20210313-131025.log,212.14 KB, text/plain)
2021-03-13 21:48 UTC, Alessandro Barbieri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-03-13 21:47:43 UTC
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
Comment 1 Alessandro Barbieri 2021-03-13 21:48:14 UTC
Created attachment 691239 [details]
sudo-1.9.5_p2-r1:20210313-131025.log

buildlog
Comment 2 Alessandro Barbieri 2021-03-13 21:51:39 UTC
I'm using SHELL=/bin/dash and CONFIG_SHELL=/bin/dash
Comment 3 Ionen Wolkens gentoo-dev 2021-03-14 06:14:02 UTC
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.
Comment 4 orbea 2021-03-20 18:10:26 UTC
> 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
Comment 5 orbea 2021-03-20 19:44:16 UTC
Fails with CONFIG_SHELL=/bin/mksh too, it does not fail with CONFIG_SHELL=/bin/sh when mksh == /bin/sh.
Comment 6 orbea 2021-03-20 20:28:15 UTC
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.
Comment 7 orbea 2021-03-20 20:41:52 UTC
Upstream slibtool issue: https://dev.midipix.org/cross/slibtool/issue/29
Comment 8 orbea 2021-03-21 15:01:19 UTC
Fixed in slibtool-9999.

https://dev.midipix.org/cross/slibtool/c/430840c
Comment 9 orbea 2021-03-22 15:04:54 UTC
Fixed in slibtool-0.5.32.