LLVM 3.3 failed
Freek Dijkstra
software at macfreek.nl
Sat Oct 25 14:54:24 PDT 2014
On 24-10-2014 0:50, Robert Broome wrote:
> I am trying to update ports after upgrading to 10.10 and XCODE 6.1.
> LLVM 3.3 is failing.
> According to the log:
> import sys; print sys.version.split
> has invalid syntax at sys.
>
> configure: error: found python (opt/loca/bin/python); required >= 2.5
>
> Does anyone have any ideas?
I have the same issue.
The bug is that the configure script contains code snippet to check the
Python version, but this snippet does not work for Python 3 and up.
The code is in llvm-3.3.src/autoconf/configure.ac, line 1330-1341:
> AC_MSG_CHECKING([for python >= 2.5])
> ac_python_version=`$PYTHON -c 'import sys; print sys.version.split()[[0]]'`
> ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1`
> ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2`
> ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3`
> if test "$ac_python_version_major" -eq "2" \
> && test "$ac_python_version_minor" -ge "5" ; then
> AC_MSG_RESULT([$PYTHON ($ac_python_version)])
> else
> AC_MSG_RESULT([not found])
> AC_MSG_FAILURE([found python $ac_python_version ($PYTHON); required >= 2.5])
> fi
The print statement is invalid in Python 3; it should be a print
function. but it is probably easier to simply use python -V, instead of
this small script.
I would recommend to change the ac_python_version assignment to:
ac_python_version=`$PYTHON -V 2>&1 | cut -d ' ' -f2`
Did you already filed a bug report at https://trac.macports.org/newticket?
Freek
More information about the macports-users
mailing list