Recent failure in py3.8-dev macOS builds

After working fine for months, I’ve started to see failures when building a Python project on macOS when using PYENV-3.8-dev. I get the following output:

py38 create: /Users/travis/build/ronf/asyncssh/.tox/py38
ERROR: InterpreterNotFound: python3.8
___________________________________ summary ____________________________________
ERROR: py38: InterpreterNotFound: python3.8
/Users/travis/.travis/functions: line 524: 98422 Terminated: 15 travis_jigger “{!}" "{timeout}” “${cmd[@]}”
The command “travis_wait 60 tox” exited with 1.

Earlier PYENV versions are still working fine, but starting about 2-3 days ago this case no longer runs. Anyone know if something in the macOS build environment has changed recently?

Please link to the affected build and an earlier build that worked.

The first build that failed is:
https://travis-ci.org/ronf/asyncssh/jobs/539970536

The prior build that worked with the same travis config is:
https://travis-ci.org/ronf/asyncssh/jobs/539050312

It looks like this was going on for longer than I thought (a couple of months). Since it was an unreleased version of Python, I had it marked as an “allowed failure” and apparently I hadn’t checked the build results carefully in a little while.

Diffing the raw logs (I use Winmerge) shows:

python-build: use openssl from homebrew
python-build: use readline from homebrew
Cloning https://github.com/python/cpython
Installing Python-3.8-dev…
python-build: use readline from homebrew
e[1mERRORe[m: The Python ssl extension was not compiled. Missing the OpenSSL lib?

To get details, pass --verbose to pyenv install.

My guess is that 3.8 has dropped support for the OpenSSL version preinstalled in the OSX image you are using. If this is the case, you’ll need to brew upgrade it (or better, brew install --force openssl to install an additional version alongside the old one and avoid updating runtime dependents) or use a newer OSX image.

Thanks for the suggestions! I tried adding “brew install --force openssl” in build https://travis-ci.org/ronf/asyncssh/jobs/570312085 rather than relying on the already installed OpenSSL version, but the py3.8-dev install is still failing there. I was already doing a “brew update”, so I left that as-is.

The error message is not all that helpful:

Installing Python-3.8-dev…
python-build: use readline from homebrew
ERROR: invalid Python executable: /Users/travis/.pyenv/versions/3.8-dev/bin/python3.8

The python-build could not find proper executable of Python after successful build.
Please open an issue for future improvements.

BUILD FAILED (OS X 10.13.3 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/python-build.20190810222746.84967
Results logged to /var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/python-build.20190810222746.84967.log

Last 10 log lines:
install|*) ensurepip="" ;;
esac;
./python.exe -E -m ensurepip
$ensurepip --root=/ ;
fi

I’m not sure how to get at the log files mentioned there, but I’ll try moving to a newer OSX image next. I’m currently on 9.4, and that still seems to be the default, but I don’t have a dependency on any particular OSX version right now and can definitely try something newer.

Looks like moving to the xcode11 OSX image fixed the problem - build https://travis-ci.org/ronf/asyncssh/jobs/570346524 worked. Thanks again for your help!

Imprint