Bug 1487960 - Review Request: mingw-python2 - MinGW Windows python2
Summary: Review Request: mingw-python2 - MinGW Windows python2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-03 20:22 UTC by Sandro Mani
Modified: 2017-09-05 07:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-05 07:46:49 UTC
Type: ---
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Sandro Mani 2017-09-03 20:22:13 UTC
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

Comment 1 Robert-André Mauchin 🐧 2017-09-04 09:27:54 UTC
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.

Comment 2 Sandro Mani 2017-09-04 13:34:39 UTC
Hmm can you post the full log of the failing build?

Comment 3 Robert-André Mauchin 🐧 2017-09-04 14:40:29 UTC
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.

Comment 4 Robert-André Mauchin 🐧 2017-09-04 14:44:48 UTC
Actually I purged my mock chroot and the problem disappeared so everything is good.

Comment 5 Gwyn Ciesla 2017-09-04 18:35:47 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/mingw-python2

Comment 6 Sandro Mani 2017-09-04 19:35:20 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.