[New-bugs-announce] [issue45257] Compiling 3.8 branch on Windows attempts to use incompatible libffi version

William Proffitt report at bugs.python.org
Tue Sep 21 09:56:48 EDT 2021

New submission from William Proffitt <proffitt at datamininglab.com>:

Wasn't sure where to file this. I built Python 3.8.12 for Windows recently from the latest bugfix source release in the cpython repository. One tricky thing came up I wanted to write-up in case it matters to someone else.

The version of libffi in the cpython-bin-deps repository seems to be too new for Python 3.8.12 now. The script for fetching the external dependencies (PCBuild\get_externals.bat) on the 3.8 branch fetches whatever is newest on the libffi branch, and this led to it downloading files starting with "libffi-8" and the build complaining about being unable to locate "libffi-7". 

I managed to resolve this by manually replacing the fetched libffi in the externals directory with the one from this commit, the latest commit I could find where the filenames started with "libffi-7": https://github.com/python/cpython-bin-deps/commit/1cf06233e3ceb49dc0a73c55e04b1174b436b632

After that, I was able to successfully run "build.bat -e -p x64" in PCBuild and "build.bat -x64" in "Tools\msi\" and end up with a working build and a working installer.

(Side note that isn't that important for me but maybe worth mentioning while I'm here: the uninstaller on my newly minted installer didn't seem to work at all and I had to manually resort to deleting registry keys to overwrite my previous attempted install.)

components: Build, Installation, Windows, ctypes
messages: 402318
nosy: paul.moore, proffitt, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Compiling 3.8 branch on Windows attempts to use incompatible libffi version
type: compile error
versions: Python 3.8

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list