Hi all, I just downloaded and compiled the latest snapshot of sip and PyQt, 20030531. I applied the attached patch to PyQt to make it compile on Debian. I'm using Python 2.2.2 and Qt 3.1.2 from Debian Woody.
However, certain PyQt applications crash with a "Segmentation fault" output in the console. For instance, examples3/aclock.py works but examples3/addressbook.py doesn't. I've attached the strace output for addressbook. Any ideas? Ciao, Gordon
diff -ru PyQt-x11-gpl-3.6.orig/build.py PyQt-x11-gpl-3.6/build.py
--- PyQt-x11-gpl-3.6.orig/build.py 2003-04-26 11:28:46.000000000 -0400
+++ PyQt-x11-gpl-3.6/build.py 2003-04-27 14:37:21.000000000 -0400
@@ -577,11 +577,11 @@
# Link in the qassistantclient library for Qt v3.1+.
qaclib = ""
- if qtVersion >= 0x030100:
- if sys.platform == "win32":
- qaclib = "$(QTDIR)\\lib\\qassistantclient.lib"
- else:
- qaclib = "-lqassistantclient"
+# if qtVersion >= 0x030100:
+# if sys.platform == "win32":
+# qaclib = "$(QTDIR)\\lib\\qassistantclient.lib"
+# else:
+# qaclib = "-lqassistantclient"
proPatches["QACLIB"] = [re.compile("@BL_QASSISTANTCLIENT@",re.M), qaclib]
@@ -626,6 +626,16 @@
proPatches["INCLUDEPATH"] = [re.compile("@BL_INCLUDEPATH@",re.M), incdirs]
+# BEGIN DEBIAN SPECIFIC
+def checkArchDependentFlags():
+ from os import environ
+
+ if environ.has_key('DEB_BUILD_ARCH'):
+ if environ['DEB_BUILD_ARCH'].find('hppa') >= 0:
+ makefilePatches["LFLAGS"] = ["^LFLAGS[ \\t]*=[ \\t](.*)$", "LFLAGS\t=\t-ffunction-sections -Wl,--stub-group-size=25000 \\1"]
+ if environ['DEB_BUILD_ARCH'].find('mips') >= 0:
+ makefilePatches["MIPS_CXXFLAGS"] = ["^CXXFLAGS[ \\t]*=[ \\t](.*)$", "CXXFLAGS\t=\t-Wa,-xgot \\1"]
+# END DEBIAN SPECIFIC
def checkQtLibrary():
"""Check which Qt library is to be used.
@@ -1228,12 +1238,34 @@
global debugMode
proPatches["DEBUG"] = [re.compile("@BL_DEBUG@",re.M), debugMode]
+# BEGIN DEBIAN SPECIFIC
+ if mname == "qt":
+ noStyles = " ".join([
+ "QT_NO_STYLE_CDE",
+ "QT_NO_STYLE_MOTIFPLUS",
+ "QT_NO_STYLE_MOTIF",
+ "QT_NO_STYLE_PLATINUM",
+ "QT_NO_STYLE_SGI",
+ "QT_NO_STYLE_WINDOWS" ])
+ proPatches["MYDEFINES"] = [re.compile("(^DEFINES.*)$",re.M),
+ "\\1 " + noStyles]
+ elif mname == "qtgl":
+ makefilePatches["NOGLU"] = [re.compile("-lGLU",re.M), ""]
+# END DEBIAN SPECIFIC
+
global catCppFiles
if catCppFiles:
catFiles(mname)
buildMakefile(pro)
+# BEGIN DEBIAN SPECIFIC
+ if mname == "qt":
+ del proPatches["MYDEFINES"]
+ elif mname == "qtgl":
+ del makefilePatches["NOGLU"]
+# END DEBIAN SPECIFIC
+
fixInstallTarget(mname)
del proPatches["TARGET"]
@@ -1538,6 +1570,7 @@
installChecks()
maindir = mkTempBuildDir()
compileChecks()
+ checkArchDependentFlags()
# Work out the platform and Qt version tags to pass to SIP to generate the
# code we need.
diff -ru PyQt-x11-gpl-3.6.orig/sip/qobject.sip PyQt-x11-gpl-3.6/sip/qobject.sip
--- PyQt-x11-gpl-3.6.orig/sip/qobject.sip 2003-04-26 11:29:19.000000000 -0400
+++ PyQt-x11-gpl-3.6/sip/qobject.sip 2003-04-27 14:23:43.000000000 -0400
@@ -89,9 +89,9 @@
{sipName_QActionGroup, &sipClass_QActionGroup},
#endif
{sipName_QApplication, &sipClass_QApplication},
-#if QT_VERSION >= 0x030100
- {sipName_QAssistantClient, &sipClass_QAssistantClient},
-#endif
+// #if QT_VERSION >= 0x030100
+// {sipName_QAssistantClient, &sipClass_QAssistantClient},
+// #endif
{sipName_QBoxLayout, &sipClass_QBoxLayout},
{sipName_QButton, &sipClass_QButton},
{sipName_QButtonGroup, &sipClass_QButtonGroup},
diff -ru PyQt-x11-gpl-3.6.orig/sip/qtdocs.sip PyQt-x11-gpl-3.6/sip/qtdocs.sip
--- PyQt-x11-gpl-3.6.orig/sip/qtdocs.sip 2003-04-26 11:29:17.000000000 -0400
+++ PyQt-x11-gpl-3.6/sip/qtdocs.sip 2003-04-27 14:22:43.000000000 -0400
@@ -757,7 +757,7 @@
%Include qaccel.sip
%Include qaction.sip
%Include qapplication.sip
-%Include qassistantclient.sip
+// %Include qassistantclient.sip
%Include qbitmap.sip
%Include qbrush.sip
%Include qbutton.sip
diff -ru PyQt-x11-gpl-3.6.orig/sip/qtmod.sip PyQt-x11-gpl-3.6/sip/qtmod.sip
--- PyQt-x11-gpl-3.6.orig/sip/qtmod.sip 2003-04-26 11:29:17.000000000 -0400
+++ PyQt-x11-gpl-3.6/sip/qtmod.sip 2003-04-27 14:22:43.000000000 -0400
@@ -59,12 +59,12 @@
%Include qaction.sip
%Include qapplication.sip
%Include qarray.sip
-%Include qassistantclient.sip
+// %Include qassistantclient.sip
%Include qbrush.sip
%Include qbutton.sip
%Include qbuttongroup.sip
%Include qbytearray.sip
-%Include qcdestyle.sip
+// %Include qcdestyle.sip
%Include qcheckbox.sip
%Include qclipboard.sip
%Include qcolor.sip
@@ -128,8 +128,8 @@
%Include qmenudata.sip
%Include qmessagebox.sip
%Include qmime.sip
-%Include qmotifplusstyle.sip
-%Include qmotifstyle.sip
+// %Include qmotifplusstyle.sip
+// %Include qmotifstyle.sip
%Include qmovie.sip
%Include qmutex.sip
%Include qmultilinedit.sip
@@ -143,7 +143,7 @@
%Include qpalette.sip
%Include qpicture.sip
%Include qpixmapcache.sip
-%Include qplatinumstyle.sip
+// %Include qplatinumstyle.sip
%Include qpoint.sip
%Include qpointarray.sip
%Include qpopupmenu.sip
@@ -165,7 +165,7 @@
%Include qsemimodal.sip
%Include qsessionmanager.sip
%Include qsettings.sip
-%Include qsgistyle.sip
+// %Include qsgistyle.sip
%Include qsignalmapper.sip
%Include qsimplerichtext.sip
%Include qsizegrip.sip
@@ -212,8 +212,8 @@
%Include qwidgetlist.sip
%Include qwidgetstack.sip
%Include qwindow.sip
-%Include qwindowsstyle.sip
-%Include qwindowsxpstyle.sip
+// %Include qwindowsstyle.sip
+// %Include qwindowsxpstyle.sip
%Include qwizard.sip
%Include qwmatrix.sip
%Include qworkspace.sip
addressbook-trace.gz
Description: GNU Zip compressed data
