X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <495EC6A3.60009@speakeasy.net> Date: Fri, 02 Jan 2009 21:00:03 -0500 From: Eric Hui User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Re: 1.5.25: Cygwin, LAPACK, and ssh -- output "swallowed" References: <21254779 DOT post AT talk DOT nabble DOT com> In-Reply-To: <21254779.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Jim Kramer wrote: > > Eric Hui wrote: >> Jim Kramer wrote: >> >>> Concise problem description: >>> A C/C++ program that incorporates LAPACK functions "swallows" program >>> output when run (as a command) over an ssh connection. >> This may be an issue with your path. In your example 1, try >> >> ssh hollyberry echo '$PATH' >> >> The LAPACK dll is in /usr/lib/lapack/, so that will need to be in >> your path. >> >> > > Yes, thank you, that resolved it. To be sure I understand why it wasn't > working as I expected: > > When sending a command via ssh, no shell is started and therefore the cygwin > environment (in this case, the library path) is not fully configured. So, > the appropriate path needs to be added someplace such that *Windows* (not > Cygwin) can find it (e.g., the Windows PATH environment variable). Do I have > that right? Not completely. I believe that the issue is whether or not it is a login shell. On my system, when a login shell (bash) is started, it sources /etc/profile, which in turn sources /etc/profile.d/lapack.sh, which adds the appropriate directory to the path. If bash is not run as a login shell (as in your example 1), it does not source /etc/profile. > Also, a follow-up question: is there another method for setting paths that > would work under these circumstances? For instance, symbolic links to the > LAPACK library? Not sure what the recommended method would be. You could just have your .bashrc add the path to the PATH. It would mean that login shells have the path added twice, but it doesn't appear to really harm anything. Perhaps a preferable method might be to wrap your executable with a script that sets up the path prior to invoking the executable. Then, just invoke the script from ssh. -- ------------------------------------------- Eric C. Hui ------------------------------------------- -- 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/