public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* tcsh problems with Cygwin on 64-bit Windows Server 2008
@ 2009-01-05 22:11 Freddy Jensen
  2009-01-07 15:52 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Freddy Jensen @ 2009-01-05 22:11 UTC (permalink / raw)
  To: cygwin; +Cc: jensen


I just finished setting up my new 64-bit Windows Server 2008 machine.
One of the final things was to install cygwin on the machine so I
could get all the Unix functionality. However, I ran into a problem
when launching the tcsh shell. I got this error:

"Badly placed ()'s",  and the shell stopped reading the startup file.

I have tracked this down to one element of the PATH environment variables,
namely this one: /cygdrive/c/Program Files ( x86 ) /Microsoft ...."

What happens is that on 64 bit WinServ-2008 the installers for various
programs put native 64-bit applications into C:\Program Files\... and
32-bit applications into C:\Program Files ( x86 ) \... and the installers
then add the path into the environment variables for the user.

When you start a CMD window then the DOS command inherits all the env
vars, including the PATH variable and then when you launch the tcsh
it first reads this file:

/etc/profile.d/lapack.csh

Inside that file there is a loop that evaluates each
path element and it finally chokes on

"/cygdrive/c/Program Files ( x86 ) /Microsoft ...."

because the parens have special meaning to tcsh unless
they are escaped. In my opinion it is a bug in cygwin's
/etc/profile.d/lapack.csh profile script.


Work-around:

After a little fiddling I found out how to work around this problem
without having to modify the cygwin file: /etc/profile.d/lapack.csh:

The only thing that lapack.csh does is to add /usr/lib/lapack to the
path if it is not already there. 

So instead of hacking up /etc/profile.d/lapack.csh I just added this
line to my tcsh batch startup file:

set PATH=

Of course, then I have to make sure that all the other required
paths get added back in so that the tcsh can function correctly.
So basically my Cygwin-tcsh.bat script looks like this now:

---------------------------------------------------------------------
@echo off

C:
chdir C:\cygwin\bin

set HOME=//picard2/jensen

rem Clear PATH to prevent tcsh from choking on "Program Files (x86)"
rem in the file: c:\cygwin\etc\profile.d\lapack.csh

set PATH=

tcsh -i
---------------------------------------------------------------------

where "picard2" is my samba server that connect me to my Unix home dir.

Then in my $HOME/.cshrc file I set up the path like this:

 set path =                     \
 ( $HOME/bin                    \      My own shell scripts
   $HOME/bin/ix86win32          \      My own win and batch scripts
   /usr/local/bin               \      Part of cygwin installation
   /usr/bin                     \      Part of cygwin installation
   /bin                         \      Part of cygwin installation
   /usr/X11R6/bin               \      Part of cygwin installation
   /usr/sbin                    \      Part of cygwin installation
   /sbin                        \      Part of cygwin installation
   /usr/lib/lapack              \      Part of cygwin installation
   /cygdrive/c/Windows/system32 \      Cmd batch scripts for WinServ-08
   /cygdrive/c/Windows          \      Cmd batch scripts for WinServ-08
   /cygdrive/c/WINDOWS/system32 \      Cmd batch scripts for Windows-XP
   /cygdrive/c/WINDOWS          \      Cmd batch scripts for Windows-XP
   /cygdrive/c/Programs/Sysinternals ) Where I installed the Sysinternals Suite

Notice that the comments after each backslash are not present
in my .cshrc, otherwise the '\' wouldn't work correctly.

Of course, long term, it would be desirable to have a better
solution that is less of a hack. I am open for suggestions.

Thanks

--
Freddy Jensen, Sr. Computer Scientist, Adobe Systems Incorporated
345 Park Avenue, San Jose, CA 95110-2704, USA, Ph: (408) 536-2869
Email: jensen@adobe.com, URL: http://www.adobe.com
--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tcsh problems with Cygwin on 64-bit Windows Server 2008
  2009-01-05 22:11 tcsh problems with Cygwin on 64-bit Windows Server 2008 Freddy Jensen
@ 2009-01-07 15:52 ` Corinna Vinschen
  2009-01-07 17:53   ` Christopher Faylor
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2009-01-07 15:52 UTC (permalink / raw)
  To: cygwin

On Jan  5 11:50, Freddy Jensen wrote:
> 
> I just finished setting up my new 64-bit Windows Server 2008 machine.
> One of the final things was to install cygwin on the machine so I
> could get all the Unix functionality. However, I ran into a problem
> when launching the tcsh shell. I got this error:
> 
> "Badly placed ()'s",  and the shell stopped reading the startup file.
> 
> I have tracked this down to one element of the PATH environment variables,
> namely this one: /cygdrive/c/Program Files ( x86 ) /Microsoft ...."
> 
> What happens is that on 64 bit WinServ-2008 the installers for various
> programs put native 64-bit applications into C:\Program Files\... and
> 32-bit applications into C:\Program Files ( x86 ) \... and the installers
> then add the path into the environment variables for the user.
> 
> When you start a CMD window then the DOS command inherits all the env
> vars, including the PATH variable and then when you launch the tcsh
> it first reads this file:
> 
> /etc/profile.d/lapack.csh
> 
> Inside that file there is a loop that evaluates each
> path element and it finally chokes on
> 
> "/cygdrive/c/Program Files ( x86 ) /Microsoft ...."
> 
> because the parens have special meaning to tcsh unless
> they are escaped. In my opinion it is a bug in cygwin's
> /etc/profile.d/lapack.csh profile script.

This is a problem of the lapack package.  Unfortunately the lapack
package is orphaned and nobody volunteered to be the new package
maintainer so far.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tcsh problems with Cygwin on 64-bit Windows Server 2008
  2009-01-07 15:52 ` Corinna Vinschen
@ 2009-01-07 17:53   ` Christopher Faylor
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Faylor @ 2009-01-07 17:53 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 07, 2009 at 03:31:32PM +0100, Corinna Vinschen wrote:
>This is a problem of the lapack package.  Unfortunately the lapack
>package is orphaned and nobody volunteered to be the new package
>maintainer so far.

I've created a new lapack.csh file which should not have this
problem and created a new lapack package - lapack-3.0-6 .

I'm not going to announce this since it isn't really a new release.
Hopefully that won't cause any confusion amongst the horde of
lapack users out there.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-07 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-05 22:11 tcsh problems with Cygwin on 64-bit Windows Server 2008 Freddy Jensen
2009-01-07 15:52 ` Corinna Vinschen
2009-01-07 17:53   ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).