-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cross: wrong interpreter returned when no python available #88228
Comments
When trying to cross compile python3.9, $/python3/targetbuild# which python3.9 python3 python $/python3/targetbuild# python3 --version $/python3/targetbuild# PYTHON_FOR_REGEN=/python3/hostbuild/python \ $/python3/targetbuild# grep PYTHON_FOR_BUILD config.log in configure if test "$cross_compiling" = yes; then The issue is a failing edge case here:
where interp keeps it's last value doesn't trigger the empty check here:
Note that there's an explicit clearing of interp when the python version isn't a match: if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info@<:@:2@:>@) == '$PACKAGE_VERSION')"; then
break
fi
interp= The fix should be pretty straightforward:
adding '' as the last possible interpreter means one hasn't been found up to that point and allows configure to properly fail $/python3/targetbuild# PYTHON_FOR_REGEN=/python3/hostbuild/python ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no ac_cv_buggy_getaddrinfo=no ../configure --build=x86-linux-gnu --host=aarch64-linux-gnu --enable-loadable-sqlite-extensions --enable-option-checking=fatal --enable-shared --with-system-expat --with-system-ffi --without-ensurepip It will continue to work when a proper interpreter is found $/python3/targetbuild# PATH=/python3/hostbuild:$PATH PYTHON_FOR_REGEN=/python3/hostbuild/python ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no ac_cv_buggy_getaddrinfo=no ../configure --build=x86-linux-gnu --host=aarch64-linux-gnu --enable-loadable-sqlite-extensions --enable-option-checking=fatal --enable-shared --with-system-expat --with-system-ffi --without-ensurepip This should help highlight any inconsistent environment between configuring and building. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: