Quantcast

Boost.Python build (config ?) error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Boost.Python build (config ?) error

Boost - Build mailing list
Hello,


I just tried building Boost.Python as part of the Boost meta-project
(using the develop branch), using the invocation

  ./bootstrap.sh

  ./b2 --with-python

resulting in

...

Building the Boost C++ Libraries.


    - 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
error: No best alternative for libs/python/build/boost_python3
    next alternative: required properties: <python>3.5
        not matched
    next alternative: required properties: <python>3.5
        not matched
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
error: No best alternative for libs/python/build/boost_python3
    next alternative: required properties: <python>3.5
        not matched
    next alternative: required properties: <python>3.5
        not matched


My ~/user-config.jam file contains


  using python : 2.7 ;
  using python : 3.5 : python3 : /usr/include/python3.5m :
/usr/lib64/libpython3.5m.so ;

Any idea what is wrong ?

Thanks,

        Stefan

--

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
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 ;
>
> 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.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
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 ;
>>
>> 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:

[stefan@quasimodo boost]$ ./b2 --with-python --debug-configuration
notice: found boost-build.jam at
/home/stefan3/projects/boost/boost-build.jam
notice: loading Boost.Build from
/home/stefan3/projects/boost/tools/build/src
notice: Searching '/etc' '/home/stefan3'
'/home/stefan3/projects/boost/tools/build/src' '/usr/share/boost-build'
'/home/stefan3/projects/boost/tools/build/src/kernel'
'/home/stefan3/projects/boost/tools/build/src/util'
'/home/stefan3/projects/boost/tools/build/src/build'
'/home/stefan3/projects/boost/tools/build/src/tools'
'/home/stefan3/projects/boost/tools/build/src/contrib'
'/home/stefan3/projects/boost/tools/build/src/.' for site-config
configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc'
'/home/stefan3' '/home/stefan3/projects/boost/tools/build/src'
'/usr/share/boost-build'
'/home/stefan3/projects/boost/tools/build/src/kernel'
'/home/stefan3/projects/boost/tools/build/src/util'
'/home/stefan3/projects/boost/tools/build/src/build'
'/home/stefan3/projects/boost/tools/build/src/tools'
'/home/stefan3/projects/boost/tools/build/src/contrib'
'/home/stefan3/projects/boost/tools/build/src/.'.
notice: Searching '/home/stefan3'
'/home/stefan3/projects/boost/tools/build/src' '/usr/share/boost-build'
'/home/stefan3/projects/boost/tools/build/src/kernel'
'/home/stefan3/projects/boost/tools/build/src/util'
'/home/stefan3/projects/boost/tools/build/src/build'
'/home/stefan3/projects/boost/tools/build/src/tools'
'/home/stefan3/projects/boost/tools/build/src/contrib'
'/home/stefan3/projects/boost/tools/build/src/.' for user-config
configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from
'/home/stefan3'.
notice: will use 'g++' for gcc, condition <toolset>gcc-6.3.1
notice: using gcc libraries :: <toolset>gcc-6.3.1 :: /usr/lib64/bin
/usr/lib64/lib /usr/lib64/lib32 /usr/lib64/lib64
notice: using gcc archiver :: <toolset>gcc-6.3.1 :: ar
notice: using gcc ranlib :: <toolset>gcc-6.3.1 :: ranlib
warning: toolset gcc initialization: can not find tool windres
warning: initialized from /home/stefan3/user-config.jam:1
notice: using rc compiler :: <toolset>gcc-6.3.1 :: as
notice: [python-cfg] Configuring python...
notice: [python-cfg]   user-specified version: "2.7"
notice: [python-cfg] Checking interpreter command "python2.7"...
notice: [python-cfg] running command 'python2.7 -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: "python2.7"
notice: [python-cfg]   include path: "/usr/include/python2.7"
notice: [python-cfg]   library path: "/usr/lib/python2.7/config" "/usr/lib"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'python2.7 -c "import sys;
sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy enabled
notice: [python-cfg] Configuring python...
notice: [python-cfg]   user-specified version: "3.5"
notice: [python-cfg]   user-specified cmd-or-prefix: "python3"
notice: [python-cfg]   user-specified includes: "/usr/include/python3.5m"
notice: [python-cfg]   user-specified libraries:
"/usr/lib64/libpython3.5m.so"
notice: [python-cfg] Details of this Python configuration:
notice: [python-cfg]   interpreter command: "python3"
notice: [python-cfg]   include path: "/usr/include/python3.5m"
notice: [python-cfg]   library path: "/usr/lib64/libpython3.5m.so"
notice: [python-cfg] Checking for NumPy...
notice: [python-cfg] running command 'python3 -c "import sys; sys.stderr
= sys.stdout; import numpy; print(numpy.get_include())"'
notice: [python-cfg] NumPy enabled
notice: Searching '.' for project-config configuration file
'project-config.jam'.
notice: Loading project-config configuration file 'project-config.jam'
from '.'.
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
Performing configuration checks

    - 32-bit                   : no  (cached)
    - 64-bit                   : yes (cached)
    - arm                      : no  (cached)
    - mips1                    : no  (cached)
    - power                    : no  (cached)
    - sparc                    : no  (cached)
    - x86                      : yes (cached)

Building the Boost C++ Libraries.


    - 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
error: No best alternative for libs/python/build/boost_python3
    next alternative: required properties: <python>3.5
        not matched
    next alternative: required properties: <python>3.5
        not matched
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
error: No best alternative for libs/python/build/boost_python3
    next alternative: required properties: <python>3.5
        not matched
    next alternative: required properties: <python>3.5
        not matched


Thanks,
        Stefan


--

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
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 ;
>>>
>>> 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
which causes the numpy library to be named boost_python also.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
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 ;
>>>>
>>>> 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
> which causes the numpy library to be named boost_python also.

What would be the correct spelling of those two lines ?

Thanks,
        Stefan


--

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list


On Tue, Mar 28, 2017 at 11:02 AM, Stefan Seefeld via Boost-build <[hidden email]> 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 ;
>>>>
>>>> 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
> 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
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
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
> <[hidden email]> 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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
AMDG

On 03/29/2017 02:59 AM, Sophonet via Boost-build wrote:

> <snip>
> 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 ;
>
> <snip>
>

  The Boost.Python Jamfile seems to be written assuming
that there is at most one each of Python 2 and 3.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
On 29.03.2017 09:31, Steven Watanabe via Boost-build wrote:
>
>   The Boost.Python Jamfile seems to be written assuming
> that there is at most one each of Python 2 and 3.

Indeed, and (for avoidance of doubt) I'm in no position to change that,
given my still very limited understanding of the build logic. It seems
there are more fundamental issues that would need to be resolved, such
as the Python version being embedded into the target file paths (the way
the toolset name now is, say). These changes go deeper than just the
Jamfile itself, I believe. At least the python.jam module, may be more.
And I'm not sure there is anyone who understands all of this to fix it,
unfortunately.



        Stefan

--

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
Am 2017-03-29 16:02, schrieb Stefan Seefeld via Boost-build:

> On 29.03.2017 09:31, Steven Watanabe via Boost-build wrote:
>>
>>   The Boost.Python Jamfile seems to be written assuming
>> that there is at most one each of Python 2 and 3.
>
> Indeed, and (for avoidance of doubt) I'm in no position to change that,
> given my still very limited understanding of the build logic. It seems
> there are more fundamental issues that would need to be resolved, such
> as the Python version being embedded into the target file paths (the
> way
> the toolset name now is, say). These changes go deeper than just the
> Jamfile itself, I believe. At least the python.jam module, may be more.
> And I'm not sure there is anyone who understands all of this to fix it,
> unfortunately.

Well, there is some misunderstanding here - I don't think that anyone
would like to build several boost python3 versions at the same time, so
it's fine that there is at most one each of python 2 and 3.

The problem is that the python version specified on the command line is
not processed correctly, but that, instead, a different one (the first
one from user-config.jam) is used. There is already a ticket for this
problem (https://svn.boost.org/trac/boost/ticket/12515) - which is still
unassigned. The problem has been introduced by a patch of "grafikrobot"
in July 2016. Any chance that grafikrobot follows this list? He might be
able to fix it.

Best regards,

      Sophonet

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
On Wed, Mar 29, 2017 at 8:31 AM, Steven Watanabe via Boost-build <[hidden email]> wrote:
AMDG

On 03/29/2017 02:59 AM, Sophonet via Boost-build wrote:
> <snip>
> 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 ;
>
> <snip>
>

  The Boost.Python Jamfile seems to be written assuming
that there is at most one each of Python 2 and 3.

And it's always been that way since the dawn of py3 :-) When I made my changes they where to correct corner cases when there was only one of 2 or 3 installed, or nothing was installed and for further selecting the py version if configuration conditions where specified. I.e. having more than one of py3 configured never worked correctly. Although it was likely a silent undefined behavior of which actual py version it used under the hood.


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
>> AMDG

> And it's always been that way since the dawn of py3 :-) When I made my
> changes they where to correct corner cases when there was only one of
> 2 or 3 installed, or nothing was installed and for further selecting
> the py version if configuration conditions where specified. I.e.
> having more than one of py3 configured never worked correctly.
> Although it was likely a silent undefined behavior of which actual py
> version it used under the hood.

So, as a suggestion to clean up command line options for b2:

- could there be two b2 command line parameters, python2=2.x and
python3=3.x, in order
   to support the current behavior of building python2 and python3
bindings simultaneously (if found)?

- these would need to be parsed in src/kernel/bootstrap.jam?

- and in src/tools/python.jam, near line 778, there needs to be a check
on the minor version
   specified by python2 or python3, respectively, if these parameters are
set?

Unfortunately, I am not a jam expert, and I don't have any clue how
command line parameters are actually passed to src/tools/python.jam for
the version check...

Best regards,

      Sophonet

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
In reply to this post by Boost - Build mailing list
My mailserver (dreamhost) was having issues, sending again.

---------- Forwarded message ----------
From: Tom Kent <[hidden email]>
Date: Thu, Mar 30, 2017 at 6:50 AM
Subject: Re: [Boost-build] Boost.Python build (config ?) error
To: "Boost.Build developer's and user's list" <[hidden email]>




On Wed, Mar 29, 2017 at 3:59 AM, Sophonet via Boost-build <[hidden email]> wrote:
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.

I think I'm seeing a similar issue with the beta builds that I've been building. Last night I ran the soon-to-be beta 2 build, after seeing this thread I looked at what libraries it created and noticed that all the 32-bit builds were missing the python library.

Here's my user-config.jam:
import toolset : using ;

using python
: 2.7 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python27-32\\include # includes
: D:\\ReleaseBuild\\Python27-32\\libs # libs
: <address-model>32 <address-model> # conditions
;

using python
: 2.7 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python27-64\\include # includes
: D:\\ReleaseBuild\\Python27-64\\libs # libs
: <address-model>64 # conditions
;

using python
: 3.6 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python36-32\\include # includes
: D:\\ReleaseBuild\\Python36-32\\libs # libs
: <address-model>32 <address-model> # conditions
;

using python
: 3.6 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python36-64\\include # includes
: D:\\ReleaseBuild\\Python36-64\\libs # libs
: <address-model>64 # conditions
;

You'll notice that I have two versions of each of python 2 and 3, but they are the same version number, the only difference is which one goes with which address-model.

The builds appear to be fine, each one outputs the line:
    - python                   : building

There are too many warnings and such that scroll by during the build, so I don't know if it complained about it during the build. However, I run each build a second time immediately after, to capture errors with anything that built and nothing shows up related to python. For 64-bit both python and python3 libraries are generated, for 32-bit there are no python libraries.

I'm not positive, but I think this is a regression from the 1.63 release. For that release, I only tried to build python 2, but it successfully built for both 32 and 64 bit configurations. It could be something with my setup here (I"ve also rolled version numbers from 2.7.5. to 2.7.13), but I'd lean towards it being something in the build/python source.

Thoughts?
Tom


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list


On Thu, Mar 30, 2017 at 5:35 PM, Tom Kent <[hidden email]> wrote:
My mailserver (dreamhost) was having issues, sending again.

---------- Forwarded message ----------
From: Tom Kent <[hidden email]>
Date: Thu, Mar 30, 2017 at 6:50 AM
Subject: Re: [Boost-build] Boost.Python build (config ?) error
To: "Boost.Build developer's and user's list" <[hidden email]>




On Wed, Mar 29, 2017 at 3:59 AM, Sophonet via Boost-build <[hidden email]> wrote:
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.

I think I'm seeing a similar issue with the beta builds that I've been building. Last night I ran the soon-to-be beta 2 build, after seeing this thread I looked at what libraries it created and noticed that all the 32-bit builds were missing the python library.

Here's my user-config.jam:
import toolset : using ;

using python
: 2.7 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python27-32\\include # includes
: D:\\ReleaseBuild\\Python27-32\\libs # libs
: <address-model>32 <address-model> # conditions
;

using python
: 2.7 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python27-64\\include # includes
: D:\\ReleaseBuild\\Python27-64\\libs # libs
: <address-model>64 # conditions
;

using python
: 3.6 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python36-32\\include # includes
: D:\\ReleaseBuild\\Python36-32\\libs # libs
: <address-model>32 <address-model> # conditions
;

using python
: 3.6 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python36-64\\include # includes
: D:\\ReleaseBuild\\Python36-64\\libs # libs
: <address-model>64 # conditions
;

You'll notice that I have two versions of each of python 2 and 3, but they are the same version number, the only difference is which one goes with which address-model.

The builds appear to be fine, each one outputs the line:
    - python                   : building

There are too many warnings and such that scroll by during the build, so I don't know if it complained about it during the build. However, I run each build a second time immediately after, to capture errors with anything that built and nothing shows up related to python. For 64-bit both python and python3 libraries are generated, for 32-bit there are no python libraries.

I'm not positive, but I think this is a regression from the 1.63 release. For that release, I only tried to build python 2, but it successfully built for both 32 and 64 bit configurations. It could be something with my setup here (I"ve also rolled version numbers from 2.7.5. to 2.7.13), but I'd lean towards it being something in the build/python source.

Thoughts?
Tom

 
I've also tried building the beta 2 with only the two python2 instances in my user-config.jam (no py3) and still didn't​ get 32 bil python libs.

Tom

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
In reply to this post by Boost - Build mailing list


On Thu, Mar 30, 2017 at 5:35 PM, Tom Kent <[hidden email]> wrote:
My mailserver (dreamhost) was having issues, sending again.

---------- Forwarded message ----------
From: Tom Kent <[hidden email]>
Date: Thu, Mar 30, 2017 at 6:50 AM
Subject: Re: [Boost-build] Boost.Python build (config ?) error
To: "Boost.Build developer's and user's list" <[hidden email]>




On Wed, Mar 29, 2017 at 3:59 AM, Sophonet via Boost-build <[hidden email]> wrote:
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.

I think I'm seeing a similar issue with the beta builds that I've been building. Last night I ran the soon-to-be beta 2 build, after seeing this thread I looked at what libraries it created and noticed that all the 32-bit builds were missing the python library.

Here's my user-config.jam:
import toolset : using ;

using python
: 2.7 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python27-32\\include # includes
: D:\\ReleaseBuild\\Python27-32\\libs # libs
: <address-model>32 <address-model> # conditions
;

using python
: 2.7 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python27-64\\include # includes
: D:\\ReleaseBuild\\Python27-64\\libs # libs
: <address-model>64 # conditions
;

using python
: 3.6 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python36-32\\include # includes
: D:\\ReleaseBuild\\Python36-32\\libs # libs
: <address-model>32 <address-model> # conditions
;

using python
: 3.6 # version
: # Interperter/path to dir
: D:\\ReleaseBuild\\Python36-64\\include # includes
: D:\\ReleaseBuild\\Python36-64\\libs # libs
: <address-model>64 # conditions
;

You'll notice that I have two versions of each of python 2 and 3, but they are the same version number, the only difference is which one goes with which address-model.

The builds appear to be fine, each one outputs the line:
    - python                   : building

There are too many warnings and such that scroll by during the build, so I don't know if it complained about it during the build. However, I run each build a second time immediately after, to capture errors with anything that built and nothing shows up related to python. For 64-bit both python and python3 libraries are generated, for 32-bit there are no python libraries.

I'm not positive, but I think this is a regression from the 1.63 release. For that release, I only tried to build python 2, but it successfully built for both 32 and 64 bit configurations. It could be something with my setup here (I"ve also rolled version numbers from 2.7.5. to 2.7.13), but I'd lean towards it being something in the build/python source.

Thoughts?
Tom


Nevermind, there is no regression vs. 1.63 here, the problem was in my user-config.jam file (how many times has that happened!). 

For both the python 2 and 3 configs, I had a 32-bit rule that included the conditions section:
: <address-model>32 <address-model> # conditions 
The goal here was to support both builds with address-model=32 and no address-model specifier. On 1.64.0.beta.2 this causes it to not find any python version and fail silently. On 1.63 it shows up as an error because python couldn't detect a suitable version.
For my build script I simply removed the conditions, so if the address-model isn't "64" then it will use that version...this works, but I had be lead to believe that the original line would work as well. Another thing that *doesn't* work is having two separate configs for the same version (for a total of three when including 64 bit) with one specifying <address-model>32 and another with no conditions. This caused an immediate error that prevented the build.

This clearly isn't a show-stopper, but it seems like it should be cleaned up....not sure how.

Tom

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Boost.Python build (config ?) error

Boost - Build mailing list
On Fri, Mar 31, 2017 at 4:41 PM, Tom Kent via Boost-build <[hidden email]> wrote:

Nevermind, there is no regression vs. 1.63 here, the problem was in my user-config.jam file (how many times has that happened!). 

For both the python 2 and 3 configs, I had a 32-bit rule that included the conditions section:
: <address-model>32 <address-model> # conditions 
The goal here was to support both builds with address-model=32 and no address-model specifier. On 1.64.0.beta.2 this causes it to not find any python version and fail silently.

Which, IIRC, is what pre 1.63 did also.
 
On 1.63 it shows up as an error because python couldn't detect a suitable version.
For my build script I simply removed the conditions, so if the address-model isn't "64" then it will use that version...this works, but I had be lead to believe that the original line would work as well. Another thing that *doesn't* work is having two separate configs for the same version (for a total of three when including 64 bit) with one specifying <address-model>32 and another with no conditions. This caused an immediate error that prevented the build.

This clearly isn't a show-stopper, but it seems like it should be cleaned up....not sure how.

Well.. Ultimately the whole of python.jam and the use by BPL build needs to be scrapped and started over. It was never designed to work with multiple versions. And having it work in the past for just the two versions was a miracle it worked. Unfortunately redoing that will take time and will likely mean that BPL building will need to be different. The most likely result being that it builds *all*, and *only*, the versions configured. Not sure what that means for the auto configuration though.


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Loading...