|
Boost-Build : |
Subject: Re: [Boost-build] Building boost with Python 3.5 links to 3.6
From: Robert (r.firl_at_[hidden])
Date: 2017-09-25 20:04:25
On 9/22/2017 6:58 AM, SzÅts Ãkos via Boost-build wrote:
> Dear Boost Developers,
>
> I'd like to compile Boost 1.65.1 with Python 3.5 support on Windows with
> VS 2015. Python is installed from x64 Anaconda distribution into a so
> called python virtual environment (along with v3.6 in the default
> environment).
>
> I created the following user-config.jam in tools/build/src:
>
> Â using python
> Â Â Â : 3.5 Â # Version
>    : C:\\ProgramData\\Anaconda3\\envs\\python-35\\python.exe  #
> Interpreter
>    : C:\\ProgramData\\Anaconda3\\envs\\python-35\\include  # include
> directory
>    : C:\\ProgramData\\Anaconda3\\envs\\python-35\\libs  # link libraries
> Â Â Â : <address-model>64 Â # conditions
> Â Â Â ;
I am not sure you can separate the sections on a line by line basis.
Someone who knows b2 much better than I can confirm. Regardless, I use
Python 2.7 via user-config.jam. The line is:
using python : 2.7 : C:\\Python27 : C:\\Python27\\include :
C:\\Python27\\libs ;
I then have the output files between Boost, Python and the compiler
named similarly to:
boost_python-vc141-mt-1_65_1.lib
--Robert
> After executing ./bootstrap.bat (with no options given to it), I call
> the compiled b2.exe the following way:
>
>   b2.exe -j 16 --debug-configuration  \
> Â Â Â --prefix=<my_boost_lib_dir> -sBOOST_ROOT=<my_boost_dir> \
> Â Â Â threading=multi variant=debug,release link=static
> runtime-link=static \
> Â Â Â address-model=64 optimization=speed toolset=msvc \
>    --with-python  <--with-[...]> \
> Â Â Â install
> My problem is the resulting .lib libraries somehow contain references to
> python36.lib (and not to python35.lib):
> $> dumpbin.exe /directives libboost_python3-vc140-mt-s-1_65_1.lib |
> findstr python3
> Â Â /DEFAULTLIB:python36.lib
> Â Â /DEFAULTLIB:python36.lib
> Â Â /DEFAULTLIB:python36.lib
> Â Â /DEFAULTLIB:python36.lib
> Â Â /DEFAULTLIB:python36.lib
> Â Â [...]
>
> b2 outputs the following:
> [python-cfg] Configuring python...
> [python-cfg] Â user-specified version: "3.5"
> [python-cfg] Â user-specified cmd-or-prefix:
> "C:\ProgramData\Anaconda3\envs\python-35\python.exe"
> [python-cfg] Â user-specified includes:
> "C:\ProgramData\Anaconda3\envs\python-35\include"
> [python-cfg] Â user-specified libraries:
> "C:\ProgramData\Anaconda3\envs\python-35\libs"
> [python-cfg] Â user-specified condition: "<address-model>64"
> [python-cfg] Checking interpreter command
> "C:\ProgramData\Anaconda3\envs\python-35\python.exe"...
> [python-cfg] running command 'DIR /-C /A:S
> "C:\ProgramData\Anaconda3\envs\python-35\python.exe" 2>&1'
> [python-cfg] running command
> 'C:\ProgramData\Anaconda3\envs\python-35\python.exe -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'
> [python-cfg] ...requested configuration matched!
> [python-cfg] Details of this Python configuration:
> [python-cfg] Â interpreter command:
> "C:\ProgramData\Anaconda3\envs\python-35\python.exe"
> [python-cfg] Â include path:
> "C:\ProgramData\Anaconda3\envs\python-35\include"
> [python-cfg] Â library path: "C:\ProgramData\Anaconda3\envs\python-35\libs"
> [python-cfg] Â DLL search path: "C:\ProgramData\Anaconda3\envs\python-35"
> [python-cfg] Checking for NumPy...
> [python-cfg] running command
> 'C:\ProgramData\Anaconda3\envs\python-35\python.exe -c "import sys;
> sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
> [python-cfg] NumPy enabled
>
> Do you have any idea how to enable linking to Python 3.5?
>
> Thank you very much!
>
> All the best,
>
> Ãkos
>
>
>
> _______________________________________________
> Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
>
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