Opened 12 years ago

Last modified 12 years ago

#5023 new Bugs

Can not build Boost.Python

Reported by: hacenator@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

I have installed Python 2.6 when i runing "bjam" i have messages:

warning: No python installation configured and autoconfiguration
note: failed.  See http://www.boost.org/libs/python/doc/building.html
note: for configuration instructions or pass --without-python to
note: suppress this message and silently skip all Boost.Python targets

After I add add line "using python : 2.6 ; " to "project-config.jam" I have this warning message again.

Then I add absolute path to python in "project-config.jam". This is not working too.

I run bjam with "--debug-configuration" option and have messages:

notice: [python-cfg] running command '"C:\Python26\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] ...does not invoke a working interpreter
notice: [python-cfg] No working Python interpreter found.

But when I run

"C:\Python26\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))"

manualy, I have correct results.

Ok. Next I modify "tools\build\v2\tools\python.jam"

local rule shell-cmd ( cmd )
{
    debug-message running command '$(cmd)" 2>&1"' ;
    x = [ SHELL $(cmd)" 2>&1" : exit-status ] ;
    
    debug-message CMD "$(cmd)" ; <<<<<<< add this string	
    debug-message RESULT "$(x)" ;  <<<<<<< add this string
	
	if $(x[2]) = 0
    {
        return $(x[1]) ;
    }
    else
    {
        return ;
    }
}

and run "bjam --debug-configuration" again

Result:

notice: [python-cfg] running command '"C:\Python26\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] CMD "C:\Python26\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))"
notice: [python-cfg] RESULT "C:\Python26\python.exe" -c "from" <<<< (here is error text at Russian. He said what this is not correct path and shell can not execute this command)
notice: [python-cfg] ...does not invoke a working interpreter
notice: [python-cfg] No working Python interpreter found.

I don't know why he is trim command.

Change History (2)

comment:1 by hacenator@…, 12 years ago

Original message:

notice: [python-cfg] CMD "C:\Python26\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))"
notice: [python-cfg] RESULT "C:\Python26\python.exe" -c "from" не является внутренней или внешней командой, исполняемой программой или пакетным файлом. 1
notice: [python-cfg] ...does not invoke a working interpreter
notice: [python-cfg] No working Python interpreter found.

comment:2 by Steven Watanabe, 12 years ago

Component: Nonebuild
Owner: set to Vladimir Prus
Note: See TracTickets for help on using tickets.