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: 1.5.19: Problem with cron and microsoft devenv

Top-post reformatted.

On 5/23/06, Larry Hall (Cygwin) <reply-to-list-only-lh <at> cygwin <dot> com> wrote:

<> - thanks.

Nick Forte wrote:
> I'm currently having a problem where microsoft's devenv compiler
> crashes when running under cron. If I run my build scripts directly
> from a bash shell devenv works great.
> I've installed VC2005.NET and cygwin under Administrator. I then
> created a crontab entry like so:
> HOME=/Home/Administrator
> SHELL=/usr/bin/bash
> 00 * * * * $HOME/trees/trunk/scripts/
> In I call a perl script that does some svn and
> configuration management but ultimately run the following commands:
> ' myproject.sln /clean Release'
> ' myproject.sln /build Release'
> The first command works great. It cleans the project and deletes all
> the *.obj etc.... files. When it runs the second command I get the
> following:
> Application popup: Microsoft Visual C++ Runtime Library : Runtime Error!
> Program: ...\Common7\IDE\devenv.exe
> This application has requested the Runtime to terminate it in an
> unusual way. Please contact the application's support team for more
> information.
> At first I thought there was a permissions issue or something of that
> nature except the first '/clean' command is deleting files and exits
> gracefully. As I stated before, the scripts work fine when I run them
> in a bash shell. What's different about running under cron vs.
> running in a bash shell that could be different?

Environment for one.  You should check to make sure you have all of the
environment variables that you need when running under cron.  I also
recall others having problems running devenv if the user running it is
not authenticated through Windows (i.e. password).  You can see if this
is the cause of your problem by running the cron service as your user.

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746

Nick Forte wrote:
Thanks!  That worked.

I tried uninstalling the cron service and reinstalling with the '-u'
(user) option.  At that point I couldn't start the service.  It kept
giving me login error messages.  I then went through
but that didn't seem to point out anything obvious.  Finally, instead
of running cyrunsrv --install cron .... I ran /usr/bin/cron-config.
When asked if I want to cron under the current user I said 'yes'.
After that cron + devenv worked fine.

Another question I have is about cron and environment variables.  When
I run a shell, even cmd /c, under cron the environment variable
APPDATA doesn't get set.  This seems odd to me.  I believe APPDATA
gets set from shell32 which should be loaded when cron runs 'cmd /c

I am also curious as to why previously calling devenv to clean the
project didn't crash where devenv /build did.  I tried running some
tools like filemon etc... during the cron process and i never saw
anything weird due to permissions.  Ultimately, I'm happy that running
cron under the user is working.

Obviously you need more environment to build than to clean. In particular, there's no need for $INCLUDE to clean, though CL will look for it as part of a build. There may be other implicit dependencies as well. Actually, I'll bet there are. ;-) In any case, if the issue is strictly environmental, you can certainly check the difference in your environment vs the one that it had trouble running in. The result of that would be your candidate problem set.

-- Larry Hall RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746

Unsubscribe info:
Problem reports:

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