Build issues with sipconfiq

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Build issues with sipconfiq

Hans-Peter Jansen-2
Hi Phil,

since it looks, like I'm the only one that uses the QxtGlobalShortcut module
with PyQt, today, out of the blue, I stumbled across an new sipconfig related
issue.

The build fails, because sipconfig doesn't expand some macros anymore, but
nothing changed with sip and PyQt5 meanwhile (well, Qt was updated to 5.13.1):

[  157s] g++ -shared -Wl,--version-script=QxtGlobalShortcut.exp -o
QxtGlobalShortcut.so sipQxtGlobalShortcutcmodule.o
sipQxtGlobalShortcutQxtGlobalShortcut.o -L/home/abuild/rpmbuild/BUILD/
PyQxtGlobalShortcut-0.2.3/build/temp.linux-x86_64-2.7 -L/usr/lib64 -L/usr/
X11R6/lib -lQxtGlobalShortcut -lpython2.7 -lQt5Core -L$[QT_INSTALL_LIBS] -
lpthread -lQt5Gui -L$[QT_INSTALL_LIBS] $[QT_INSTALL_LIBS]/libQt5Core.so -
lpthread -lQt5Widgets -lQt5PrintSupport -lXext -lX11 -lm -lpthread
[  157s] g++: error: 0/libQt5Core.so: No such file or directory

See $[QT_INSTALL_LIBS]?

I've added a patch to the pyqxtgs/configure.py to reveal some internas here at
[   150s]:

https://build.opensuse.org/package/live_build_log/home:frispete:PyQt5/python-qxtglobalshortcut-qt5/openSUSE_Tumbleweed/x86_64

Any idea, what's going wrong here?

Thanks in advance,
Pete


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Build issues with sipconfiq

Hans-Peter Jansen-2
Am Donnerstag, 12. September 2019, 17:49:31 CEST schrieb Hans-Peter Jansen:
>
> The build fails, because sipconfig doesn't expand some macros anymore, but
> nothing changed with sip and PyQt5 meanwhile (well, Qt was updated to
> 5.13.1):

Well, I not sure anymore, that this isn't related to some sip/PyQt5 upgrade.

What's for sure, that sipconfig.SIPModuleMakefile fails to properly expand
$$[QT_INSTALL_LIBS]. Question is, where this came from in the first place.

Except from the generated Makefile:

LIBS = -L/home/abuild/rpmbuild/BUILD/PyQxtGlobalShortcut-0.2.3/build/
temp.linux-x86_64-2.7 -L/usr/lib64 -L/usr/X11R6/lib -lQxtGlobalShortcut -
lpython2.7 -lQt5Core -L$$[QT_INSTALL_LIBS] -lpthread -lQt5Gui -L$$
[QT_INSTALL_LIBS] $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread -lQt5Widgets -
lQt5PrintSupport -lXext -lX11 -lm -lpthread

Interestingly, Qt5Core is there already, but then it's appearing again within
the unexpanded macros, while the other Qt5 libraries arguments are dealt with
just fine.

sipconfig.Configuration is called with a config dict containing:

[   13s] cfg:
[   13s] {'pyqt_sip_dir': '/usr/share/sip/PyQt5',
[   13s]  'pyqt_sip_flags': '-n PyQt5.sip -t WS_X11 -t Qt_5_13_0',
[   13s]  'qt_data_dir': '/usr/share/qt5',
[   13s]  'qt_dir': '/usr',
[   13s]  'qt_edition': 'free',
[   13s]  'qt_framework': 0,
[   13s]  'qt_inc_dir': '/usr/include/qt5',
[   13s]  'qt_lib_dir': '/usr/lib64',
[   13s]  'qt_threaded': 1,
[   13s]  'qt_version': 331009,
[   13s]  'qt_winconfig': 'shared'}

which looks like all properties are set up correctly.

The QT_INSTALL_LIBS macro seems to stem from a qmake property:

[   13s] qmake_props:
[...]
[   13s]  'QT_INSTALL_LIBS': '/usr/lib64',

so it must be crept in somewhere internal to sipconfig.

With this hack appended:

with open('Makefile', 'r+') as fd:
    mf = fd.read()
    newmf = mf.replace('-L$$[QT_INSTALL_LIBS] ', '')
    newmf = newmf.replace('$$[QT_INSTALL_LIBS]/libQt5Core.so ', '')
    if mf != newmf:
        fd.seek(0)
        fd.write(newmf)

to the configure script:

https://github.com/frispete/PyQxtGlobalShortcut/blob/master/pyqxtgs/
configure.py

the build succeeds again. Hence, it looks like a sipconfig regression of some
kind.

The fixed linking command is now:

g++ -shared -Wl,--version-script=QxtGlobalShortcut.exp -o QxtGlobalShortcut.so
sipQxtGlobalShortcutcmodule.o sipQxtGlobalShortcutQxtGlobalShortcut.o -L/home/
abuild/rpmbuild/BUILD/PyQxtGlobalShortcut-0.2.3/build/temp.linux-x86_64-3.7 -
L/usr/lib64 -L/usr/X11R6/lib -lQxtGlobalShortcut -lpython3.7m -lQt5Core -
lpthread -lQt5Gui -lpthread -lQt5Widgets -lQt5PrintSupport -lXext -lX11 -lm -
lpthread

Apart from repeated -lpthread arguments, it's looking sane again, and working
fine.

It would be nice to locate and fix the source of this issue properly in order
to dispense with such gross hacks, wouldn't it?

Thanks,
Pete


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Build issues with sipconfiq

Phil Thompson-5
On 13/09/2019 13:51, Hans-Peter Jansen wrote:

> Am Donnerstag, 12. September 2019, 17:49:31 CEST schrieb Hans-Peter
> Jansen:
>>
>> The build fails, because sipconfig doesn't expand some macros anymore,
>> but
>> nothing changed with sip and PyQt5 meanwhile (well, Qt was updated to
>> 5.13.1):
>
> Well, I not sure anymore, that this isn't related to some sip/PyQt5
> upgrade.
>
> What's for sure, that sipconfig.SIPModuleMakefile fails to properly
> expand
> $$[QT_INSTALL_LIBS]. Question is, where this came from in the first
> place.
>
> Except from the generated Makefile:
>
> LIBS = -L/home/abuild/rpmbuild/BUILD/PyQxtGlobalShortcut-0.2.3/build/
> temp.linux-x86_64-2.7 -L/usr/lib64 -L/usr/X11R6/lib -lQxtGlobalShortcut
> -
> lpython2.7 -lQt5Core -L$$[QT_INSTALL_LIBS] -lpthread -lQt5Gui -L$$
> [QT_INSTALL_LIBS] $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread
> -lQt5Widgets -
> lQt5PrintSupport -lXext -lX11 -lm -lpthread
>
> Interestingly, Qt5Core is there already, but then it's appearing again
> within
> the unexpanded macros, while the other Qt5 libraries arguments are
> dealt with
> just fine.
>
> sipconfig.Configuration is called with a config dict containing:
>
> [   13s] cfg:
> [   13s] {'pyqt_sip_dir': '/usr/share/sip/PyQt5',
> [   13s]  'pyqt_sip_flags': '-n PyQt5.sip -t WS_X11 -t Qt_5_13_0',
> [   13s]  'qt_data_dir': '/usr/share/qt5',
> [   13s]  'qt_dir': '/usr',
> [   13s]  'qt_edition': 'free',
> [   13s]  'qt_framework': 0,
> [   13s]  'qt_inc_dir': '/usr/include/qt5',
> [   13s]  'qt_lib_dir': '/usr/lib64',
> [   13s]  'qt_threaded': 1,
> [   13s]  'qt_version': 331009,
> [   13s]  'qt_winconfig': 'shared'}
>
> which looks like all properties are set up correctly.
>
> The QT_INSTALL_LIBS macro seems to stem from a qmake property:
>
> [   13s] qmake_props:
> [...]
> [   13s]  'QT_INSTALL_LIBS': '/usr/lib64',
>
> so it must be crept in somewhere internal to sipconfig.
>
> With this hack appended:
>
> with open('Makefile', 'r+') as fd:
>     mf = fd.read()
>     newmf = mf.replace('-L$$[QT_INSTALL_LIBS] ', '')
>     newmf = newmf.replace('$$[QT_INSTALL_LIBS]/libQt5Core.so ', '')
>     if mf != newmf:
>         fd.seek(0)
>         fd.write(newmf)
>
> to the configure script:
>
> https://github.com/frispete/PyQxtGlobalShortcut/blob/master/pyqxtgs/
> configure.py
>
> the build succeeds again. Hence, it looks like a sipconfig regression
> of some
> kind.
>
> The fixed linking command is now:
>
> g++ -shared -Wl,--version-script=QxtGlobalShortcut.exp -o
> QxtGlobalShortcut.so
> sipQxtGlobalShortcutcmodule.o sipQxtGlobalShortcutQxtGlobalShortcut.o
> -L/home/
> abuild/rpmbuild/BUILD/PyQxtGlobalShortcut-0.2.3/build/temp.linux-x86_64-3.7
> -
> L/usr/lib64 -L/usr/X11R6/lib -lQxtGlobalShortcut -lpython3.7m -lQt5Core
> -
> lpthread -lQt5Gui -lpthread -lQt5Widgets -lQt5PrintSupport -lXext -lX11
> -lm -
> lpthread
>
> Apart from repeated -lpthread arguments, it's looking sane again, and
> working
> fine.
>
> It would be nice to locate and fix the source of this issue properly in
> order
> to dispense with such gross hacks, wouldn't it?

sipconfig has long been deprecated and has never been used with PyQt5.
Sorry but this is a "won't fix".

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Build issues with sipconfiq

Hans-Peter Jansen-2
Am Freitag, 13. September 2019, 16:57:35 CEST schrieb Phil Thompson:
> On 13/09/2019 13:51, Hans-Peter Jansen wrote:
> >
> > It would be nice to locate and fix the source of this issue properly in
> > order
> > to dispense with such gross hacks, wouldn't it?
>
> sipconfig has long been deprecated and has never been used with PyQt5.
> Sorry but this is a "won't fix".

Fair enough. Can you or anybody in the audience recommend a similar package,
that is based on sipdistutils? It doesn't need to support PyQt4 anymore, but
it should be a Qt5 extension for obvious reasons.

Thanks,
Pete


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Build issues with sipconfiq

Phil Thompson-5
On 13/09/2019 17:57, Hans-Peter Jansen wrote:

> Am Freitag, 13. September 2019, 16:57:35 CEST schrieb Phil Thompson:
>> On 13/09/2019 13:51, Hans-Peter Jansen wrote:
>> >
>> > It would be nice to locate and fix the source of this issue properly in
>> > order
>> > to dispense with such gross hacks, wouldn't it?
>>
>> sipconfig has long been deprecated and has never been used with PyQt5.
>> Sorry but this is a "won't fix".
>
> Fair enough. Can you or anybody in the audience recommend a similar
> package,
> that is based on sipdistutils? It doesn't need to support PyQt4
> anymore, but
> it should be a Qt5 extension for obvious reasons.

You could wait a couple of weeks for sip v5.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt