|
Boost-Build : |
Subject: Re: [Boost-build] Boost.Python build (config ?) error
From: Sophonet (boost_at_[hidden])
Date: 2017-03-29 08:59:25
Hi list,
thanks for the correction, which partly solves the problem which I have
more or less reported at the same time
(http://lists.boost.org/boost-build/2017/03/29342.php).
However, it is still not possible to specify a boost version in the b2
configuration command line. Always the first entry of user-config.jam is
selected.
Example: I have python 3.5 and python 3.6 installed on my system
(conda). My user-config.jam looks like this (note: 3.5 is first):
using python : 3.5 : C:/Miniconda3/envs/py35/python.exe
: #includes
: #libs
: <address-model>64 ;
using python : 3.6 : C:/Miniconda3/envs/py36/python.exe
: #includes
: #libs
: <address-model>64 ;
However,
b2 --build-dir=D:\build\boost_1_64_0 --prefix=D:\install\86
address-model=64 python=3.6 --with-python variant=release
[--debug-configuration]
the given python version (which is 3.6) seems to be ignored. A snippet
of the debug output is copied below. Note that it says "...requested
configuration matched" for the first try (which is 3.5). The final
boost_python dll in this example incorrectly depends on python 3.5.
Best regards,
Sophonet
[...]
notice: Loading user-config configuration file 'user-config.jam' from
'C:/Users/USERNAME'.
notice: [python-cfg] Configuring python...
notice: [python-cfg] user-specified version: "3.5"
notice: [python-cfg] user-specified cmd-or-prefix:
"C:/Miniconda3/envs/py35/python.exe"
notice: [python-cfg] user-specified condition: "<address-model>64"
notice: [python-cfg] Checking interpreter command
"C:/Miniconda3/envs/py35/python.exe"...
notice: [python-cfg] running command 'DIR /-C /A:S
"C:\Miniconda3\envs\py35\python.exe" 2>&1'
notice: [python-cfg] running command 'C:/Miniconda3/envs/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'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg] interpreter command:
"C:/Miniconda3/envs/py35/python.exe"
notice: [python-cfg] include path: "C:\Miniconda3\envs\py35\Include"
notice: [python-cfg] library path: "C:\Miniconda3\envs\py35\libs"
notice: [python-cfg] DLL search path: "C:\Miniconda3\envs\py35"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'C:/Miniconda3/envs/py35/python.exe
-c "import sys; sys.stderr = sys.stdout; import numpy;
print(numpy.get_include())"'
notice: [python-cfg] NumPy disabled. Reason:
notice: [python-cfg] C:/Miniconda3/envs/py35/python.exe -c "import
sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"
aborted with
notice: [python-cfg] Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'numpy'
notice: [python-cfg] Configuring python...
notice: [python-cfg] user-specified version: "3.6"
notice: [python-cfg] user-specified cmd-or-prefix:
"C:/Miniconda3/envs/py36/python.exe"
notice: [python-cfg] user-specified condition: "<address-model>64"
notice: [python-cfg] Checking interpreter command
"C:/Miniconda3/envs/py36/python.exe"...
notice: [python-cfg] running command 'DIR /-C /A:S
"C:\Miniconda3\envs\py36\python.exe" 2>&1'
notice: [python-cfg] running command 'C:/Miniconda3/envs/py36/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'
notice: [python-cfg] ...requested configuration matched!
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg] interpreter command:
"C:/Miniconda3/envs/py36/python.exe"
notice: [python-cfg] include path: "C:\Miniconda3\envs\py36\Include"
notice: [python-cfg] library path: "C:\Miniconda3\envs\py36\libs"
notice: [python-cfg] DLL search path: "C:\Miniconda3\envs\py36"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'C:/Miniconda3/envs/py36/python.exe
-c "import sys; sys.stderr = sys.stdout; import numpy;
print(numpy.get_include())"'
notice: [python-cfg] NumPy enabled
[...]
Am 2017-03-28 18:07, schrieb Rene Rivera via Boost-build:
> On Tue, Mar 28, 2017 at 11:02 AM, Stefan Seefeld via Boost-build
> <boost-build_at_[hidden]> wrote:
>
>> On 28.03.2017 11:51, Steven Watanabe via Boost-build wrote:
>>> On 03/28/2017 09:00 AM, Stefan Seefeld via Boost-build wrote:
>>>> On 28.03.2017 10:55, Steven Watanabe via Boost-build wrote:
>>>>> AMDG
>>>>>
>>>>> On 03/28/2017 08:01 AM, Stefan Seefeld via Boost-build wrote:
>>>>>> <snip>
>>>>>> - symlinks supported : yes (cached)
>>>>>> error: No best alternative for libs/python/build/boost_python
>>>>>> next alternative: required properties: <python>2.7
>>>>>> matched
>>>>>> next alternative: required properties: <python>2.7
>>>>>> matched
>>>>>> <snip>
>>>>>>
>>>>>> My ~/user-config.jam file contains
>>>>>>
>>>>>>
>>>>>> using python : 2.7 ;
>>>>>> using python : 3.5 : python3 : /usr/include/python3.5m :
>>>>>> /usr/lib64/libpython3.5m.so [1] ;
>>>>>>
>>>>>> Any idea what is wrong ?
>>>>>>
>>>>> Run b2 with --debug-configuration. My first guess is that
>>>>> python is being initialized twice. --debug-configuration
>>>>> should show where the other initialization is coming from.
>>>> I don't see anything suspicious in this output:
>>>>
>>> My mistake. The error is with Boost.Python, not Python.
>>> The cause of this problem is the typo here:
>>> https://github.com/boostorg/python/blob/master/build/Jamfile#L127
>> [2]
>>> which causes the numpy library to be named boost_python also.
>>
>> What would be the correct spelling of those two lines ?
>
> lib_boost_numpy($(py2-version)) = $(lib_boost_numpy(2)) ;
> lib_boost_numpy($(py3-version)) = $(lib_boost_numpy(3)) ;
>
> --
>
> -- Rene Rivera
> -- Grafik - Don't Assume Anything
> -- Robot Dreams - http://robot-dreams.net [3]
> -- rrivera/acm.org [4] (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail
>
>
> Links:
> ------
> [1] http://libpython3.5m.so
> [2] https://github.com/boostorg/python/blob/master/build/Jamfile#L127
> [3] http://robot-dreams.net/
> [4] http://acm.org/
>
> _______________________________________________
> Unsubscribe & other changes:
> http://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