Spec URL: https://smani.fedorapeople.org/review/mingw-python2.spec SRPM URL: https://smani.fedorapeople.org/review/mingw-python2-2.7.13-7.fc28.src.rpm Description: MinGW Windows python2 Fedora Account System Username: smani
Hello, I've got a build error: writing build/temp.mingw-2.7/builddir/build/BUILD/Python-2.7.13/Modules/_tkinter.def i686-w64-mingw32-gcc -shared -Wl,--enable-auto-image-base -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -D_GNU_SOURCE -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -I. -IInclude -I../Include -I../Python -I../PC -s build/temp.mingw-2.7/builddir/build/BUILD/Python-2.7.13/Modules/_tkinter.o build/temp.mingw-2.7/builddir/build/BUILD/Python-2.7.13/Modules/tkappinit.o build/temp.mingw-2.7/builddir/build/BUILD/Python-2.7.13/Modules/_tkinter.def -L/usr/X11/lib -L. -L/usr/i686-w64-mingw32/sys-root/mingw/lib -L/usr/i686-w64-mingw32/lib -L/usr/lib/python2.7/config -L. -ltk86 -ltcl86 -ltk86 -ltcl86 -lws2_32 -lgdi32 -lcomctl32 -lcomdlg32 -limm32 -luuid -loleaut32 -lole32 -lpython2.7 -ldl -o build/lib.mingw-2.7/_tkinter.pyd error: [Errno 2] No such file or directory: '/builddir/build/BUILD/Python-2.7.13/Modules/_ctypes/libffi' It seems there's an error in the detection of ffi.h in the configure script, as if LIBFFI_INCLUDEDIR was not set. I don't understand why LIBFFI_INCLUDEDIR is not passed to the configure script, but it is fixable by modifying the patch 0530-mingw-system-libffi.patch. Here's what I've changed: diff -rupN Python-2.7.13/configure.ac Python-2.7.13-new/configure.ac --- Python-2.7.13/configure.ac 2017-01-21 01:46:09.733573102 +0100 +++ Python-2.7.13-new/configure.ac 2017-01-21 01:46:09.735573081 +0100 @@ -2653,14 +2653,33 @@ AC_ARG_WITH(system_ffi, [], [with_system_ffi="no"]) -if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then - LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" +if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then + LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" +fi Here I've restored the original pkgconfig detection instead of relying on setting LIBFFI_INCLUDEDIR in the spec. Maybe you have an explanation as to why this happens or a better fix than the one I'm proposing.
Hmm can you post the full log of the failing build?
I tried to do a Koji scratch to show you but the problem doesn't happen there. ( https://koji.fedoraproject.org/koji/taskinfo?taskID=21648651 ) Anyway the relevant part of my build.log is there: ++ mingw32-pkg-config libffi --cflags-only-I ++ sed 's|\-I||g' + export LIBFFI_INCLUDEDIR= + LIBFFI_INCLUDEDIR= Full log https://gist.github.com/eclipseo/f034ce1c3bdc22b66ecf2e02ffcd055f Since it doesn't happen in Koji, I think it's a bug on my end, so I accept the package. I don't understand why it happens though since when I run "mingw32-pkg-config libffi --cflags-only-I" in my chroot, it does display the include path.
Actually I purged my mock chroot and the problem disappeared so everything is good.
(fedrepo-req-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/mingw-python2
Thanks! Some followups, if you're still up for it ;) mingw-python-setuptools: https://bugzilla.redhat.com/show_bug.cgi?id=1488242 mingw-cython: https://bugzilla.redhat.com/show_bug.cgi?id=1488245 mingw-numpy: https://bugzilla.redhat.com/show_bug.cgi?id=1488240 mingw-sip: https://bugzilla.redhat.com/show_bug.cgi?id=1488244 mingw-python-qt5: https://bugzilla.redhat.com/show_bug.cgi?id=1488241 If you have anything I can review in exchange, even at some later time, please do ping me.