0

I would like to use the Boost Filesystem library, and I am trying to install Boost on my Windows machine. I am using CodeBolcks for development. I made the following:

1) I downloaded and extracted boost to: d:\boost_1_53_0

2) I downloaded and extracted jam executable to: d:\boost-jam-3.1.18-1-ntx86

3) I added "d:\boost-jam-3.1.18-1-ntx86" to my PATH environment variable.

4) I go to "d:\boost_1_53_0", and run the following command:

bjam --toolset=gcc "--prefix=D:\Program Files\CodeBlocks" install

I get the following output:

warning: mismatched versions of Boost.Build engine and core
warning: Boost.Build engine (bjam) is 03.1.18
warning: Boost.Build core (at D:/boost_1_53_0/tools/build/v2) is 2011.12-svn
D:/boost_1_53_0/tools/build/v2/util\path.jam:476: in path.makedirs
rule MAKEDIR unknown in module path.
D:/boost_1_53_0/tools/build/v2/build\configure.jam:190: in configure.set-log-file
D:/boost_1_53_0/tools/build/v2\build-system.jam:725: in load
D:\boost_1_53_0\tools\build\v2/kernel\modules.jam:283: in import
D:\boost_1_53_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build
D:\boost_1_53_0\boost-build.jam:17: in module scope

Does anybody have an idea how to solve this problem?

Thanks

UPDATE 1:

As per your advice, I tried to use bootstrap.bat, from Boost folder. However, I received the following output:

D:\boost_1_53_0>bootstrap.bat gcc
Building Boost.Build engine

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

The bootstrap.log file contained the following:

###
### Using 'gcc' toolset.
###

D:\boost_1_53_0\tools\build\v2\engine>if exist bootstrap rd /S /Q bootstrap 

D:\boost_1_53_0\tools\build\v2\engine>md bootstrap 

D:\boost_1_53_0\tools\build\v2\engine>gcc -DNT -o bootstrap\jam0.exe  command.c compile.c constants.c debug.c execnt.c filent.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c pwd.c class.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c 

D:\boost_1_53_0\tools\build\v2\engine>.\bootstrap\jam0 -f build.jam --toolset=gcc "--toolset-root= "  clean 
...found 1 target...
...updating 1 target...
...updated 1 target...

D:\boost_1_53_0\tools\build\v2\engine>.\bootstrap\jam0 -f build.jam --toolset=gcc "--toolset-root= "  
...found 50 targets...
...updating 2 targets...
[COMPILE] bin.ntx86\b2.exe

"gcc"   -o bin.ntx86\b2.exe "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DNT" "-DYYSTACKSIZE=5000" "-pedantic" "-fno-strict-aliasing" "-s" "-O3" "-Wno-long-long" "command.c" "compile.c" "constants.c" "debug.c" "function.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "object.c" "option.c" "output.c" "parse.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "pwd.c" "class.c" "native.c" "md5.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execnt.c" "filent.c" "pathunix.c" 

...failed [COMPILE] bin.ntx86\b2.exe...
...removing bin.ntx86\b2.exe
...skipped bjam.exe for lack of b2.exe...
...failed updating 1 target...
...skipped 1 target...

What is you advice?

UPDATE 2:

D:\boost_1_53_0\tools\build\v2>bootstrap.bat gcc
Bootstrapping the build engine

Failed to bootstrap the build engine
Please consult bootstrap.log for furter diagnostics.

The bootstrap.log file contains the same contents as in UPDATE 1. Where is the problem? Thanks

Ababneh A
  • 1,104
  • 4
  • 15
  • 32
  • Have you tried run bootstrap.bat from boost distribution? – Sergei Nikulov Feb 14 '13 at 14:56
  • possible duplicate http://stackoverflow.com/questions/14181832/install-boost-on-windows-with-codeblocks/14186795#14186795 – StoryTeller - Unslander Monica Feb 14 '13 at 15:10
  • The distribution of boost that you'd download on windows comes with its own build chain, no need to install jam separately. As you have seen, this only leads to problems. – us2012 Feb 14 '13 at 15:11
  • @StoryTeller. In fact, I used build.bat from the tools\build\v2\engine folder, and I got the same output as the one I got in bootstrap.log (The message is in the update of my question). On the other hand, "gcc --version" command gives me the version. – Ababneh A Feb 14 '13 at 15:17
  • @us2012 If I got your point correctly, I do not need to download bjam executable or download the bjam source code. This sounds great. However, from the output, it seems that building bjam is failing. How to build jam from the boost distribution folder? – Ababneh A Feb 14 '13 at 15:24
  • @farm What I was saying was that you shouldn't need to download boost-jam separately, but follow the instructions here: http://www.boost.org/doc/libs/1_53_0/more/getting_started/windows.html#install-boost-build - the official boost documentation on installing in Windows. Nothing in there says anything about a build.bat? – us2012 Feb 14 '13 at 15:30
  • @us2012 I followed these instructions. When I run the bootstrap.bat command, it returned a message. I will put it as an update in my question in a moment. – Ababneh A Feb 14 '13 at 15:34
  • @farm, you should open the bat files and read them over, and pass the proper options to them. Otherwise, they make an attempt to "guess" the toolset which more often than not just doesn't work. – StoryTeller - Unslander Monica Feb 14 '13 at 15:37
  • @StoryTeller In fact, I passed "gcc" as an argument to the bootstrap.bat command. The command output and the log file can be found in UPDATE 2 of my question. However, I will read the bat files and see if I can find anything interesting. – Ababneh A Feb 14 '13 at 15:49
  • The question is a little complicated now. I will try to put it in a simpler way in another question. – Ababneh A Feb 14 '13 at 16:31

2 Answers2

2

You must have installed the boost.build package from another source (not the one that comes with the boost tar distribution).

If you want to get rid of the warning, you need to install boost-build from the same package as your boost distribution. To make sure they're all the same and up to date, just download boost from here and unpack it. Follow the installation instructions for boost (basically bootstrap then b2) after that is done, go into tools/build/v2 and do a bootstrap.sh and b2. Then you will generate the b2 and bjam files corresponding to this boost release, and won't have this warning anymore.

Carneiro
  • 3,479
  • 5
  • 24
  • 36
0

Set the %PATH% variable with the location of where 'gcc.exe' resides in envs variables by right clicking my computer and properties, and restart the prompt and run again.

Nik
  • 1,294
  • 10
  • 16