(See the tail end of the message.)
On Fri, 28 Nov 2014, David Adam wrote:
> On Thu, 27 Nov 2014, Steve Petrie, P.Eng. wrote:
> > Trying to get fish 2.1.1 shell working (via PuTTY ssh terminal) on
> > DragonFlyBSD 3.8.2 running on a QEMU-KVM virtual machine provided by
> > Elastic Hosts (EH) www.elastichosts.com.
> >
> > DragonFlyBSD 3.8.2 installed with no trouble on the EH VM and seems to
> > be running very well.
> >
> > The DragonFlyBSD login displays the following version string:
> > DragonFly v3.8.2-RELEASE (X86_64_GENERIC) #18: Thu Aug 14 19:42:15 PDT
> > 2014
> >
> > The pkgng installation of fish 2.1.1 shell seemed to work fine.
> >
> > However, when I try to start a fish shell from a tcsh command prompt, it
> > looks like the fish shell might be starting -- the string "fish:" is
> > displayed) -- but from then on it doesn't seem to respond correctly to
> > any keyboard command input on the ssh terminal. It just goes to the next
> > line when I type "exit" and press the <Enter> key, or press <Ctrl+c>:
> > [r...@admin.its-eto] /usr/local/bin (106)# fish
> > fish:
> >
> > ^C
> > ^C
> > exit
> > ^Z
> > quit
> > exit
> >
> > The only way I can find to break out of this fish shell dead end (I'm
> > not smart enough yet with the tcsh shell to create multiple sessions) is
> > to shutdown and start the DragonFlyBSD VM from the Elastic Hosts cloud
> > control panel.
> >
> > * * *
> > * * *
> >
> > These links:
> > a.. https://github.com/fish-shell/fish-shell/issues/1741
> >
> > b.. https://github.com/fish-shell/fish-shell/issues/1064
> >
> > Describe a problem with fish shell on FreeBSD & OpenBSD, similar to what
> > I am experiencing on DragonFlyBSD.
> >
> > Here are snippets from the first of these pages:
> >
> > a.. ... fish is waiting on fishd, and fishd is waiting for fish, so we
> > deadlock. Mysterious. One bright point is that this won't happen on ToT
> > because fishd is gone ... ToT? Is that some future release lingo? ...
> > Sorry, it means Top of Tree. Current trunk. ... Apparently the deadlock
> > problem will disappear with a future release of fish. And there's no
> > patch for the problem in the current version of fish (2.1.1), because
> > the fix is a planned radical architectural change -- namely the
> > elimination of fishd.
> >
> > * * *
> > * * *
> >
> > My questions to the fish developer team are:
> > a.. 1. Is there a predicted / estimated release date for the fish
> > version that will fix this deadlock problem?
>
> There's no particular date beyond Real Soon Now (i.e. when it can be
> finished). The tracking bug is
> https://github.com/fish-shell/fish-shell/issues/1781
>
> I'd like to get a beta done but
> https://github.com/fish-shell/fish-shell/issues/1730 needs resolution
> first.
>
> > b.. 2. If that release date is going to be more than a month in the
> > future, is there any way I could create a patch / workaround to fix this
> > problem in fish 2.1.1? I really REALLY REALLY REALLY want to use fish
> > shell under DragonFlyBSD for a new website project.
>
> I can reproduce this on DragonFlyBSD, so that's exciting.
>
> Turning up the debugging reveals that there is a parse error in fish
> (that's why you get that "fish:" line printed - there's a problem with
> printing the full error message). AFAICT, the problem lies in utf2wcs().
>
> On working platforms, for the standard first line of the fishd file,
> utf2wcs returns:
> L"# This file is automatically generated by the fishd universal variable
> daemon."
> On broken platforms, the string returned is
> L"\000\000\376\377\000\000\000#\000\000\000
> \000\000\000T\000\000\000h\000\000\000i\000\000\000s\000\000\000
> \000\000\000f\000\000\000i\000\000\000l\000\000\000e\000\000\000 ..."
>
> There's an extra byte there and I'm not sure where it came from.
>
> Anyway, I'm not 100% convinced this is what actually causes the problem.
> More investigation is probably required, but I'm out of time for today.
Yes, this was the problem - for some reason iconv doesn't support WCHAR_T
on DragonFlyBSD, so utf2wcs() was using "UCS4" which turns out to have
been very wrong.
The attached patch should fix the problem. If you're going to build from
source, I suggest installing into /opt or /srv so as not to clobber the
pkgng package (use ./configure --prefix=/opt or so).
I don't think this will get merged to as 2.2.0 eliminates this code
entirely; plus the patched code is no less questionable than the code it
replaces.
Let me know (or jump onto IRC) if you have trouble getting this working.
David Adam
fish committer
zanc...@ucc.gu.uwa.edu.au
diff --git a/env_universal_common.cpp b/env_universal_common.cpp
index 2b12cf1..0af6534 100644
--- a/env_universal_common.cpp
+++ b/env_universal_common.cpp
@@ -151,8 +151,8 @@ static const char *iconv_wide_names_4[]=
{
"wchar_t", "WCHAR_T",
"wchar", "WCHAR",
- "ucs-4", "UCS-4",
- "ucs4", "UCS4",
+ "ucs-4LE", "UCS-4LE",
+ "ucs4LE", "UCS4LE",
"utf-32", "UTF-32",
"utf32", "UTF32",
0
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users