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: How do start a cygwin shell session from a script ?

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
build works.

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?



A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Problem reports:
Unsubscribe info:

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