[PyKDE] Compiling PyKDE 3.11.3 on Solaris 8 fails

Holger Joukl Holger.Joukl at LBBW.de
Wed Mar 2 09:20:13 GMT 2005

Just a short update:
I managed to compile on my solaris machine now, here is the version summary
(a full description of the necessary config/tweaks will follow later on):

Solaris 8
gcc 2.95.2
PyKDE version 3.11.3
PyQt version is 3.13 (3.13.0)
sip version is 4.1.1 (4.1.1)
Python version is 2.3.4
Qt version is 3.3.3
KDE version is 3.3.2 (0x30302)

Now, when I run the uisampler example program, some things work fine but
others don´t:

$ python2.3 uisampler.py
Traceback (innermost last):
  File "xmlmenudemo.py", line 44, in ?
    from qt import QPopupMenu, SIGNAL, QLabel, QIconSet
ImportError: ld.so.1: python: fatal: relocation error: file
symbol PyUnicode_Type: referenced symbol not found

This happens e.g. if I try to launch the XML->KActionCollection.

Looking at my python interpreter says:
$ nm /apps/prod/bin/python2.3 |grep PyUnicode_Type
000fd158 D PyUnicode_Type
000d7fd0 R _PyUnicode_TypeRecords

Confusing. Finally I looked at the sample python code in
def xmlKActionCollection (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system ("python xmlmenudemo.py")

And there it is: We have several python versions here and for reasons I
change at the moment the "unqualified" python must still link to python1.5.

 $ ll -i /apps/prod/bin/pyth*
 275644 -rwxr-xr-x   2 root     other      547732 Aug  4  2000
 275644 -rwxr-xr-x   2 root     other      547732 Aug  4  2000
 325698 -rwxr-xr-x   1 root     other     1592778 Dec 13  2001
  77274 -rwxr-xr-x   1 root     other     2618910 Jul 23  2004

os.system ("python xmlmenudemo.py") invokes this out-of-date version
instead of the interpreter
I used to run the main program uisampler.py.
This even happens if I alias python to "python2.3" and, as I said, I cannot
not alter the link
to the new version python2.3.

Why not use sys.executable instead of the literal "python" here:
def xmlKActionCollection (parent):
    parent.currentPageObj = PageLaunch (parent)
    os.system("%s xmlmenudemo.py" % sys.executable)

Anyway, thanks a lot for all the hints so far!

(@Pete who couldn´t resist: I know I know - blame my employer. Otherwise,
let me work with python, so I tend to overlook such minor annoyances...)


Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
den Inhalt der E-Mail als Hardcopy an.

The contents of this  e-mail are confidential. If you are not the named
addressee or if this transmission has been addressed to you in error,
please notify the sender immediately and then delete this e-mail.  Any
unauthorized copying and transmission is forbidden. E-Mail transmission
cannot be guaranteed to be secure. If verification is required, please
request a hard copy version.

More information about the PyQt mailing list