[C++-sig] Building tutorial example out of the boost tree, on Windows

Gary Oberbrunner garyo at genarts.com
Sat Oct 5 21:22:02 CEST 2013


(Hope top-posting is OK on this list, sorry if not)

Thanks -- I had not seen those doc links before.  

I tried your user-config.jam (updated for my config), and bjam does find it, but still fails to find a Jamfile for the tutorial example.  I wonder if there is some problem with the Windows boost installer (exe); maybe I should build boost from source?

NOISE (/tmp/tutorial)  3:11PM 459=>
% bjam --debug-configuration
notice: found boost-build.jam at C:/tmp/tutorial/boost-build.jam
notice: loading Boost.Build from C:/local/boost_1_54_0/tools/build/v2
notice: Searching 'H:\' 'c:\Users\garyo' 'C:\Users\garyo' 'C:/local/boost_1_54_0/tools/build/v2' 'C:/local/boost_1_54_0/tools/build/v2/kernel' 'C:/local/boost_1_54_0/tools/build/v2/util' 'C:/local/boost_1_54_0/tools/build/v2/build' 'C:/local/boost_1_54_0/tools/build/v2/tools' 'C:/local/boost_1_54_0/tools/build/v2/contrib' 'C:/local/boost_1_54_0/tools/build/v2/.' for site-config configuration file 'site-config.jam'.
notice: Loading site-config configuration file 'site-config.jam' from 'C:/local/boost_1_54_0/tools/build/v2'.
notice: Searching 'H:\' 'c:\Users\garyo' 'C:\Users\garyo' 'C:/local/boost_1_54_0/tools/build/v2' 'C:/local/boost_1_54_0/tools/build/v2/kernel' 'C:/local/boost_1_54_0/tools/build/v2/util' 'C:/local/boost_1_54_0/tools/build/v2/build' 'C:/local/boost_1_54_0/tools/build/v2/tools' 'C:/local/boost_1_54_0/tools/build/v2/contrib' 'C:/local/boost_1_54_0/tools/build/v2/.' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'H:/'.
notice: [msvc-cfg] msvc-10.0 detected, command: 'C:\Program Files (x86)\microsoft visual studio 10.0\vc\bin\cl.exe'
notice: will use 'C:\Program Files (x86)\microsoft visual studio 10.0\vc\bin\cl.exe' for msvc, condition <toolset>msvc-10.0
...
notice: [python-cfg] Configuring python...
notice: [python-cfg]   user-specified version: "2.7"
notice: [python-cfg]   user-specified cmd-or-prefix: "C:/Python27"
notice: [python-cfg]   user-specified includes: "C:/Python27/include"
notice: [python-cfg]   user-specified libraries: "C:/Python27/libs"
notice: [python-cfg] Registry indicates Python 2.7 installed at "C:\Python27\"
...
notice: [python-cfg] running command 'C:/Python27\python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg]   interpreter command: "C:/Python27\python"
notice: [python-cfg]   include path: "C:/Python27/include"
notice: [python-cfg]   library path: "C:/Python27/libs"
notice: [python-cfg]   DLL search path: "C:\Python27"
C:/local/boost_1_54_0/tools/build/v2/build\project.jam:262: in find-jamfile from module project
error: Unable to load Jamfile.
error: Could not find a Jamfile in directory '/local/boost_1_54_0'.
error: Attempted to find it with pattern '[Bb]uild.jam [Jj]amfile.v2 [Jj]amfile [Jj]amfile.jam'.

I notice that the Jamroot in the tutorial example has this:

 # Specify the path to the Boost project.  If you move this project,
 # adjust this path to refer to the Boost root directory.
 use-project boost
   : /local/boost_1_54_0 ;

if I modify that dirname, the error refers to a different dir.  And there is no Jamfile in that dir.

Thanks for all your help;

-- Gary

----- Original Message -----
> From: "Wojciech Mamrak" <wmamrak at gmail.com>
> To: "Development of Python/C++ integration" <cplusplus-sig at python.org>
> Sent: Saturday, October 5, 2013 9:42:27 AM
> Subject: Re: [C++-sig] Building tutorial example out of the boost tree,	on Windows
> 
> hi,
> 
> have you placed user-config.jam in your %HOMEDRIVE%%HOMEPATH%
> location, and configured Python inside it, e.g.
> 
> using msvc : 10.0 : : ;
> 
> using python
>   : 2.7 #version
>   : D:/Python27 # cmd-or-prefix
>   : D:/Libs/Python273/include #includes
>   : D:/Libs/Python273/libs #libraries
>   ;
> 
> as described here:
> 
> http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html
> http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html
> http://www.boost.org/boost-build2/doc/html/bbv2/overview/invocation.html
> 
> ?
> 
> regards
> 
> 2013/10/4 Gary Oberbrunner <garyo at genarts.com>:
> > Hi folks -- new to Boost.Python, old-school C/C++/Python developer.
> >
> > I'm trying to set up Boost.Python 1.54.0 on Windows 7, python
> > 2.7.3, Visual Studio 2010. I installed boost_1_54_0 using the VS10
> > installer, then built bjam using 'bootstrap; .\b2 toolset=msvc',
> > then copied bjam into my $PATH.  I can build and run the
> > quickstart and tutorial examples in the distribution (I had to add
> > some MSVC lib dirs as library-path requirements in Jamroot, but
> > that's OK). But when I copy the tutorial example to a different
> > dir, not inside the boost distribution dir, to make it more like a
> > real project, bjam gives build errors. I changed the use-project
> > boost location in Jamroot to /local/boost_1_54_0/ which is where
> > boost wanted to install itself, and added a simple one-line
> > boost-build.jam (based on something I found online):
> >
> >   boost-build C:/local/boost_1_54_0/tools/build/v2 ;
> >
> > but ultimately bjam gives me this error:
> >
> > % bjam
> > notice: no Python configured in user-config.jam
> > notice: will use default configuration
> > C:/local/boost_1_54_0/tools/build/v2/build\project.jam:262: in
> > find-jamfile from module project
> > error: Unable to load Jamfile.
> > error: Could not find a Jamfile in directory '/local/boost_1_54_0'.
> > error: Attempted to find it with pattern '[Bb]uild.jam
> > [Jj]amfile.v2 [Jj]amfile [Jj]amfile.jam'.
> > error: Please consult the documentation at 'http://www.boost.org'.
> > C:/local/boost_1_54_0/tools/build/v2/build\project.jam:280: in
> > load-jamfile from module project
> > C:/local/boost_1_54_0/tools/build/v2/build\project.jam:64: in load
> > from module project
> > C:/local/boost_1_54_0/tools/build/v2/build\project.jam:89: in
> > load-used-projects from module project
> > C:/local/boost_1_54_0/tools/build/v2/build\project.jam:75: in load
> > from module project
> > C:/local/boost_1_54_0/tools/build/v2/build\project.jam:145: in
> > project.find from module project
> > C:/local/boost_1_54_0/tools/build/v2\build-system.jam:535: in load
> > from module build-system
> > C:\local\boost_1_54_0\tools\build\v2/kernel\modules.jam:289: in
> > import from module modules
> > C:\local\boost_1_54_0\tools\build\v2/kernel/bootstrap.jam:139: in
> > boost-build from module
> > C:\tmp\tutorial\boost-build.jam:1: in module scope from module
> >
> > What else do I need to add, or what am I doing wrong?
> >
> > thanks,
> >
> > -- Gary Oberbrunner
> > _______________________________________________
> > Cplusplus-sig mailing list
> > Cplusplus-sig at python.org
> > https://mail.python.org/mailman/listinfo/cplusplus-sig
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> https://mail.python.org/mailman/listinfo/cplusplus-sig
> 

-- 
Gary Oberbrunner


More information about the Cplusplus-sig mailing list