Boost logo

Boost-Build :

Subject: Re: [Boost-build] Difficulty configuring boost.build for MSVC 9.0
From: Ian Emmons (iemmons_at_[hidden])
Date: 2009-01-05 11:33:46


Steven,

Sorry, this thread is a bit old, but I'm back from vacation now --
thanks for your help.

I took your hint that I should change to the version of boost.build
that ships as part of boost 1.37.0, and this fixes the MSVC 9
problem. However, it also breaks my Macintosh build. Using the
toolset darwin-4.0 and the version of boost.build posted at [1], my
jam files build my project just fine, but using the version from boost
1.37.0 I get the following compiler error:

    cc1plus: error: unrecognized command line option "-fcoalesce-
templates"

This command line option is indeed unrecognized by GCC starting with
version 4.0.0 (I'm using 4.0.1). Diff'ing the two versions of the
tools/darwin.jam file, I can see where this:

     # GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
     local gccversion = [ SHELL "$(command) -dumpversion" ] ;
     if $(gccversion) < "4.0.0"
     {
         flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-
templates ;
     }

changed into this:

     # - GCC 4.0 and higher in Darwin does not have -fcoalesce-
templates.
     if $(version) < "4.0.0"
     {
         flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-
templates ;
     }

Was a darwin-specific bug introduced here in the transition from [1]
to boost 1.37.0?

Thanks,

Ian

[1] http://www.boost.org/doc/tools/build/index.html

On Dec 22, 2008, at 4:48 PM, Steven Watanabe wrote:

> AMDG
>
> Ian Emmons wrote:
>>> Boost.Build uses
>>> HKEY_LOCAL_MACHINE\SOFTWARE\\Microsoft\VisualStudio\9.0\Setup\VC
>>> or
>>> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\\Microsoft\VisualStudio
>>> \9.0\Setup\VC
>>> to find the installation directory of msvc 9.0.
>>
>> The first key doesn't exist. ("...\VisualStudio\9.0\Setup" does,
>> but it has no VC sub-key.) The second key does exist. It's
>> default value is null, and it has a single named value called
>> "ProductDir", whose value is "C:\Program Files (x86)\Microsoft
>> Visual Studio 9.0\VC\", which is exactly the directory where the
>> vcvarsall.bat script is located.
>>
>> I tried accessing this key under "Users" permissions, and I didn't
>> have any trouble reading the registry value or accessing the
>> vcvarsall.bat file, so this doesn't appear to be a permissions
>> problem.
>>
>> Do you have any idea what's going wrong here? Does bjam emit any
>> sort of log file that might show details of the error?
>
> The attached patch for msvc.jam prints out extra diagnostic
> information
> when searching the registry.
>
>>>> notice: msvc-8.0 detected, command: 'C:\Program Files
>>>> (x86)\Microsoft Visual Studio 8\VC\bin\cl.exe'
>>>> notice: msvc-7.1 detected, command: 'C:\Program Files
>>>> (x86)\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe'
>>>
>>> Somehow the autodetection isn't working. What version of
>>> Boost.Build are you using?
>>
>> Sorry, I meant to include that in my last email. The command "bjam
>> --version" reports:
>>
>> Boost.Build V2 (Milestone 12)
>> Boost.Jam 03.1.17
>
> Unfortunately this is not enough info. The version of Boost.Build
> included in C++ Boost since 1.35 have msvc 9 support, but the
> milestone 12 that was released separately came just before
> support for msvc 9 was added.
>
> The file tools/msvc.jam should have a bunch of version specific
> information
> towards the end. Check to see whether this includes msvc-9.0.
>
> In Christ,
> Steven Watanabe
>
> Index: tools/build/v2/tools/msvc.jam
> ===================================================================
> --- tools/build/v2/tools/msvc.jam (revision 50249)
> +++ tools/build/v2/tools/msvc.jam (working copy)
> @@ -582,9 +582,11 @@
> local vc-path ;
> for local x in "" "Wow6432Node\\"
> {
> + ECHO "looking for HKEY_LOCAL_MACHINE\\SOFTWARE\
> \"$(x)"\\Microsoft\\"$(.version-$(i)-reg) ;
> vc-path += [ W32_GETREG
> "HKEY_LOCAL_MACHINE\\SOFTWARE\\"$(x)"\
> \Microsoft\\"$(.version-$(i)-reg)
> : "ProductDir" ] ;
> + ECHO found $(vc-path) in registry ;
> }
>
> if $(vc-path)
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


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