Boost C++ Libraries: Ticket #5677: Bootstrap fails with python versions 3.1 and up https://svn.boost.org/trac10/ticket/5677 <p> 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: </p> <p> Detecting Python version... 3.2 Detecting Python root... File "&lt;string&gt;", line 1 </p> <blockquote> <p> import sys; print sys.prefix </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> <a class="missing wiki">SyntaxError</a>: invalid syntax </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5677 Trac 1.4.3 Eric Barr <eric.barr@…> Thu, 07 Jul 2011 21:16:34 GMT attachment set https://svn.boost.org/trac10/ticket/5677 https://svn.boost.org/trac10/ticket/5677 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">python_fix.patch</span> </li> </ul> Ticket jonatan.magnusson@… Thu, 12 Dec 2013 15:37:24 GMT <link>https://svn.boost.org/trac10/ticket/5677#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5677#comment:1</guid> <description> <p> If I understand correctly this patch has been applied to trunk but not merged to release yet. It still fails in 1.55.0. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 12 Dec 2013 15:38:10 GMT</pubDate> <title>version changed https://svn.boost.org/trac10/ticket/5677#comment:2 https://svn.boost.org/trac10/ticket/5677#comment:2 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.46.1</span> → <span class="trac-field-new">Boost Release Branch</span> </li> </ul> Ticket anonymous Sat, 07 Feb 2015 19:42:10 GMT <link>https://svn.boost.org/trac10/ticket/5677#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5677#comment:3</guid> <description> <p> Still fails in 1.57.0 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John McGehee</dc:creator> <pubDate>Wed, 11 Mar 2015 22:17:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5677#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5677#comment:4</guid> <description> <p> A workaround is to get the Python root yourself with correct Python 3 syntax and tell bootstrap.py explicitly: </p> <pre class="wiki">python_root=`python -c "import sys; print(sys.prefix)"` ./bootstrap.sh --with-python-root=$python_root </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Thu, 26 Oct 2017 13:56:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5677#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5677#comment:5</guid> <description> <p> This was resolved in 1.59.0: </p> <p> ​<a class="ext-link" href="https://github.com/boostorg/boost/commit/51e693134f5c354f2694fe89d14421c85bfacf31#diff-3af436e6760a0c5f1e3d16a3384853a8"><span class="icon">​</span>https://github.com/boostorg/boost/commit/51e693134f5c354f2694fe89d14421c85bfacf31#diff-3af436e6760a0c5f1e3d16a3384853a8</a> </p> <p> I cannot set the milestone to 1.59.0 however so I am going to leave it unresolved until someone with access can. </p> </description> <category>Ticket</category> </item> </channel> </rss>