Re: [boost] Building Boost 1.69 with Visual Studio 1.69

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [boost] Building Boost 1.69 with Visual Studio 1.69

Boost - Build mailing list
On Mon, Mar 25, 2019 at 1:09 PM Paul A. Bristow via Boost <[hidden email]> wrote:

This looks fine, except that what I really expect and want to be able to do is use BOTH 14.1 and 14.2 in one call of bjam/b2

b2 address-model=64 toolset=msvc-14.1,msvc-14.2 ...

If that's not supported it would be a bug.
 
So I put this in my user-config.jam

using msvc
   : # Version VS 2017
    14.1
   : # compiler location (Note that the file layout completely changed recently)
  "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe"  # 15.7.1
15May2018 for

You shouldn't need to put in the cl.exe path. B2 is supposed to find it on its own.


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net


_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] Building Boost 1.69 with Visual Studio 1.69

Boost - Build mailing list
On Mon, 25 Mar 2019 at 20:00, Rene Rivera via Boost-build
<[hidden email]> wrote:

> On Mon, Mar 25, 2019 at 1:09 PM Paul A. Bristow via Boost <[hidden email]> wrote:
>>
>>
>> This looks fine, except that what I really expect and want to be able to do is use BOTH 14.1 and 14.2 in one call of bjam/b2
>>
>> b2 address-model=64 toolset=msvc-14.1,msvc-14.2 ...
>
>
> If that's not supported it would be a bug.
>
>>
>> So I put this in my user-config.jam
>>
>> using msvc
>>    : # Version VS 2017
>>     14.1
>>    : # compiler location (Note that the file layout completely changed recently)
>>   "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe"  # 15.7.1
>> 15May2018 for
>
>
> You shouldn't need to put in the cl.exe path. B2 is supposed to find it on its own.

Yes.
Things seem to improved since my last e-mail where I described the hack.
This should do the trick now, AFAICT:

using msvc : 14.2 ;

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] Building Boost 1.69 with Visual Studio 1.69

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
> -----Original Message-----

> From: Boost [mailto:[hidden email]] On Behalf Of Steven Watanabe via Boost
> Sent: 25 March 2019 18:59
> To: [hidden email]
> Cc: Steven Watanabe
> Subject: Re: [boost] Building Boost 1.69 with Visual Studio 1.69
>
> AMDG
>
> On 3/25/19 12:09 PM, Paul A. Bristow via Boost wrote:
> >
> > <snip>
> > using msvc
> >   : # Version VS 2019 preview
> >     14.2
> >   : # compiler location (Note that the file layout completely changed recently)
> >     "C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe"
> >     : # Options
> >     <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE # Needed if you are working on develop or master ahead of
> the latest release.
> >  ;
>
> I recommend adding <setup>"C:/path/to/vcvarsall.bat"
> I don't know whether this will fix everything, but
> the immediate cause of the errors that you're seeing
> is that the location of vcvarsall.bat is version dependent
> and Boost.Build fails to find it.
Correct, as ever.

Sadly, hoping it would 'Just work', as others suggested  with user-config.jam

using msvc : 14.1 ;
using msvc : 14.2 ;

didn't work for me.  The log looked confused about both cl.exe and vsvarsall.bat.

(I did a --clean and --reconfigure first to make sure)

So, taking Steven's advice, I have now specified both compilers and both setups in my user-config.jam thus:

using msvc
  : # Version VS 2017
    14.1
  : # Compiler location
    "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe"  
  : # Options
   <setup>"C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Auxiliary/Build/vcvarsall.bat"
   <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE # Needed if you are working on develop or master ahead of the latest release.
;

# Used, for example, thus
# b2 toolset=msvc-14.1

using msvc
  : # Version VS 2019 Preview
    14.2
  : # Compiler location
    "C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe"
  : # Options
    <setup>"C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Auxiliary/Build/vcvarsall.bat"
    <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE # Needed if you are working on develop or master ahead of the latest release.
;

I:\boost\libs\hello_boost\example>b2 -a address-model=64 toolset=msvc-14.1,msvc-14.2 -d2 --debug-configuration > both_cl_setup.log

runs with two promising messages:

notice: will use
  'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe'
  for msvc, condition <toolset>msvc-14.1

notice: will use
  'C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe'
  for msvc, condition <toolset>msvc-14.2

and two runs of vcvarsall.bat as expected.

 An extract from the log (zip attached) from this command is not quite as I would expect with a confusing/confused warning.

# notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe'
for msvc, condition <toolset>msvc-14.2
# Used, for example, thus
# b2 toolset=msvc-14.2

notice: Loading user-config configuration file 'user-config.jam' from 'C:/Users/Paul'.
notice: [msvc-cfg] msvc-14.1 detected, command: 'C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe'
warning: toolset msvc initialization:
warning: can not find user-provided command
  'C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe'
warning: initialized from C:\Users\Paul\user-config.jam:101

warning: Did not find command for MSVC toolset.
If you have Visual Studio 2017 installed you will need to specify the full path to the command,
set VS150COMNTOOLS for your installation, or build from the 'Visual Studio Command Prompt for VS 2017'.

notice: will use 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe'
for msvc, condition <toolset>msvc-14.1

These two cl.exe listed above are the same file:

  'C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe'
  'C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe'

but bjam uses the specified on just the same.

Automatically finding msvc cl.exe and specifying it colliding?

but both pass OK :-)

Hello Boost!
Platform: Win32
Compiler: Microsoft Visual C++ version 14.1
STL     : Dinkumware standard library version 650
Boost   : 1.70.0
_MSC_FULL_VER = 191627027

Hello Boost!
Platform: Win32
Compiler: Microsoft Visual C++ version 1920
STL     : Dinkumware standard library version 650
Boost   : 1.70.0
_MSC_FULL_VER = 192027508

which looks plausible.
_MSC_FULL_VER  though it doesn't say 14.2 but 1920 instead.
No doubt this will change when the 'official' release is out in several days' time.

I'll try something more adventurous next ;-)

Thanks

Paul


---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830











_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build

both_cl_setup.7z (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [boost] Building Boost 1.69 with Visual Studio 1.69

Boost - Build mailing list
AMDG

On 3/26/19 9:13 AM, Paul A. Bristow via Boost-build wrote:
>> <snip>
> Sadly, hoping it would 'Just work', as others suggested  with user-config.jam
>
> using msvc : 14.1 ;
> using msvc : 14.2 ;
>
> didn't work for me.  The log looked confused about both cl.exe and vsvarsall.bat.
>

It should work if you're using current git.

> (I did a --clean and --reconfigure first to make sure)
>
> So, taking Steven's advice, I have now specified both compilers and both setups in my user-config.jam thus:
>
> <snip>
>  An extract from the log (zip attached) from this command is not quite as I would expect with a confusing/confused warning.
> <snip>
>
> Automatically finding msvc cl.exe and specifying it colliding?
>

I suspect so.  There were some wacky bugs that I recently fixed.

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] Building Boost 1.69 with Visual Studio 1.69

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
On Tue, 26 Mar 2019 at 15:13, Paul A. Bristow via Boost-build
<[hidden email]> wrote:

> > -----Original Message-----
> > From: Boost [mailto:[hidden email]] On Behalf Of Steven Watanabe via Boost
> > Sent: 25 March 2019 18:59
> > To: [hidden email]
> > Cc: Steven Watanabe
> > Subject: Re: [boost] Building Boost 1.69 with Visual Studio 1.69
> >
> > On 3/25/19 12:09 PM, Paul A. Bristow via Boost wrote:
> > >
> > > <snip>
> > > using msvc
> > >   : # Version VS 2019 preview
> > >     14.2
> > >   : # compiler location (Note that the file layout completely changed recently)
> > >     "C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe"
> > >     : # Options
> > >     <define>BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE # Needed if you are working on develop or master ahead of
> > the latest release.
> > >  ;
> >
> > I recommend adding <setup>"C:/path/to/vcvarsall.bat"
> > I don't know whether this will fix everything, but
> > the immediate cause of the errors that you're seeing
> > is that the location of vcvarsall.bat is version dependent
> > and Boost.Build fails to find it.
>
> Correct, as ever.
>
> Sadly, hoping it would 'Just work', as others suggested  with user-config.jam
>
> using msvc : 14.1 ;
> using msvc : 14.2 ;
>
> didn't work for me.

Possibly, I run b2 from "x64 Native Tools Command Prompt for VS 2019 Preview",
that is why that short definition for 14.2 in project-config.jam
worked, obviously:
I had been fiddling with that and possibly missed details about what
actually worked.

> <setup>"C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Auxiliary/Build/vcvarsall.bat"

I have just learned about the <setup> trick. This looks very useful!

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [boost] Building Boost 1.69 with Visual Studio 1.69

Boost - Build mailing list
In reply to this post by Boost - Build mailing list


> -----Original Message-----
> From: Boost [mailto:[hidden email]] On Behalf Of Steven Watanabe via Boost
> Sent: 28 March 2019 15:50
> To: Paul A. Bristow via Boost
> Cc: Steven Watanabe
> Subject: Re: [boost] [Boost-build] Building Boost 1.69 with Visual Studio 1.69
>
> AMDG
>
> On 3/28/19 9:30 AM, Paul A. Bristow via Boost wrote:
> >
> >
> >> <snip>
> > I don't think that vswhere.exe is visible from my user or VS command prompts :-(
> >
> > <snip>
> >
> > But one copy  is present at C:\Program Files (x86)\Microsoft Visual Studio\Installer and
> >
>
> That's the right one.
>
> > With no parameters vswhere outputs this
> >
> > C:\Users\Paul>"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
> > Visual Studio Locator version 2.6.7+91f4c1d09e [query version 2.0.2250.60958]
> > Copyright (C) Microsoft Corporation. All rights reserved.
> >
> > instanceId: bd686eb9
> > installDate: 10Dec2018 16:18:55
> > installationName: VisualStudio/15.9.10+28307.557
> > installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
> > installationVersion: 15.9.28307.557
> > <snip>
> >
> > I'm installing some other Visual Studio items to see if that will help.

It didn't.

But I did notice that vswhere does not find vs2019 at all with the option -all,

but vswhere *does* find both VS2017 and VS2019 with -prerelease option.

So have I jumped the gun by prematurely installing the preview?

Does msvc.jam need this adding to the list of options?

I:\modular-boost\tools\build\src\tools\msvc.jam

                local vmwhere_cmd = "\"$(vswhere)\" -latest -products * $(req) $(prop) $(limit)" ;

 perhaps? but there are also some assumptions about 15.0 builtin, so perhaps I am entering where angels fear to tread.

(assuming it is agreed that we want to find preview versions?)
 
Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830




_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build