15
12
Is it possible to use the fish shell with cygwin? I wasn't able to compile the source in cygwin, and I didn't find any precompiled packages. Is there a good reason for not having fish in cygwin?
15
12
Is it possible to use the fish shell with cygwin? I wasn't able to compile the source in cygwin, and I didn't find any precompiled packages. Is there a good reason for not having fish in cygwin?
23
fish shell 2.1.0 is now officially supported in Cygwin, it's possible to install it using the default installer.
15
Here's how I managed to compile fish in Cygwin.
First, make sure we have the following cygwin packages:
libncurses-devel
libiconv
autoconf
(not a really a dependency of fish, but we need it for a later step)Next, download the latest source from http://fishshell.com (I used fish-1.23.1.tar.gz). Extract the source to your directory of choice and cd to it:
$ tar zxvf fish-1.23.1.tar.gz -C /usr/local/src/
$ cd /usr/local/src/fish-1.23.1/
configure.ac
to remove checks for iconv
Now for some reason, ./configure
cannot detect libiconv
properly. To get around the problem we remove the check for it (we'll specify the lib manually later). To do so, we edit configure.ac
and remove checks for iconv_open
. Searching for iconv_open
reveals 3 occurences; we comment them all out. So, from:
AC_SEARCH_LIBS( iconv_open, iconv, ....)
We change to:
#AC_SEARCH_LIBS( iconv_open, iconv, ....)
./configure
Next, we rebuild the ./configure
script by running autoconf
then run the configure script:
$ autoconf && ./configure
Makefile
to include correct path to curses.h
Another problem I faced was with curses.h
-- gcc couldn't find it. A quick search revealed that it's in /usr/include/ncurses
.
The Makefile
has a hardcoded include path for it in CFLAGS
, but it points to /usr/local/include/ncurses
instead.
So, we edit Makefile
and change:
CFLAGS = -I/usr/local/include/ncurses -std=c99 ....
to
CFLAGS = -I/usr/include/ncurses -std=c99 ...
LDFLAGS
to link in libiconv
, and we're ready to compile/install.Finally, we export the necessary LDFLAGS
to link in iconv
, then compile and install!
$ export LDFLAGS="-liconv"
$ make && make install
fish
$ fish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
me@home /u/l/s/fish-1.23.1>
2Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. – Ashildr – 2013-10-14T16:12:28.660
+1 I can confirm the steps above should work. I also added
#define HAVE_NCURSES_H 1
in the generated header fileconfig.h
(for the same reasons stated above) – Amro – 2011-08-26T21:35:36.773I've installed libiconv and set LDFLAGS, but I still get an error: set_color.c:16:20: curses.h: No such file or directory set_color.c: In function
translate_color': set_color.c:116: warning: implicit declaration of function
strcasecmp' set_color.c: In functionmain': set_color.c:333: error:
ERR' undeclared (first use in this function) – muriloq – 2011-08-29T22:12:14.990I saw that error initially too. Have you installed
libncurses-devel
and changed the changed the-I
path in the `Makefile (step 5)? – Shawn Chin – 2011-08-30T00:21:10.000Yes, I even reinstalled libncurses-devel again, just to be sure. Perhaps there's another dependency that was already present in your system? Looking for the error message I've found the following bug report: http://sourceforge.net/tracker/?func=detail&aid=928085&group_id=1523&atid=101523
– muriloq – 2011-09-02T12:43:33.200@muriloq Sounds like
curses.h
is not being included (ERR
is defined there). Can you have a peek at/usr/include/ncurses/
and see if it's there? – Shawn Chin – 2011-09-02T13:52:25.777