This is the mail archive of the
mailing list for the Cygwin project.
Re: How do start a cygwin shell session from a script ?
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 12 May 2014 14:47:23 -0400
- Subject: Re: How do start a cygwin shell session from a script ?
- Authentication-results: sourceware.org; auth=none
- References: <CAPbWNKGufbzvGCQd4u4e3nNp5OteAWM=C7=AgE1z-UVoN6XzjA at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
On 05/12/2014 06:12 AM, Timothy Madden wrote:
I have a CMake build script for my application, that among other
things tries to build libvpx (open-source video codec, see
libvpx library v1.3.0 compiles fine by hand when I open a cygwin
terminal from the Windows start menu and type in the needed
`configure`; `make` and `make install` commands.
But when I try to invoke the cygwin shell from my build script, to run
the same 3 commands with the -lc option to sh.exe (same command line),
something happens and the build commands no longer work like in the
real mintty terminal. Then my build fails.
I believe there is something in the cygwin shell session or
environment that I do not know how to set right when invoking
$(CYGWIN_DIR)/bin/sh from my CMake script.
Is there a way for me to start a cygwin shell session from the build
script, that is identical to the one that opens in the mintty terminal
from the start menu, and run some commands there ?
I checked the environment variables and umask in the mintty terminal
and in a /bin/sh session that I launch, they are the same in both
cases. I tried using /bin/sh, /bin/bash, /bin/dash, with both --login
and -c options. But the automated build always fails, and the manual
What's the error and from where?
I think you are on the right track to look at environment differences.
If you're sure there are no longer any differences between the sessions
invoked through CMake and manually, I'd suspect something surrounding
CMake. Do you have the same problem using Cygwin's CMake?
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple