This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: KSH on Cygwin


I eventually managed to download the pdksh available from
the announcement section of http://cygwin.com, but after
gunzipping it and putting the ksh.exe into a bin directory
(and trying various other variations), I always got "Permission
denied." messages.  So I tried Jon's instructions for installing
the AST KSH (see below).

Following these instructions worked for me, though the
experience was marred aesthetically by little error messages
that flashed across the screen and scrolled away before I
could examine them in detail (eg, chmod could not deal with
the file named '----- README etc etc')

And the AST KSH seems to work now, though I now also have
all of the following files in addition:

/ast/bin/.paths
/ast/bin/ksh                       - plus some DLL files, plus a dozen or so other files
/ast/fun/dirs                      - plus popd, pushd
/ast/include/ast/align.h           - plus 93 more
/ast/include/prototyped.h
/ast/lib/file/magic
/ast/lib/lib/ast                   - plus 7 more files
/ast/lib/libast.dll.a              - plus 3 more
/ast/lib/make/MSGFUN.mk            - plus 4 more files
/ast/lib/package/gen/ast-ksh.ins   - plus 9 more files
/ast/lib/package/LICENSES/ast
/ast/lib/probe/C/probe
/ast/man/man1/sh.1
/ast/man/man3/ast.3                - plus 54 more files

All of this unexplained extra baggage makes me uneasy -- more
potential sources of conflict with existing resources...

Following Jon's advice, I put /ast/bin into my PATH, where
it picks up /ast/bin/ksh.  However, /usr/bin/man did not pick
up the /ast/man/man1 pages.  Moreover, the man page is here named
"sh.1" not (as "ksh.1" as I would have expected).  The command
"cp /ast/man/man1/sh.1 /usr/man/man1/ksh.1" fixed this, so that
I can run "man ksh" and get a result (along with a warning about
special character dg), but the man page actually says it is for
sh, so maybe this is not a ksh page after all??

I was then able to port an important old Korn shell of mine
from the MKS to the Cygwin environment (once I had changed
every #!e:/mks/mksnt/sh.exe to #!/usr/bin/ksh and every egrep
to grep -E).  However, an old KSH script of mine runs more
than three times more slowly under Cygwin than under MKS
(23 versus 7 seconds).

Okay, the KSH seems to be working under Cygwin at last,
but I'm not sure what I gain with the slower execution; the
extra binaries and related baggage; and the dodgy man page.
A simple Cygwin setup option that installs a binary and a
man page would have been less confusing.

Tom

On Sun, Jun 16, 2002 at 02:13:22AM -0400, Jon LaBadie wrote:
> Here is what I did.  Originally with the 3/?? versions, then with the
> 6/14/2002 versions.  It is very similar to what you did, but it worked :)
> 
> Download the INIT and either ast-ksh, ast-base, or ast-open for cygwin.
> The three ast-* packages differ in the number of executable's included
> in the packages, from about 5 in ast-ksh to over 100 in ast-open.  Many
> of the latter have counterparts in cygwin's /bin (ex chmod, ls, ...).
> 
> I put the downloaded *.tgz files in /tmp and used an empty directory
> /tmp/ast for extraction.  The INIT package was extracted as you did,
> creating bin, lib, arch, and ???.  Leaving the other package in /tmp,
> I then ran bin/package read /tmp/ast-????*, i.e. mentioning the package
> by its pathname.
> 
> Using the 6/14 versions, the above "read" succeeded for me with any of
> the 3 ast-* packages, as long as I only read one of them.  Sometimes,
> when I tried to read 2 or 3 of the ast-* packages, one after the other,
> or tried to "reread" a package, I got a hang much like you describe.
> 
> A successful "read" extracts the ast-* package under arch/cygwin/*.
> Created are bin, lib, man, fun (ksh functions) and other dirs.
> 
> For a while I just copied a couple of the cmds under
> /tmp/ast/arch/cygwin/bin to /bin.  ksh seemed to work fine this way.
> 
> Later I decided to load the entire ast-open package on my system.
> After extracting it in /tmp/ast/arch/cygwin, I moved all the subdirs
> under /ast.  Now I include /ast/bin in my PATH.

-- 
Dr. Thomas Baker                                Thomas.Baker@bi.fhg.de
Institutszentrum Schloss Birlinghoven          mobile +49-171-408-5784
Fraunhofer-Gesellschaft                          work +49-30-8109-9027
53754 Sankt Augustin, Germany                     fax +49-2241-14-2619

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]