Hi All,

I have found the source of my problems and to cut a long story short:

CC.NET converts all environment variable names to lower case before
passing them on to sub-processes. The problem is that any processes that
are case-sensitive to env var names, such as GNU make, will fail!

An example of one of my problem was accessing 'ComSpec' in the makefile,
the command would just fail as NULL was being returned even though
'comspec' existed. As I am using a third-party script I did not want to
have to change this to 'comspec', so I have created a wrapper bat file
that simply redefines it with the correct case:

@echo off
:: CC Wrapper.bat
:: Correct case for ComSpec name
set NewComSpec=%ComSpec%
set ComSpec=
set ComSpec=%NewComSpec%
set NewComSpec=

:: launch the original script passed in as the first argument
call %1 %2 %3 %4

Thanks for putting me on the right track Daniel!

Paul.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Paul Wightmore
Sent: 24 March 2009 16:36
To: [email protected]
Subject: [ccnet-user] Re: GNU Make problems with CC.NET


Hi Daniel,

Thanks for the info, I think you might be onto something. If I remove as
many surplus environment variables as I can before running CC.NET then
the build process proceeds a bit further, though not much :(

I think the problems I am experiencing are due to limitations in the GNU
make executable I am using, I would imagine it is failing to allocate
some environment memory for each sub-process it spawns, I am sometimes
seeing the message 'CreateProcess(null): <some error occurred>'.

At least there is a logical reason as to why CC.NET is causing different
behaviour (due to additional environment variables). Now all I need to
do is to see if I can repress the CC.NET environment variables that are
passed into the script!

Will let you know if I find a solution.

Cheers,
Paul.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Daniel Hommel
Sent: 23 March 2009 20:06
To: [email protected]
Subject: [ccnet-user] Re: GNU Make problems with CC.NET


Hi Paul,

how much environment variables is a bunch? :-)
I remeber someone posted on this list that his batch based build does
run on the command line but not in CC.Net. CC.Net is adding a few
environment variables and that was just enough for this user that his
environment space was not big enough... Does your build still run on
the command line if you add another bunch of variables (iirc CC.Net
is adding 12 or so)?

regards,

Daniel


On Mon, 23 Mar 2009 06:15:24 -0700 (PDT)
PaulW <[email protected]> wrote:

> 
> Hi CCnet users,
> 
> I am overseeing a project that is trying to integrate CC with some
> existing build scripts. However the scripts that work fine when run on
> the command-line or from a desktop short-cut do not work when run
> under CC.NET console.
> 
> We have CC executing a top level batch file. This script sets up a
> bunch of environment variables and effectivly performs a call to GNU
> make. However the make process does not seem to inherit the latest, or
> it would appear any, environment variables. As a result the make
> quickly fails when env vars are used or indeed trying to run any
> console command such as copy.
> 
> It occurs under CC versions 1.4.0 and 1.4.2
> We are using a third-party build of GNU Make v3.80 for win32, source
> code not available to us :(
> We have tried on several computers .NET 2.0 or 3.0 installed.
> 
> We have tried spawning an instance of cmd.exe and passing in the
> script as an argument using the /C option.
> We are pretty sure user permissions are not a problem as we are
> running CC.NET from the console.
> 
> Just wondering if anybody else has had similar problems or could
> provide possible solutions, before I dust off the old debugger?
> 
> 
> Cheers,
> 
> PaulW


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


________________________________________________________________________
__________________________________________________________________
Information contained in this e-mail is intended for the use of the
addressee only, and is confidential and may be the subject of Legal
Professional Privilege.  Any dissemination, distribution, copying or use
of this communication without prior permission of the addressee is
strictly prohibited.The views of the author may not necessarily
constitute the views of Kuju Entertainment Ltd. Nothing in this email
shall bind Kuju Entertainment Ltd in any contract or obligation.

The contents of an attachment to this e-mail may contain software
viruses which could damage your own computer system. While Kuju
Entertainment has taken every reasonable precaution to minimise this
risk, we cannot accept liability for any damage which you sustain as a
result of software viruses. You should carry out your own virus checks
before opening the attachment.

Kuju Entertainment Ltd trading as Zoe Mode

Registered Office : 185 Park Street, Bankside, London, SE19DY. Company
Number : 3481384.Company Registered in England.
________________________________________________________________________
__________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
________________________________________________________________________
_________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


__________________________________________________________________________________________________________________________________________
Information contained in this e-mail is intended for the use of the addressee 
only, and is confidential and may be the subject of Legal Professional 
Privilege.  Any dissemination, distribution, copying or use of this 
communication without prior permission of the addressee is strictly 
prohibited.The views of the author may not necessarily constitute the views of 
Kuju Entertainment Ltd. Nothing in this email shall bind Kuju Entertainment Ltd 
in any contract or obligation.

The contents of an attachment to this e-mail may contain software viruses which 
could damage your own computer system. While Kuju Entertainment has taken every 
reasonable precaution to minimise this risk, we cannot accept liability for any 
damage which you sustain as a result of software viruses. You should carry out 
your own virus checks before opening the attachment.

Kuju Entertainment Ltd trading as Zoe Mode

Registered Office : 185 Park Street, Bankside, London, SE19DY. Company Number : 
3481384.Company Registered in England.
__________________________________________________________________________________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
_________________________________________________________________________________________________________________________________________

Reply via email to