|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-06-26 08:41:17
On Tuesday 24 June 2008 18:52:22 Beverly Pope wrote:
> Hi,
> I am a complete newbie at boost, who must compile several Boost 1.33.1 Libraries on 64-bit MS Windows Vista, using MS VS2005. I downloaded the 64-bit version of Python (python-2.5.2.amd64.msi) as well as bjam (boost-jam-3.1.16-1-ntx86.zip) and Boost 1.33.1 (boost_1_33_1.zip); I then installed Python and extracted the other two files, placing bjam in the PATH.
>
> I tried various things to build the libraries. I finally got some (not all) of them to build, but I am still confused.
>
> I first changed boost_1_33_1\tools\build\v2\user-config.jam to include the following lines:
> using msvc : 8.0 : "c:\program files (x86)\microsoft visual studio 8\vc\bin\amd64\cl.exe" ;
> using python : 2.5 : "D:\chap\chears\devel\intersect\Libraries\pc\win64_vs80\python\Python2.5"
>
> I am using the following command (myBoostDir == d:\work\intersect\boost_1_33_1):
> bjam ^
> -sTOOLS=msvc ^
> --prefix=%myBoostDir%\newboost ^
> --builddir=%myBoostDir%\newboost ^
> --debug-configuration ^
> stage ^
> > %myBoostDir%\logfile.txt 2>&1
> However, that build tells me that it is using the configurations from the v1 directory, when I thought it is supposed to use the v2 directory?
> notice: loading Boost.Build from D:/work/intersect/boost_1_33_1/tools/build/v1
Boost 1.33.1 uses Boost.Build V1 by default, you need --v2 option to use V2. Further, -sTOOLS=msvc should be actually "toolset=msvc".
I must admit I don't remember if 64-bit compilation actually works there -- V2 is unofficial there.
> The next thing I see is something about "spirit", which I did not see in the documentation.
> **** spirit 1.6x required to build library with this compiler ****
> **** skipping build of <@boost!libs!serialization!build>libboost_serialization.lib; toolset= msvc variant= debug ****
> And worst of all, it tries to use VC98 for the builds, which of course fails:
> CALL "C:\Program Files (x86)\Microsoft Visual Studio\VC98\bin\VCVARS32.BAT" >nul
>
> I then tried copying user-config.jam to my boost_1_33_1 directory, but that did not help. Reading the documentation, I saw that if one sets MSVCDir, then the builds are supposed to bypass running msvcvars32.bat, so I did that and that's when I actually got something to build. It still uses the v1 configurations and issues the message about spirit. However, it does build most of the libraries.
Good, then presumably this is a solution for your build issues.
> The python one gets the following build errors:
> vc-C++ d:\work\intersect\boost_1_33_1\newboost\bin\boost\libs\python\build\boost_python.dll\msvc\debug\threading-multi\object_protocol.obj
> object_protocol.cpp
> D:\work\intersect\boost_1_33_1\libs\python\build\../src/object_protocol.cpp(110) : error C2664: '_PyEval_SliceIndex' : cannot convert parameter 2 from 'int *' to 'Py_ssize_t *'
> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Seems like a real error? I guess you either get to debug it, or ask Boost.Python developers on boost_at_[hidden]
> D:\work\intersect\boost_1_33_1\libs\python\build\../src/object_protocol.cpp(112) : error C2664: '_PyEval_SliceIndex' : cannot convert parameter 2 from 'int *' to 'Py_ssize_t *'
> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> D:\work\intersect\boost_1_33_1\libs\python\build\../src/object_protocol.cpp(137) : error C2664: '_PyEval_SliceIndex' : cannot convert parameter 2 from 'int *' to 'Py_ssize_t *'
> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> D:\work\intersect\boost_1_33_1\libs\python\build\../src/object_protocol.cpp(139) : error C2664: '_PyEval_SliceIndex' : cannot convert parameter 2 from 'int *' to 'Py_ssize_t *'
> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> I also got the following error when building thread:
> vc-Link d:\work\intersect\boost_1_33_1\newboost\bin\boost\libs\thread\build\boost_thread.dll\msvc\release\threading‑multi\boost_thread-vc6-mt-1_33_1.dll
> Creating library d:\work\intersect\boost_1_33_1\newboost\bin\boost\libs\thread\build\boost_thread.dll\msvc\release\threading‑multi\boost_thread-vc6-mt-1_33_1.lib and object d:\work\intersect\boost_1_33_1\newboost\bin\boost\libs\thread\build\boost_thread.dll\msvc\release\threading-multi\boost_thread-vc6-mt-1_33_1.exp
> once.obj : error LNK2019: unresolved external symbol _InterlockedCompareExchange referenced in function "long __cdecl `anonymous namespace'::compare_exchange(long * volatile,long,long)" (?compare_exchange@?A0x3441aea5@@YAJREAJJJ_at_Z)
> d:\work\intersect\boost_1_33_1\newboost\bin\boost\libs\thread\build\boost_thread.dll\msvc\release\threading-multi\boost_thread-vc6-mt-1_33_1.dll : fatal error LNK1120: 1 unresolved externals
>
> It did build the following libraries, but it put "vc6" in their file names:
> boost_date_time-vc6-mt-gd-1_33_1.dll
> boost_date_time-vc6-mt-1_33_1.dll
> boost_filesystem-vc6-mt-gd-1_33_1.dll
> boost_filesystem-vc6-mt-1_33_1.dll
> boost_iostreams-vc6-mt-gd-1_33_1.dll
> boost_iostreams-vc6-mt-1_33_1.dll
> boost_program_options-vc6-mt-gd-1_33_1.dll
> boost_program_options-vc6-mt-1_33_1.dll
> boost_regex-vc6-mt-gd-1_33_1.dll
> boost_regex-vc6-mt-1_33_1.dll
> boost_signals-vc6-mt-gd-1_33_1.dll
> boost_signals-vc6-mt-1_33_1.dll
>
> For those unfamiliar with 64-bit MS Windows Vista, one runs the following BATCH program to initialize into the proper Visual Studio environment -- not ...\VC\bin\vcvars32.bat.
> "c:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat" "platform"
> Where "platform" can be x86 (32-bit), amd64 (or x64), ia64, x86_amd64 or x86_ia64.
>
> At any rate, I would appreciate some pointers on how to build for the x64 platform given all of the above.
I think you have two approaches:
1. Just use the approach you use now, and ignore "vc6" in names.
2. Grab Boost 1.35, and copy tools/build/v2 from there to 1.33.1. Then, build with:
bjam toolset=msvc address-model=64
I don't know the reason for compile error -- I doubt it's build system issue.
- Volodya
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