This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fetchinson
Recipients fetchinson, stapelberg
Date 2018-12-21.20:36:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have the exact same issue, trying to compile 3.7.1 with a custom libffi location. Note that I must build libffi from source and can't install binaries provided by my distro, I believe this is the origin of the problem. Probably the python build system checks for libffi in some "standard" locations and it doesn't seem possible to use libffi from a custom location.

This is where libffi gets installed after passing --prefix=$HOME/opt to ./configure:


In any case, just to be sure, I've copied the header files to


And pkg-config works:

[fetch@fetch opt]$ pkg-config --libs libffi
-L/home/fetch/opt/lib/../lib64 -lffi

[fetch@fetch opt]$ pkg-config --cflags libffi

These environment variables are also set:



And still _ctypes fails to build (but python itself (minus _ctypes) compiles successful and works perfectly well).
Date User Action Args
2018-12-21 20:36:17fetchinsonsetrecipients: + fetchinson, stapelberg
2018-12-21 20:36:15fetchinsonsetmessageid: <>
2018-12-21 20:36:15fetchinsonlinkissue34823 messages
2018-12-21 20:36:15fetchinsoncreate