From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-03-23 09:54:41
Roland Schwarz wrote:
> Today I wanted to try out mingw 4.2.1.
> The compiler works almost well with boost-build,
> but one (minor?) problem persists:
> If I have not set up the environment path beforehand
> so the g++ find its bin directory, some components, such as
> the as cannot be found properly.
> One could argue that it obviously is necessary to set
> up the environment correctly. But not when using
> boost-build I think. Boost build should be able to
> set up different environments since it is able to
> request builds of multiple compilers in one run.
> This is similar to msvc, where a vcvars.bat file is
> run before compiler invocation, such as to make correct
> paths and the like.
> mingw 3.4.5 had no problems in this respect since it
> was able to pick up everything from the initial command
> invocation. Unfortunately not mingw 4.2.1. And I also
> cannot see that it would be wrong behavior either.
> A correct environment is duty of the build system.
I don't think so. One should be able to invoke g++ with an absolute path,
and then expect that g++ finds everything he wants to find. It's not just
'as' binary -- it's also various gcc-version specific libraries (not in PATH
anyway). I suspect that either you've ended up with partial install, or
mingw 4.2.1 is buggy.
> So my questions are:
> 1) Is there a simple trick I could use to adjust the PATH
> before every invocation?
> using gcc
> : 4.2.1
> : "SET PATH=C:/mingw-4.2.1/bin;%PATH% && g++-sjlj.exe"
> : <flavor>mingw
> : <root>"C:/mingw-4.2.1/"
> : <cxxflags>-fno-strict-aliasing
> does not work, because bjam complains about too long command line.
Why? Could it be that your existing PATH is so long already, that neither
bjam nor gcc is able to append another element to it without overflowing?
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk