Bug 196661 - shells/fish: fish shell is not accepting any commands
Summary: shells/fish: fish shell is not accepting any commands
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: easy, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-01-12 21:25 UTC by Jochen Breuer
Modified: 2015-04-18 13:22 UTC (History)
6 users (show)

See Also:
freebsd.users: maintainer-feedback+


Attachments
diff -ruN output (492 bytes, patch)
2015-01-18 09:29 UTC, martin
koobs: maintainer-approval-
Details | Diff
patch to fish to use alternative types (745 bytes, patch)
2015-01-18 14:41 UTC, David Adam
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Breuer 2015-01-12 21:25:57 UTC
After installing (with pkg) and starting the fish shell, the only output is: "fish:"

Although it is possible to type, no command is accepted and it is not possible to exit the shell with `exit` or CTRL+d. I could reproduce this with FreeBSD 10.1 on a AMD64 and i386 installation.
Comment 1 Jochen Breuer 2015-01-17 00:31:10 UTC
Someone already reported this upstream: https://github.com/fish-shell/fish-shell/issues/1741

Seems to be fixed in HEAD of the GitHub repository.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2015-01-18 00:24:52 UTC
Fix Summary and notify maintainer.
Comment 3 martin 2015-01-18 08:37:52 UTC
shell/fish should be marked as broken because of missing WCHAR_T support in libiconv, according to the comments on Github.

I ran into the same issue.
Comment 4 martin 2015-01-18 09:29:01 UTC
Created attachment 151784 [details]
diff -ruN output
Comment 5 David Adam 2015-01-18 14:41:29 UTC
Created attachment 151788 [details]
patch to fish to use alternative types
Comment 6 David Adam 2015-01-18 14:44:05 UTC
So the problem AFAIK is that between 10.0 and 10.1, 'WCHAR_T' was removed as encoding alias in revision 260249 (https://svnweb.freebsd.org/base?view=revision&revision=260249). fish has some old (and probably wrong) code that breaks when that encoding is not available.

This whole module is gone in development versions but a new release is still not around the corner so I have attached a patch which requests a different encoding (which is probably more accurate); you can give that a go too.
Comment 7 freebsd.users 2015-01-18 15:12:04 UTC
(In reply to David Adam from comment #6)

This patch will resolve WCHAR_T issue. Sorry for the delays, David sent this to me earlier but due to certain bugzilla issues I could not sort it. Please commit this patch.

Thanks everyone.
Comment 8 Attila Györffy 2015-01-30 00:19:53 UTC
I've ran into the same issue that Jochen explained before. I can confirm that compiling fish-shell HEAD (at the time of writing 1ff9aba6b18bd49295cf30de2a2ce7a11013c7cf) does indeed solve the problem.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2015-01-30 03:54:57 UTC
Maintainer, are both patches needed to commit, and if so, can you approve both please. If not, please clarify.
Comment 10 David Adam 2015-01-30 04:27:47 UTC
I'm not the maintainer, only an upstream committer, but you only need one of the patches. The first is probably saner, but pulls in an additional dependency on some systems.
Comment 11 freebsd.users 2015-01-30 06:49:44 UTC
Looks good to me. Please commit these patches.
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2015-01-30 12:18:46 UTC
(In reply to freebsd.users from comment #11)

Seems both are not required. Can you set the maintainer-approval flags to '+' for the one patch you would like committed please. Set - on the other.
Comment 13 freebsd.users 2015-01-30 15:19:58 UTC
Comment on attachment 151788 [details]
patch to fish to use alternative types

+
Comment 14 freebsd.users 2015-01-30 15:20:50 UTC
Comment on attachment 151784 [details]
diff -ruN output

-
Comment 15 Jeffrey Gelens 2015-03-13 21:24:40 UTC
The patch is working for me. I only applied the first one.
Comment 16 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-18 08:28:44 UTC
Comment on attachment 151784 [details]
diff -ruN output

Maintainer added a comment (-) instead of changing the 'maintainer-approval' field/flag. Update flag to match intent.
Comment 17 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-18 08:30:34 UTC
Other than the fact that attachment 151788 [details] needs to be produced against the *ports tree* source, not the upstream source, the change is OK, and approved.
Comment 18 commit-hook freebsd_committer freebsd_triage 2015-04-18 13:21:45 UTC
A commit references this bug:

Author: koobs
Date: Sat Apr 18 13:20:53 UTC 2015
New revision: 384226
URL: https://svnweb.freebsd.org/changeset/ports/384226

Log:
  shells/fish: Fix for hangs on FreeBSD 10.1+

  Fix for hangs on FreeBSD 10.1+ due to WCHAR_T missing as an alias for
  UCS-4-INTERNAL.

  [1] https://github.com/fish-shell/fish-shell/issues/1741

  PR:		196661
  Submitted by:	David Adam <zanchey ucc.gu.uwa.edu.au>
  Approved by:	maintainer <freebsd.users gmail com>

Changes:
  head/shells/fish/Makefile
  head/shells/fish/files/patch-env__universal__common.cpp
Comment 19 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-18 13:22:41 UTC
Committed, thank you all