This is the mail archive of the cygwin 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: Re: 1.5.25: Cygwin, LAPACK, and ssh -- output "swallowed"


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/


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