Opened 11 years ago
Last modified 5 years ago
#5677 new Patches
Bootstrap fails with python versions 3.1 and up
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | Building Boost |
Version: | Boost Release Branch | Severity: | Problem |
Keywords: | Cc: |
Description
Using bootstrap.sh to build boost with python versions 3.1 and up generates output similar to the following and the subsequent build fails for boost.python:
Detecting Python version... 3.2 Detecting Python root... File "<string>", line 1
import sys; print sys.prefix
SyntaxError: invalid syntax
This appears to be caused by the code checking for the python root using a form of the 'print' function that is no longer valid in later versions of python. Attached is a patch that fixes this issue.
Attachments (1)
Change History (6)
by , 11 years ago
Attachment: | python_fix.patch added |
---|
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Version: | Boost 1.46.1 → Boost Release Branch |
---|
comment:4 by , 8 years ago
A workaround is to get the Python root yourself with correct Python 3 syntax and tell bootstrap.py explicitly:
python_root=`python -c "import sys; print(sys.prefix)"` ./bootstrap.sh --with-python-root=$python_root
comment:5 by , 5 years ago
This was resolved in 1.59.0:
I cannot set the milestone to 1.59.0 however so I am going to leave it unresolved until someone with access can.
If I understand correctly this patch has been applied to trunk but not merged to release yet. It still fails in 1.55.0.