Opened 10 years ago

Last modified 5 years ago

#6946 new Bugs

bootstrap.sh not compatible with python3.

Reported by: Robert Park <rbpark@…> Owned by: Stefan Seefeld
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

Just tried building boost with python3 support and hit a small snag with bootstrap.sh using invalid syntax.

On line 280, the print statement has been removed from python3 so you need to use the print *function* instead, with brackets:

PYTHON_ROOT=$PYTHON -c "import sys; print(sys.prefix)"

This change does not break compatibility with python2.

Change History (7)

comment:1 by Ralf W. Grosse-Kunstleve, 10 years ago

Component: PythonBuilding Boost

comment:2 by Ralf W. Grosse-Kunstleve, 10 years ago

Owner: changed from Ralf W. Grosse-Kunstleve to Stefan Seefeld

hi stefan, do you know how to best deal with this problem?

comment:3 by Robert Park <rbpark@…>, 10 years ago

Sorry, I should clarify: The line of code that I quote in the description is the *fix*, not the problem.

comment:4 by Ralf W. Grosse-Kunstleve, 10 years ago

It turns out Stefan checked in the fix already in October last year (r75012) on the trunk. It still isn't merged into the release branch (the current revision is r78689). I don't know who is in charge of merging this file from the trunk to the release branch. Stefan?

comment:5 by Jacobo Cabaleiro <jcc@…>, 9 years ago

I've just built 1.55 under mingw and this is still a problem.

ticket:5677 is a previous report of the same error.

comment:6 by John McGehee, 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:7 by James E. King, III, 5 years ago

This was resolved in 1.59.0:

https://github.com/boostorg/boost/commit/51e693134f5c354f2694fe89d14421c85bfacf31#diff-3af436e6760a0c5f1e3d16a3384853a8

I cannot set the milestone to 1.59.0 however so I am going to leave it unresolved until someone with access can.

Note: See TracTickets for help on using tickets.