maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   PR 1.3 and Qt version confusion... (https://talk.maemo.org/showthread.php?t=64402)

fpp 2010-10-26 15:55

PR 1.3 and Qt version confusion...
 
I ran an apparently successful OTA update to PR 1.3 yesterday, and product info in settings shows the correct release number.

I did have to "apt-get remove" a couple of things first (like libgles*) however.

Things seem to be running mostly fine (apart from a few apps that don't work any more), but I'm quite confused as to where I now stand with respect to Qt and PyQt...

I was led to believe that PR 1.3 comes with Qt 4.6. I don't see anything to that effect in the list of installed packages in app manager. I don't see anything either about the previous PyQt version I had installed before the update.

However, my little PyQt app (SnXM) still runs fine, and the About dialog still shows it using PyQt 4.7.5 and Qt 4.6.2.

Is this normal, or did something go wrong with the update ?...

uvatbc 2010-10-26 15:57

Re: PR 1.3 and Qt version confusion...
 
Binary compatibility perhaps?
My app compiles against Qt 4.6.2 but runs against 4.7.0

fpp 2010-10-26 17:08

Re: PR 1.3 and Qt version confusion...
 
OK, but what Qt version string does it show when it's running ?...

egoshin 2010-10-26 18:17

Re: PR 1.3 and Qt version confusion...
 
Mda-a... it looks like Qt release problems are much deeper.

See (and vote) for bug https://bugs.maemo.org/show_bug.cgi?id=11445

ScarCow 2010-10-26 19:12

Re: PR 1.3 and Qt version confusion...
 
Qt 4.7.0, QtMobility 1.0.2, though i might've installed mobility myself.

-sc

attila77 2010-10-26 19:15

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by fpp (Post 852015)
Things seem to be running mostly fine (apart from a few apps that don't work any more), but I'm quite confused as to where I now stand with respect to Qt and PyQt...

However, my little PyQt app (SnXM) still runs fine, and the About dialog still shows it using PyQt 4.7.5 and Qt 4.6.2.

Is this normal, or did something go wrong with the update ?...

Two notes:

1. You might be seeing ther version compiled against. Qt4.7 is binary backwards compatible, so it will generally work with 4.6 apps, by as I compiled PyQt with Qt4.6.2, that is the API that is exposed to python and if you reference something within *PyQt* you might get the old version.

2. Just a few days ago there was a release of a brand spanking new PyQt 4.8, so it's a happy coincidence - when I rebuild PyQt for the new firmware, I'll also bump the PyQt version so the Qt4.7 featureset in general should be supported (i.e. declarative and other assorted goodies).

Yabba 2010-10-27 08:35

Re: PR 1.3 and Qt version confusion...
 
Ok, I have Segmentation fault with my program (pyKake), arise with Pr 1.3. As I have tracked it down it is in QApplication, so I just put this short question here (before I create new topic or anything), is this caused compatibility problems with Qt4.7 and current PyQt or have I done something terribly wrong (except that with Pr 1.2 the program worked fine)

The (short) code:
Code:

print "a"
app = QApplication(sys.argv) # Allways crashes here, newer prints out that b or later ones.
print "b"
MiscFunctions().loadSettings()
print "c"
MiscFunctions().controlLircd("start")
print "d"

main = MainWindow()
print "e"
if USEFULLSCREEN == True:
    print "f"
    main.showFullScreen()
else:
    print "g"
    main.show()
print "h"
app.exec_()
MiscFunctions().exitFunction()


fpp 2010-10-27 09:27

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by attila77 (Post 852140)
Two notes:
1. You might be seeing ther version compiled against. Qt4.7 is binary backwards compatible, so it will generally work with 4.6 apps, by as I compiled PyQt with Qt4.6.2, that is the API that is exposed to python and if you reference something within *PyQt* you might get the old version.

Yes, that's what I did, so that might explain it, thanks.
Is there a simple way to know what Qt version is on the device ? I haven't found it :-)

Quote:

2. Just a few days ago there was a release of a brand spanking new PyQt 4.8, so it's a happy coincidence - when I rebuild PyQt for the new firmware, I'll also bump the PyQt version so the Qt4.7 featureset in general should be supported (i.e. declarative and other assorted goodies).
Great news, thanks much ! That will allow me to also upgrade PyQt on my PC, which I wasn't doing because of the N900...

gerdich 2010-10-27 22:35

Re: PR 1.3 and Qt version confusion...
 
Did I understand right?

If I want PyQt for pr1.3 with QT4.7 I have to install the package which is indicated for pr1.2 and PyQT4.6 which sometimes was linked to QT4.6.
But now the package provides also some features of PyQt4.8 which is linked to QT4.7.

Am I right?


And what is the package PyQt4.7 experimental for and how do I install it?

attila77 2010-10-27 23:22

Re: PR 1.3 and Qt version confusion...
 
DO NOT install the experimental 4.7 package. It's for Qt4.7, but as 4.7 is part of the base firmware now, all it will do is mess up your install.

In other words - stay put, the update will come to you :)

handaxe 2010-10-28 00:07

Re: PR 1.3 and Qt version confusion...
 
I might be off track here but see my reply here as I found something odd about the upgrade of the QT libraries

http://talk.maemo.org/showpost.php?p...9&postcount=79

jonnenau 2010-11-01 00:03

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by Yabba (Post 852901)
Ok, I have Segmentation fault with my program (pyKake), arise with Pr 1.3. As I have tracked it down it is in QApplication, so I just put this short question here (before I create new topic or anything), is this caused compatibility problems with Qt4.7 and current PyQt or have I done something terribly wrong (except that with Pr 1.2 the program worked fine)

The (short) code:
Code:

print "a"
app = QApplication(sys.argv) # Allways crashes here, newer prints out that b or later ones.
print "b"
MiscFunctions().loadSettings()
print "c"
MiscFunctions().controlLircd("start")
print "d"

main = MainWindow()
print "e"
if USEFULLSCREEN == True:
    print "f"
    main.showFullScreen()
else:
    print "g"
    main.show()
print "h"
app.exec_()
MiscFunctions().exitFunction()


I have the exact same problem with my dropn900 app, it's essentially broken in PR 1.3. Attila any ideas what might be causing this? My code is only different so that I have subclassed QApplication and my init is "QApplication.__init__(self, sys.argv)". maemo repository is giving me 504 when doing dist-upgrade to PR1.3 so im a bit stuck, cant even try to resolve this but on the device :E

attila77 2010-11-01 00:18

Re: PR 1.3 and Qt version confusion...
 
In theory, the new Qt should be binary compatible with the old one and everything should 'just work'. In theory. Well, we'll see soon enough if a PyQt4.8 (or just a recompile) will help it.

Rob1n 2010-11-01 14:56

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by attila77 (Post 859100)
In theory, the new Qt should be binary compatible with the old one and everything should 'just work'. In theory. Well, we'll see soon enough if a PyQt4.8 (or just a recompile) will help it.

I've been debugging my app and have found that moving all other Qt import statements (other than QApplication) until after initialising QApplication eliminates the segmentation fault. I don't see why this should be needed though, so I suspect it's more a PyQt issue.

jonnenau 2010-11-01 21:56

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by Rob1n (Post 859734)
I've been debugging my app and have found that moving all other Qt import statements (other than QApplication) until after initialising QApplication eliminates the segmentation fault. I don't see why this should be needed though, so I suspect it's more a PyQt issue.

Yes this works, very very strange though. Lets see after we get the next PyQt update. I just reinstalled my whole development env with fresh everything, did not install any Qt 4.7 experimental related things, just the needed PyQt packages and some other python things that I can run my app. Segfaults would indicate the crash is somewhere in the c++ libs of course, maybe some confusion with the numbers.

Thanks a lot robin for your help!

keithzg 2010-11-02 02:20

Re: PR 1.3 and Qt version confusion...
 
Soooooo, is the not-yet-updated PyQt the reason I'm getting this error on any PyQt apps?

Using khweeteur as an example,

Code:

Traceback (most recent call last):
  File "/usr/bin/khweeteur_launch.py", line 3, in <module>
    import khweeteur
  File "/usr/lib/python2.5/site-packages/khweeteur/__init__.py", line 9, in <module>
    from PyQt4.QtGui import *
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1

All my searching doesn't seem to have come up with *anyone* else with the same problem, which has me suspecting that my apt-get dist-upgrade was a bad idea in the end ;) Unfortunately this is really delaying my attempts to learn PyQt by writing an app for my local transit system, alas!

Yabba 2010-11-02 08:35

Re: PR 1.3 and Qt version confusion...
 
Thank you Rob1n and Jonnenau, moving the initializing of QApplication solved my problem too :)

int_ua 2010-11-06 16:39

Re: PR 1.3 and Qt version confusion...
 
Code:

>>> from PyQt4.QtGui import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1

Can someone point the bug for this to vote for?

blubbi 2010-11-10 11:40

Re: PR 1.3 and Qt version confusion...
 
Okay, now this is getting weird.
In fact it has something to do with PyQt4 and not playing nice with some other modules (so far I could track down gobject, glib, and evolution).

Here's a proof of concept for this bug:

Code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#

import sys
from PyQt4.QtGui import QApplication

##NOTE: Uncommenting this import (even each on it's own) cause a segfault
##NOTE: Using the same import after initializing QApplication() works!
#import gobject, glib, evolution

print "hello1"
app = QApplication(sys.argv)
print "hello2"

##NOTE: This does not cause a segfault:
import gobject, glib, evolution
print "hello3"


sampppa 2010-11-11 20:32

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by int_ua (Post 865288)
Code:

>>> from PyQt4.QtGui import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1

Can someone point the bug for this to vote for?

I get the same error with the latest dropn900 from extras-devel. I had fresh n900 and nothing else installed. DropN900 was the first one i wanted to try :)

Khertan 2010-11-14 16:47

Re: PR 1.3 and Qt version confusion...
 
Quote:

Traceback (most recent call last):
File "/usr/bin/khweeteur_launch.py", line 3, in <module>
import khweeteur
File "/usr/lib/python2.5/site-packages/khweeteur/__init__.py", line 9, in <module>
from PyQt4.QtGui import *
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1
Pretty strange as i didn't got this error ... And i'm using too the PR1.3.

Mysticode 2010-11-16 07:12

Re: PR 1.3 and Qt version confusion...
 
Quote:

Originally Posted by keithzg (Post 860400)
Code:

Traceback (most recent call last):
  File "/usr/bin/khweeteur_launch.py", line 3, in <module>
    import khweeteur
  File "/usr/lib/python2.5/site-packages/khweeteur/__init__.py", line 9, in <module>
    from PyQt4.QtGui import *
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1


i get this same error.

johnel 2010-12-21 17:06

Re: PR 1.3 and Qt version confusion...
 
Is there any update on the latest version of PyQt?

I've installed the global version of PR1.3 and need PyQt.

Can I install the previous version from PR1.2 o do I have to wait until the latest version is ready?

blubbi 2010-12-21 17:27

Re: PR 1.3 and Qt version confusion...
 
You can install it.


All times are GMT. The time now is 00:33.

vBulletin® Version 3.8.8