|
List Info
Thread: How to build 64-bit executables with msvc?
|
|
| How to build 64-bit executables with
msvc? |

|
2007-10-04 12:23:41 |
|
I am running 32bit windows XP. I would like to use bbv2 (from 1.34.1) to build 64bit exectuables. I read some threads on this list from January and July, but I remain unclear on the exact command-line invocation/user-config.jam
that will work. One attempt:
### user-config.jam
import toolset : using ; using msvc ;
### invocation bjam address-model=64 regex
### result compile-c-c++ bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj
'cl'; is not recognized as an internal or external command, operable program or batch file.
---
I also tried adding: using msvc : 8.0amd : "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN\amd64\cl.exe" ;
to my user config and then invoking as: bjam --toolset=msvc-8.0amd address-model=64 regex
In this case, things seem to start out ok, but instead of compilation, I got a series of dialog boxes indicating that an attempt was being made to directly execute rsp files. Presumably
vcvarsall.bat is not being invoked. Finally, I tried adding:
msvc.configure 8.0 : "<command>c:\Program Files
(x86)\Microsoft Visual Studio 8\VC\BIN\amd64\cl"
"<setup>C:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat" ;
to my user-config.jam (based on a message from Dave A. from July). This only results in:
C:homeuser-config.jam:34: in modules.load rule msvc.configure unknown in module user-config.
Could someone please tell me exactly what I must do to succeed in this endeavor?
Thanks, Mat
|
| Re: How to build 64-bit executables
with msvc? |
  Russian Federation |
2007-10-04 14:14:18 |
On Thursday 04 October 2007 21:23:41 Mat Marcus wrote:
> I am running 32bit windows XP. I would like to use bbv2
(from 1.34.1) to
> build 64bit exectuables. I read some threads on this
list from January and
> July, but I remain unclear on the exact command-line
invocation/user-
> config.jam that will work. One attempt:
>
> ### user-config.jam
>
> import toolset : using ;
> using msvc ;
>
> ### invocation
> bjam address-model=64 regex
>
> ### result
> compile-c-c++
>
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64thre
ading-multic_regex_traits.obj
> 'cl' is not recognized as an internal or external
command,
> operable program or batch file.
>
> ---
>
> I also tried adding:
> using msvc : 8.0amd : "C:\Program Files
(x86)\Microsoft Visual Studio
> 8\VC\BIN\amd64\cl.exe" ;
>
> to my user config and then invoking as:
> bjam --toolset=msvc-8.0amd address-model=64 regex
>
> In this case, things seem to start out ok, but instead
of compilation, I got
> a series of dialog boxes indicating that an attempt was
being made to
> directly execute rsp files. Presumably vcvarsall.bat is
not being invoked.
> Finally, I tried adding:
>
> msvc.configure 8.0 : "<command>c:\Program
Files (x86)\Microsoft Visual
> Studio 8\VC\BIN\amd64\cl"
"<setup>C:\Program Files (x86)\Microsoft
> Visual Studio 8\VC\vcvarsall.bat" ;
>
> to my user-config.jam (based on a message from Dave A.
from July). This only
> results in:
> C:homeuser-config.jam:34: in modules.load
> rule msvc.configure unknown in module user-config.
>
> Could someone please tell me exactly what I must do to
succeed in this
> endeavor?
I believe you have to explicitly configure msvc, providing
the path of the regular
32-bit compiler, like this:
using msvc : 8.0 : "C:\Program Files (x86)\Microsoft
Visual Studio 8\VC\BIN\cl.exe" ;
and then, you should say:
bjam address-model=64
or
bjam address-model=64 architecture=opteron
I've just some fruitfull off-list discussion with Ilya
Sokolov, who
explained quite some details about msvc 64-bit support, but
haven't yet converted
that to docs.
- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-04 14:54:42 |
|
On 10/4/07, Vladimir Prus < ghost cs.msu.su">ghost cs.msu.su> wrote:
On Thursday 04 October 2007 21:23:41 Mat Marcus wrote: > I am running 32bit windows XP. I would like to use bbv2 (from 1.34.1) to > build 64bit exectuables. I read some threads on this list from January and
> July, but I remain unclear on the exact command-line invocation/user- > config.jam that will work. One attempt: > > ### user-config.jam > > import toolset : using ; > using msvc ;
> > ### invocation > bjam address-model=64 regex > > ### result > compile-c-c++ > bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj > 'cl9; is not recognized as an internal or external command,
> operable program or batch file.
> > --- > > I also tried adding: > using msvc : 8.0amd : "C:\Program Files (x86)\Microsoft Visual Studio > 8\VC\BIN\amd64\cl.exe" ;
> > to my user config and then invoking as: > bjam --toolset=msvc-8.0amd address-model=64 regex > > In this case, things seem to start out ok, but instead of compilation, I got > a series of dialog boxes indicating that an attempt was being made to
> directly execute rsp files. Presumably vcvarsall.bat is not being invoked. > Finally, I tried adding: > > msvc.configure 8.0 : "<command>c:\Program Files (x86)\Microsoft Visual
> Studio 8\VC\BIN\amd64\cl" "<setup>C:\Program Files (x86)\Microsoft > Visual Studio 8\VC\vcvarsall.bat" ; > > to my user-config.jam (based on a message from Dave A. from July). This only
> results in: > C:homeuser-config.jam:34: in modules.load > rule msvc.configure unknown in module user-config. > > Could someone please tell me exactly what I must do to succeed in this
> endeavor?
I believe you have to explicitly configure msvc, providing the path of the regular 32-bit compiler, like this:
using msvc : 8.0 : "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN\cl.exe" ;
and then, you should say:
bjam address-model=64
or
bjam address-model=64 architecture=opteron
I've just some fruitfull off-list discussion with Ilya Sokolov, who
explained quite some details about msvc 64-bit support, but haven't yet converted that to docs.
- Volodya Thanks for the reply. I followed your suggestion. Unfortunately, it seems to lead to the same outcome (dialog boxes, failure to call vcvarsall?) described in one of my experiments above:
> > I also tried adding: > using msvc : 8.0amd : "C:\Program Files (x86)\Microsoft Visual Studio > 8\VC\BIN\amd64\cl.exe" ; > > to my user config and then invoking as:
> bjam --toolset=msvc-8.0amd address-model=64 regex > > In this case, things seem to start out ok, but instead of compilation, I got > a series of dialog boxes indicating that an attempt was being made to
> directly execute rsp files. Presumably vcvarsall.bat is not being invoked.
Further advice would be greatly appreciated.
- Mat
|
| Re: How to build 64-bit executables
with msvc? |
  Russian Federation |
2007-10-04 15:17:57 |
On Thursday 04 October 2007 23:54:42 Mat Marcus wrote:
> Thanks for the reply. I followed your suggestion.
Unfortunately, it seems to
> lead to the same outcome (dialog boxes, failure to call
vcvarsall?)
> described in one of my experiments above:
>
> >
> > I also tried adding:
> > using msvc : 8.0amd : "C:\Program Files
(x86)\Microsoft Visual Studio
> > 8\VC\BIN\amd64\cl.exe" ;
> >
> > to my user config and then invoking as:
> > bjam --toolset=msvc-8.0amd address-model=64 regex
> >
> > In this case, things seem to start out ok, but
instead of compilation, I
> got
> > a series of dialog boxes indicating that an
attempt was being made to
> > directly execute rsp files. Presumably
vcvarsall.bat is not being invoked.
>
> Further advice would be greatly appreciated.
Okay, please try this:
using msvc : 8.0 : "C:\Program Files (x86)\Microsoft
Visual Studio 8\VC\BIN\cl.exe"
: <setup>"C:\Program Files (x86)\Microsoft
Visual Studio 8\VC\BIN\vcvarsall.bat"
;
make sure that paths are correct -- I'm not sure I got the
path to the script right. If that works,
we can try figuring why original attempts failed.
- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-04 17:09:25 |
|
On 10/4/07, Vladimir Prus < ghost cs.msu.su">ghost cs.msu.su> wrote:
On Thursday 04 October 2007 23:54:42 Mat Marcus wrote:
> Thanks for the reply. I followed your suggestion. Unfortunately, it seems to > lead to the same outcome (dialog boxes, failure to call vcvarsall?)
> described in one of my experiments above: > > > > > I also tried adding: > > using msvc : 8.0amd : "C:\Program Files (x86)\Microsoft Visual Studio > > 8\VC\BIN\amd64\cl.exe" ;
> > > > to my user config and then invoking as: > > bjam --toolset=msvc-8.0amd address-model=64 regex > > > > In this case, things seem to start out ok, but instead of compilation, I
> got > > a series of dialog boxes indicating that an attempt was being made to > > directly execute rsp files. Presumably vcvarsall.bat is not being invoked. > > Further advice would be greatly appreciated.
Okay, please try this:
using msvc : 8.0 : "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN\cl.exe" : <setup>"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN\vcvarsall.bat"
;
make sure that paths are correct -- I'm not sure I got the path to the script right. If that works, we can try figuring why original attempts failed.
- Volodya _______________________________________________
Still doesn't work (when paths are adjusted. (For XP 32 bit: there is no (x86) in the path). Also,vcvarsall.bat lives one directory higher.
As an experiment I also tested in a "Visual Studio 2005 Command Prompt" window. Presumably this is a command window in which
vcvarsall.bat has been pre-executed. In this case, I seem to get a little bit further. Now I am seeing a lot of these messages:
cl : Command line warning D9002 : ignoring unknown option '/favor:blend';, and an occasional: cl : Command line warning D9025 : overriding '/GR39; with '/GR-'
but at least it's compiling now. This kind of makes me wonder about the settings. Thanks for the help so far.Let me know if you have further advice, or if there are further tests that I might carry out that would assist you in getting this automated.
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-05 03:07:19 |
> I am running 32bit windows XP. I would like to use bbv2
(from 1.34.1) to
> build 64bit exectuables. I read some threads on this
list from January and
> July, but I remain unclear on the exact command-line
> invocation/user-config.jam that will work. One
attempt:
>
> ### user-config.jam
>
> import toolset : using ;
> using msvc ;
>
> ### invocation
> bjam address-model=64 regex
>
> ### result
> compile-c-c++
>
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64thre
ading-multic_regex_traits.obj
> 'cl' is not recognized as an internal or external
command,
> operable program or batch file.
I use
using msvc : all ;
in user-config.jam, and invoking
bjam msvc-8.0 address-model=64 regex
works as expected on my machine.
--
Bojan Resnik
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-05 16:47:51 |
|
On 10/4/07, Bojan Resnik < resnikb gmail.com">resnikb gmail.com> wrote:
> I am running 32bit windows XP. I would like to use bbv2 (from 1.34.1) to > build 64bit exectuables. I read some threads on this list from January and > July, but I remain unclear on the exact command-line
> invocation/user-config.jam that will work. One attempt: > > ### user-config.jam > > import toolset : using ; > using msvc ; > > ### invocation > bjam address-model=64 regex
> > ### result > compile-c-c++ > bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj > 'cl9; is not recognized as an internal or external command,
> operable program or batch file.
I use using msvc : all ;
in user-config.jam, and invoking bjam msvc-8.0 address-model=64 regex
works as expected on my machine.
-- Bojan Resnik
Perhaps it was working on your machine because you are running a 64bit os? Is cross-compiling from win32 to build a 64bit target supported? Tested?
- Mat
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-05 17:36:07 |
> Perhaps it was working on your machine because you are
running a 64bit os?
> Is cross-compiling from win32 to build a 64bit target
supported? Tested?
No, I use Windows XP 32bit, and cross-compiling to 64-bit
works fine for me.
--
Bojan Resnik
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-08 05:26:29 |
> Interesting. Would you mind answering a couple of
questions for me, so that
> I could get to the bottom of this:
>
> 1) My user-config.jam initially contained only:
>
> import toolset : using ;
> using msvc ;
>
> Does yours have anything more interesting that might be
making the
> difference?
Since I have several versions of msvc, I use
using msvc : all ;
Other than this, there is nothing else in
user-config.jam.
> 2) I am using VC8SP1 on a current version of XP
(32-bit). Any differences in
> your configuration?
I am using VC8 without the service pack, Windows XP SP2
32bit.
> 3) I am using the boost build that shipped with 1.34.1
(not M12). You?
I am using the SVN version. However, I think it has worked
for a
while now, even with BB shipped with 1.34.1.
> 4) Would you be willing to build with the -d2 flag and
paste a small snippet
> here so that I see what options are bing fed to the
compiler?
Below is a part of output after running
bjam -d+2 msvc-8.0 address-model=64 regex
I think something is wrong with your setup or
installation, as I
don't get errors for using /favor:blend.
---------------------------------
file
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64thre
ading-multic_regex_traits.obj.rsp
"libsregexsrc..srcc_regex_traits.cpp"
-Fo"bin.v2libsregexbuildmsvc-8.0debugaddress-mod
el-64threading-multic_regex_traits.obj"
-TP
/Z7
/Od
/Ob0
/W3
/GR
/MDd
/Zc:forScope
/favor:blend
/wd4675
/EHs
-c
-DBOOST_ALL_NO_LIB=1
-DBOOST_REGEX_DYN_LINK=1
"-I."
compile-c-c++
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64thre
ading-multic_regex_traits.obj
call "D:Program FilesMicrosoft Visual Studio
8VCvcvarsall.bat"
x86_amd64 >nul
cl /Zm800 -nologo
"bin.v2libsregexbuildmsvc-8.0debugaddress-
model-64threading-multic_regex_traits.obj.rsp"
c_regex_traits.cpp
.boost/regex/v4/c_regex_traits.hpp(38) : warning C4103:
'e:third_partyboost-1.34.1boostregexv4c_regex_traits.h
pp' :
alignment changed after including header, may be due to
missing
#pragma pack(pop)
.boost/regex/v4/c_regex_traits.hpp(191) : warning C4103:
'e:third_partyboost-1.34.1boostregexv4c_regex_traits.h
pp' :
alignment changed after including header, may be due to
missing
#pragma pack(pop)
.boost/regex/v4/primary_transform.hpp(24) : warning C4103:
'e:third_partyboost-1.34.1boostregexv4primary_transfor
m.hpp' :
alignment changed after including header, may be due to
missing
#pragma pack(pop)
.boost/regex/v4/primary_transform.hpp(122) : warning
C4103:
'e:third_partyboost-1.34.1boostregexv4primary_transfor
m.hpp' :
alignment changed after including header, may be due to
missing
#pragma pack(pop)
.boost/regex/v4/regex_traits_defaults.hpp(23) : warning
C4103:
'e:third_partyboost-1.34.1boostregexv4regex_traits_def
aults.hpp'
: alignment changed after including header, may be due to
missing
#pragma pack(pop)
.boost/regex/v4/regex_traits_defaults.hpp(314) : warning
C4103:
'e:third_partyboost-1.34.1boostregexv4regex_traits_def
aults.hpp'
: alignment changed after including header, may be due to
missing
#pragma pack(pop)
libsregexsrc..srcc_regex_traits.cpp(43) : warning
C4103:
'e:third_partyboost-1.34.1libsregexsrcc_regex_traits.c
pp' :
alignment changed after including header, may be due to
missing
#pragma pack(pop)
libsregexsrc..srcc_regex_traits.cpp(203) : warning
C4103:
'e:third_partyboost-1.34.1libsregexsrcc_regex_traits.c
pp' :
alignment changed after including header, may be due to
missing
#pragma pack(pop)
file
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64thre
ading-multicpp_regex_traits.obj.rsp
"libsregexsrc..srccpp_regex_traits.cpp"
-Fo"bin.v2libsregexbuildmsvc-8.0debugaddress-mod
el-64threading-multicpp_regex_traits.obj"
-TP
/Z7
/Od
/Ob0
/W3
/GR
/MDd
/Zc:forScope
/favor:blend
/wd4675
/EHs
-c
-DBOOST_ALL_NO_LIB=1
-DBOOST_REGEX_DYN_LINK=1
"-I."
compile-c-c++
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64thre
ading-multicpp_regex_traits.obj
call "D:Program FilesMicrosoft Visual Studio
8VCvcvarsall.bat"
x86_amd64 >nul
cl /Zm800 -nologo
"bin.v2libsregexbuildmsvc-8.0debugaddress-
model-64threading-multicpp_regex_traits.obj.rsp"
---------------------------------
--
Bojan Resnik
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|
|
| Re: How to build 64-bit executables
with msvc? |

|
2007-10-09 12:37:27 |
|
On 10/8/07, Bojan Resnik < resnikb gmail.com">resnikb gmail.com> wrote:
> Interesting. Would you mind answering a couple of questions for me, so that > I could get to the bottom of this:
> > 1) My user-config.jam initially contained only: > > import toolset : using ; > using msvc ; > > Does yours have anything more interesting that might be making the > difference?
Since I have several versions of msvc, I use using msvc : all ;
Other than this, there is nothing else in user-config.jam.
> 2) I am using VC8SP1 on a current version of XP (32-bit). Any differences in
> your configuration?
I am using VC8 without the service pack, Windows XP SP2 32bit.
> 3) I am using the boost build that shipped with 1.34.1 (not M12). You?
I am using the SVN version. However, I think it has worked for a
while now, even with BB shipped with 1.34.1.
> 4) Would you be willing to build with the -d2 flag and paste a small snippet > here so that I see what options are bing fed to the compiler?
Below is a part of output after running
bjam -d+2 msvc-8.0 address-model=64 regex
I think something is wrong with your setup or installation, as I don't get errors for using /favor:blend.
--------------------------------- file
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj.rsp "libsregexsrc..srcc_regex_traits.cpp" -Fo"bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj
" -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /favor:blend /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_REGEX_DYN_LINK=1
"-I."
compile-c-c++
bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj
call "D:Program FilesMicrosoft Visual Studio 8VCvcvarsall.bat" x86_amd64 >nul cl /Zm800 -nologo
"bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multic_regex_traits.obj.rsp"
c_regex_traits.cpp .boost/regex/v4/c_regex_traits.hpp(38) : warning C4103: 9;e:third_partyboost-
1.34.1boostregexv4c_regex_traits.hpp' : alignment changed after including header, may be due to missing #pragma pack(pop) .boost/regex/v4/c_regex_traits.hpp(191) : warning C4103: 9;e:third_partyboost-
1.34.1boostregexv4c_regex_traits.hpp' : alignment changed after including header, may be due to missing #pragma pack(pop) .boost/regex/v4/primary_transform.hpp(24) : warning C4103: 9;e:third_partyboost-
1.34.1boostregexv4primary_transform.hpp'; : alignment changed after including header, may be due to missing #pragma pack(pop) .boost/regex/v4/primary_transform.hpp(122) : warning C4103: 9;e:third_partyboost-
1.34.1boostregexv4primary_transform.hpp'; : alignment changed after including header, may be due to missing #pragma pack(pop) .boost/regex/v4/regex_traits_defaults.hpp(23) : warning C4103: 9;e:third_partyboost-
1.34.1boostregexv4regex_traits_defaults.hpp' : alignment changed after including header, may be due to missing #pragma pack(pop) .boost/regex/v4/regex_traits_defaults.hpp(314) : warning C4103: 9;e:third_partyboost-
1.34.1boostregexv4regex_traits_defaults.hpp' : alignment changed after including header, may be due to missing #pragma pack(pop) libsregexsrc..srcc_regex_traits.cpp(43) : warning C4103: 9;e:third_partyboost-
1.34.1libsregexsrcc_regex_traits.cpp' : alignment changed after including header, may be due to missing #pragma pack(pop) libsregexsrc..srcc_regex_traits.cpp(203) : warning C4103: 9;e:third_partyboost-
1.34.1libsregexsrcc_regex_traits.cpp' : alignment changed after including header, may be due to missing #pragma pack(pop)
file bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multicpp_regex_traits.obj.rsp
"libsregexsrc..srccpp_regex_traits.cpp" -Fo"bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multicpp_regex_traits.obj" -TP /Z7 /Od /Ob0 /W3 /GR /MDd
/Zc:forScope /favor:blend /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_REGEX_DYN_LINK=1
"-I."
compile-c-c++ bin.v2libsregexbuildmsvc-8.0debugaddress-model-64threading-multicpp_regex_traits.obj
call "D:Program FilesMicrosoft Visual Studio 8VCvcvarsall.bat" x86_amd64 >nul cl /Zm800 -nologo
"bin.v2libsregexbuildmsvc-8.0debugaddr | |