# Boost-Build :

From: Brian Ravnsgaard Riis (brian_at_[hidden])
Date: 2005-05-26 20:34:43

Brian Ravnsgaard Riis wrote:
> Ok.. I'm resurrecting this thread again. The problem persists.
>
> David Abrahams wrote:
>
>>Brian Ravnsgaard Riis <brian_at_[hidden]> writes:
>>
>>
>>
>>>Hello list.
>>>
>>>I've been having trouble using mingw with BBv2 for some time, due to a
>>>failure to invoke action gcc.archive. I got our old friend "spawn: No
>>>such file or directory", which tells next to nothing about what really
>>>went wrong.
>>>
>>>Investigation showed that since gcc.archive is a two-line action (remove
>>>then archive) it choked on that somehow. Commenting out either or both
>>>lines made no difference, i.e. still no successful run. *Deleting* one
>>>of the lines, however, solved the problem, except, of course, that both
>>>lines are there for a reason. The problem turned out to be located
>>>somewhere else.
>>>
>>>In the top of gcc.jam a little trick is present to circumvent trouble
>>>with command line length on NT. It sets the JAMSHELL variable to '%'.
>>>This was why it choked.
>>
>>
>>It shouldn't have. '%' is only supposed to take effect for
>>single-line commands.
>
>
> Yes, so it says in the comments. I'm just reporting my experiences,
> which are: Changing that line (or commenting it out), removes the
> "spawn:" error.
>
>
>>
>>>I have replaced this with
>>>
>>> "JAMSHELL = cmd.exe /C %"
>>>
>>>Now everything works.
>>
>>
>>That will break when you run up against the command-line length
>>limitation. You may as well leave off setting JAMSHELL altogether in
>>that case, because it amounts to roughly the same thing.
>>
>
>
> I realize that now. I've not yet run against above-mentioned limitation,
> but I really fear that it may happen.
>
> This really leaves me back where I started. I've tested with Cygwin as
> well as mingw, and in both cases BBv2 chokes on gcc.archive, if I leave
> the above line unchanged.
>
> Help!
>

FWIW, attached is the output for "bjam -d+4".

```--
/Brian Riis
--------------010100010708090507030507 Content-Type: text/plain;
name="makeout"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="makeout"
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.000000 sec system; 0.031250 sec user
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.015625 sec system; 0.031250 sec user
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.015625 sec system; 0.015625 sec user
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.031250 sec system; 0.015625 sec user
Executing raw command directly
Executing command ["g++"] [-Wall] [-ftemplate-depth-100] [-O0] [-fno-inline] [-g] [-I"c:\msys\1.0\local\include"] [-I"include"] [-c] [-o] ["bin\test\gcc\debug\test.o"] ["test\test.cc"]
0.015625 sec system; 0.015625 sec user
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.046875 sec system; 0.015625 sec user
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.015625 sec system; 0.031250 sec user
Executing through .bat file
Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\BRIANR~1\LOCALS~1\Temp\jam4880-00.bat]
0.015625 sec system; 0.015625 sec user
Executing raw command directly
Executing command ["g++"] [-Wall] [-ftemplate-depth-100] [-O0] [-fno-inline] [-g] [-I"c:\msys\1.0\local\include"] [-I"include"] [-c] [-o] ["bin\test\util\gcc\debug\ut_enum.o"] ["test\util\ut_enum.cc"]
0.015625 sec system; 0.015625 sec user
Executing raw command directly
Executing command [del] [/f] ["bin\test\util\gcc\debug\util.a"] [
] [ar] [ruc] ["bin\test\util\gcc\debug\util.a"] ["bin\test\util\gcc\debug\ut_enum.o"]
--------------010100010708090507030507--
```