Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#63112 - [mill] Installed binary does not run when using fish shell

Attached to Project: Community Packages
Opened by diazkun (diaz) - Saturday, 06 July 2019, 23:54 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 07 July 2019, 03:51 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Description:

The installed mill binary at /usr/bin/mill does not include by default a shebang to be run under.

Under fish shell after installing the package and trying to run it the following error appears:

Failed to execute process '/usr/bin/mill'. Reason:
exec: Exec format error
The file '/usr/bin/mill' is marked as an executable but could not be run by the operating system.

I thought it was a general error, but found it is really just because of fish as described here - https://github.com/lihaoyi/Ammonite/issues/813

Under the manual instructions at http://www.lihaoyi.com/mill/index.html#manual a shebang is added to thee binary/script.

The installed package should do the same for it to work as expected.

Additional info:
* package version(s) - affects current version or any other packaged in the same way
* link to upstream bug report, if any - https://github.com/lihaoyi/Ammonite/issues/813

Steps to reproduce:

1. be using fish shell
2. install with pacman -S mill
3. try to run and get the error message about "exec: Exec format error"
This task depends upon

Comment by Eli Schwartz (eschwartz) - Sunday, 07 July 2019, 03:51 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Severity (Medium → Low)
  • Task assigned to Felix Yan (felixonmars)
Supposed to be fixed somehow via https://github.com/lihaoyi/mill/pull/338 but there's no explanation of how to enable this. The script really should set a suitable shebang.

Please note, however, that the fish shell is a laughable joke and should never be used. For numerous reasons, all related to the many, many cases where fish thinks it is too "smart" to do what users expect to do, and will instead do its own homebrew nonsense. However, the specific reason *here* is that it doesn't conform to the widely accepted standard, which is to treat a script that fails with ENOEXEC as a /bin/sh script: https://unix.stackexchange.com/a/373294/264819 (This functionality is baked into libc, just like the functionality to "search the user $PATH for a matching command".)

You will note that absolutely any shell you ever try using will correctly handle this script, even though it is missing a shebang. Except for fish, which will throw a fit and refuse to work.

Loading...