[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Build failed with Python 3.7.0 & mingw32 5.3
From:       黄其泽 <hgoldfish () gmail ! com>
Date:       2018-10-15 8:21:38
Message-ID: CADHgsSKgrW3CkLTgua=-67EtKXxfzutXRfxgjff8LKnk=6L3+g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I try to build PyQt with mingw32 5.3 which bundled in Qt 5.11.2, but
failed. The error messages show that the .pyd can not link to libpython37.a

I change some code in `configure.py`:

if limited and False:  # add `and False` to use full dll
    pylib_lib = 'python%d%s' % (py_major, debug_suffix)
else:
    pylib_lib = 'python%d%d%s' % (py_major, py_minor, debug_suffix)

and

if not self.static:
    pro_lines.extend(['win32 {',
            '    LIBS += ' + self.get_pylib_link_arguments(name=True),  #
change `name=False` to `name=True`
            '}'])

After these changes, I built PyQt successfully. This bug maybe caused by
three rease:
1. The Python 3.7.0 contains no `libpython3.a` (the limited api),
2. Mingw32 does not link to libpython37.a automatically.
3. the `--link-full-dll` option does not works.

Plus, `QMAKE_CXXFLAGS+="-D_hypot=hypot"` should be append to `configure.py`
command line for successful building. But I do not known why:

python configure.py QMAKE_CXXFLAGS+="-D_hypot=hypot"

-- 
Python及Qt相关Blog:http://hgoldfish.com/

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div \
dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><br \
clear="all"></div>I try to build PyQt with mingw32 5.3 which bundled in Qt 5.11.2, \
but failed. The error messages show that the .pyd can not link to \
libpython37.a<br><br></div>I change some code in `configure.py`:<br><br><span \
style="background-color:rgb(255,242,204)">if limited and False:   # add `and False` \
to use full dll<br>      pylib_lib = &#39;python%d%s&#39; % (py_major, \
debug_suffix)<br>else:<br>      pylib_lib = &#39;python%d%d%s&#39; % (py_major, \
py_minor, debug_suffix)</span><br><div><div><div><div><br>and<br><br><span \
style="background-color:rgb(255,242,204)">if not self.static:<br>       \
pro_lines.extend([&#39;win32 {&#39;,<br>                       &#39;       LIBS += \
&#39; + self.get_pylib_link_arguments(name=True),   # change `name=False` to \
`name=True`<br>                       \
&#39;}&#39;])</span><br></div><div><br></div><div>After these changes, I built PyQt \
successfully. This bug maybe caused by three rease:<br>1. The Python 3.7.0 contains \
no `libpython3.a` (the limited api), <br>2. Mingw32 does not link to libpython37.a \
automatically.<br></div><div><div>3. the `--link-full-dll` option does not \
works.<br><br></div><div>Plus, `QMAKE_CXXFLAGS+=&quot;-D_hypot=hypot&quot;` should be \
append to `configure.py` command line for successful building. But I do not known \
why:<br><br><span style="background-color:rgb(255,242,204)">python configure.py \
QMAKE_CXXFLAGS+=&quot;-D_hypot=hypot&quot;</span><br></div><div><br><div>-- <br><div \
dir="ltr" class="gmail_signature"><div dir="ltr"><div><div \
dir="ltr">Python及Qt相关Blog:<a href="http://hgoldfish.com/" \
target="_blank">http://hgoldfish.com/</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>



[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic