Building Boost 32/64 on Windows: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
== Building boost x64 "release only" in windows from command line using ready icu binaries ==
= Building boost x64 "release only" in windows from command line using ready icu binaries =


Boost x64 binaries are not available from boost or not exactly the right tool version perhaps
Boost x64 binaries are not available from boost or not exactly the right tool version perhaps


=== Getting ICU's binary libraries ===
== Getting ICU's binary libraries ==


*Building boost x64 binaries WITH UNICODE REGEX SUPPORT requires icu x64 binaries which we have to make or get
*Building boost x64 binaries WITH UNICODE REGEX SUPPORT requires icu x64 binaries which we have to make or get
Line 9: Line 9:
*Building icu debug version can be done from command line but requires a path to visual studio's bscmake (express will do)
*Building icu debug version can be done from command line but requires a path to visual studio's bscmake (express will do)


==== Built from Source ====
=== From ICU Project (Release Only/No Debug) ===
 
[[Building ICU 32/64 on Windows]]
 
==== Ready made from Exodus Project (x86/x64/Release/Debug) ====
 
http://exodusdb.googlecode.com/files/icu461-vc100-x86x64-rd.zip
 
You will also need the include/headers from: [[Building_ICU_32/64_on_Windows#Get_ICU_Source]]
 
==== From ICU Project (Release Only/No Debug) ====


Here we get "release only" binaries from icu at http://site.icu-project.org/download
Here we get "release only" binaries from icu at http://site.icu-project.org/download
Line 33: Line 23:
  dir F:\icu4c-4_6-Win64-msvc10\icu
  dir F:\icu4c-4_6-Win64-msvc10\icu


=== Define ICU Location ===
== Define ICU Location ==


  set ICU64=F:\icu4c-4_6-Win64-msvc10\icu
  set ICU64=F:\icu4c-4_6-Win64-msvc10\icu
Line 39: Line 29:
  dir %ICU64%
  dir %ICU64%


=== Get Boost Source ===
== Get Boost Source ==


To unzip boost files fast get 7-Zip because Windows is intolerably slow to unzip the large number of files in Boost.
To unzip boost files fast get 7-Zip because Windows is intolerably slow to unzip the large number of files in Boost.
Line 57: Line 47:
  http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.zip/download
  http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.zip/download


=== Build Boost Builder ===
== Build Boost Builder ==


Install Windows SDK and get into a SDK command line and get into boost
Install Windows SDK and get into a SDK command line and get into boost
Line 69: Line 59:
  bootstrap
  bootstrap


=== Check if Boost builds with ICU ===
== Check if Boost builds with ICU ==


First build the regex library only to check that icu is being used
First build the regex library only to check that icu is being used
Line 78: Line 68:
If it says HAS_ICU=NO then do the following work otherwise skip to final section and build all five boost binary libraries needed by Exodus
If it says HAS_ICU=NO then do the following work otherwise skip to final section and build all five boost binary libraries needed by Exodus


==== Work-around for "HAS_ICU BUILDS: NO" ====
=== Work-around for "HAS_ICU BUILDS: NO" ===


bjam should not use the debug libraries while building regex so probably we can just use the release versions as debug to get around the icu detection!
bjam should not use the debug libraries while building regex so probably we can just use the release versions as debug to get around the icu detection!
Line 86: Line 76:
  copy icuuc.lib icuucd.lib
  copy icuuc.lib icuucd.lib


==== If the work-around doesnt work! ====
=== If the work-around doesnt work! ===


A boost build bug that tests for existence of *debug* version of ICU even when building release only version of boost. config.log will show you all the attempted linking including bin/bin64 lib/lib64 issues. also includes list of libraries in a @file
A boost build bug that tests for existence of *debug* version of ICU even when building release only version of boost. config.log will show you all the attempted linking including bin/bin64 lib/lib64 issues. also includes list of libraries in a @file
Line 97: Line 87:
maybe your ICU_PATH IS WRONG
maybe your ICU_PATH IS WRONG


=== Build Boost with ICU ===
== Build Boost with ICU ==


  setenv /x64 /Release
  setenv /x64 /Release
Line 103: Line 93:
  dir stage64\lib
  dir stage64\lib


== Building Boost 32/64/Debug/Release ==
= Complete Build of Boost 32/64/Debug/Release =


If you have acquired or built a complete set of ICU 32/64/release/debug libraries then you can build the same for boost and therefore can build Exodus in any configuration or platform.
If you have acquired or built a complete set of ICU 32/64/release/debug libraries then you can build the same for boost and therefore can build Exodus in any configuration or platform.
== Getting ICU's binary libraries ==
*Building boost x64 binaries WITH UNICODE REGEX SUPPORT requires icu x64 binaries which we have to make or get
*NB building icu "release only" can be done from the command line with sdk only
*Building icu debug version can be done from command line but requires a path to visual studio's bscmake (express will do)
=== Built from Source ===
[[Building ICU 32/64 on Windows]]
=== Ready made from Exodus Project (x86/x64/Release/Debug) ===
http://exodusdb.googlecode.com/files/icu461-vc100-x86x64-rd.zip
You will also need the include/headers from: [[Building_ICU_32/64_on_Windows#Get_ICU_Source]]
== Complete Build ==


<pre>
<pre>

Revision as of 23:23, 15 May 2011

Building boost x64 "release only" in windows from command line using ready icu binaries

Boost x64 binaries are not available from boost or not exactly the right tool version perhaps

Getting ICU's binary libraries

  • Building boost x64 binaries WITH UNICODE REGEX SUPPORT requires icu x64 binaries which we have to make or get
  • NB building icu "release only" can be done from the command line with sdk only
  • Building icu debug version can be done from command line but requires a path to visual studio's bscmake (express will do)

From ICU Project (Release Only/No Debug)

Here we get "release only" binaries from icu at http://site.icu-project.org/download

http://download.icu-project.org/files/icu4c/4.6/icu4c-4_6-Win64-msvc10.zip

and extract to

F:\icu4c-4_6-Win64-msvc10

check they are at the right level

dir F:\icu4c-4_6-Win64-msvc10\icu

Define ICU Location

set ICU64=F:\icu4c-4_6-Win64-msvc10\icu
rem set ICU64=F:\icu4c-4_6_1-src\icu
dir %ICU64%

Get Boost Source

To unzip boost files fast get 7-Zip because Windows is intolerably slow to unzip the large number of files in Boost.

http://www.7-zip.org/download.html

Get boost source and open in 7-Zip's File Manager "FM"

http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.7z/download

Extract to F:\ so that subfolder isnt doubled up as f:\exodus_1_46_1\exodus_1_46_1\

f:\boost_1_46_1

or just get boost zip but Windows unzips Boost intolerably slowly

http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.zip/download

Build Boost Builder

Install Windows SDK and get into a SDK command line and get into boost

f:
cd \boost_1_46_1

NOTE the boost builder "bjam" MUST be built in x86 mode!

setenv /x86 /Release
bootstrap

Check if Boost builds with ICU

First build the regex library only to check that icu is being used

setenv /x64 /Release
bjam variant=release --toolset=msvc-10.0 architecture=x86 address-model=64 -sICU_PATH=%ICU64% --with-regex stage --stagedir=stage64 -j2 -a

If it says HAS_ICU=NO then do the following work otherwise skip to final section and build all five boost binary libraries needed by Exodus

Work-around for "HAS_ICU BUILDS: NO"

bjam should not use the debug libraries while building regex so probably we can just use the release versions as debug to get around the icu detection!

cd icu\lib64
copy icuin.lib icuind.lib
copy icuuc.lib icuucd.lib

If the work-around doesnt work!

A boost build bug that tests for existence of *debug* version of ICU even when building release only version of boost. config.log will show you all the attempted linking including bin/bin64 lib/lib64 issues. also includes list of libraries in a @file

notepad bin\v2\config.log
notepad bin.v2\libs\regex\build\msvc-10.0\debug\address-model-64\architecture-x86\threading-multi\has_icu.exe.rsp
LINK : fatal error LNK1181: cannot open input file 'icuind.lib'

maybe your ICU_PATH IS WRONG

Build Boost with ICU

setenv /x64 /Release
bjam variant=release --toolset=msvc-10.0 architecture=x86 address-model=64 -sICU_PATH=%ICU64% --with-date_time --with-filesystem --with-regex --with-system --with-thread stage --stagedir=stage64 -j2 -a
dir stage64\lib

Complete Build of Boost 32/64/Debug/Release

If you have acquired or built a complete set of ICU 32/64/release/debug libraries then you can build the same for boost and therefore can build Exodus in any configuration or platform.

Getting ICU's binary libraries

  • Building boost x64 binaries WITH UNICODE REGEX SUPPORT requires icu x64 binaries which we have to make or get
  • NB building icu "release only" can be done from the command line with sdk only
  • Building icu debug version can be done from command line but requires a path to visual studio's bscmake (express will do)

Built from Source

Building ICU 32/64 on Windows

Ready made from Exodus Project (x86/x64/Release/Debug)

http://exodusdb.googlecode.com/files/icu461-vc100-x86x64-rd.zip

You will also need the include/headers from: Building_ICU_32/64_on_Windows#Get_ICU_Source

Complete Build

set ICU32=icu4c-4_6_1-src
set ICU64=icu4c-4_6_1-src

setenv /x64
bjam --toolset=msvc-10.0 architecture=x86 address-model=64 -sICU_PATH=%ICU64% --with-date_time --with-filesystem --with-regex --with-system --with-thread stage --stagedir=stage64 -j2 -a
dir stage64\lib

setenv /x86
bjam --toolset=msvc-10.0 architecture=x86 address-model=64 -sICU_PATH=%ICU32% --with-date_time --with-filesystem --with-regex --with-system --with-thread stage --stagedir=stage32 -j2 -a
dir stage32\lib