Bug 312618 - PyKDE4 QtCore.so has many undefined symbols
Summary: PyKDE4 QtCore.so has many undefined symbols
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR grave (vote)
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-04 17:28 UTC by Andrea Scarpino
Modified: 2013-01-07 19:58 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Scarpino 2013-01-04 17:28:34 UTC
Using the latest KDE 4.10 RC2 any python plasmoid doesn't work anymore.

% plasmoidviewer veromix-plasmoid
plasmoidviewer(25461)/python (plugin): Failed to import module 
Traceback (most recent call last):
  File "/usr/share/apps/plasma_scriptengine_python/pyappletscript.py", line 20, in <module>
    from PyQt4.QtCore import *
ImportError: /usr/lib/python2.7/site-packages/PyQt4/QtCore.so: undefined symbol: PyBool_Type

Downgrading to 4.10 RC1 solves this.

Reproducible: Always

Steps to Reproduce:
1. Build pykde4 4.9.97
2. exec plasmoidviewer veromix-plasmoid
Actual Results:  
You get an error in the console.

Expected Results:  
The plasmoid works.

KDE 4.10 RC2
PyQt 4.9.6
Comment 1 Andrea Scarpino 2013-01-04 17:31:51 UTC
as Luca suggested, removing the cmake_minimum_required call in the CMakeLists.txt fixes this.
Comment 2 Luca Beltrame 2013-01-04 19:29:36 UTC
So far I can't reproduce both on self compiled and distro (openSUSE) packages.
Comment 3 Rex Dieter 2013-01-07 17:11:49 UTC
Confirmed on f18 + kde-4.9.97 builds too
Comment 4 Rex Dieter 2013-01-07 17:17:34 UTC
Sorry, slightly different error (though the end result of not loading is the same):

plasma-windowed veromix-plasmoid
plasma-windowed(27098)/python (plugin): Failed to import module 
Traceback (most recent call last):
  File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 21, in <module>
    from PyQt4.QtCore import *
ImportError: /usr/lib64/python2.7/site-packages/PyQt4/QtCore.so: undefined symbol: PyExc_ValueError
Comment 5 Rex Dieter 2013-01-07 17:35:48 UTC
My guess is this may have fixed the build,
https://projects.kde.org/projects/kde/kdebindings/pykde4/repository/revisions/fb5138027a450a9ba0af0f93c7851d3124a8061b

but it doesn't work either.  I think what we really want there is:
ADD_DEFINITIONS(-DLIB_PYTHON="${LIB_PYTHON}")

which seems to make things much happier for me.
Comment 6 Luca Beltrame 2013-01-07 18:52:49 UTC
In data lunedì 07 gennaio 2013 17:35:48, hai scritto:

> ADD_DEFINITIONS(-DLIB_PYTHON="${LIB_PYTHON}")
> which seems to make things much happier for me.

Can you confirm it works? If so, I'll commit soon (as I'm totally unable to 
reproduce this issue on my syustem)
Comment 7 Andrea Scarpino 2013-01-07 19:17:05 UTC
I added
ADD_DEFINITIONS(-DLIB_PYTHON="${LIB_PYTHON}")
after the cmake_minimum_required call and the issue is still here.
I'm using the 4.9.97 tarball, not git.
Comment 8 Rex Dieter 2013-01-07 19:19:16 UTC
Sorry I should have been more clear, per the commit I referenced, it modified
kpythonpluginfactory/CMakeLiists.txt

that's the one you need to change
ADD_DEFINITIONS(-DLIB_PYTHON="\\"${LIB_PYTHON}\\"")
to
ADD_DEFINITIONS(-DLIB_PYTHON="${LIB_PYTHON}")
Comment 9 Luca Beltrame 2013-01-07 19:36:24 UTC
Git commit 9f70d3e320a56c5096f7dee0cb42edb5d4461190 by Luca Beltrame.
Committed on 07/01/2013 at 20:31.
Pushed by lbeltrame into branch 'KDE/4.10'.

Revert "Fix build after 9b2593a"

Apparently the CMake policy is set back somewhere in CMakeLists, and some
people (not me, unfortunately) are experiencing missing symbols in
PyKDE4.

The commit (in agreement with krop) has been reverted until the real
cause is to be found.

Close the bug if you're no longer affected by this.

This reverts commit f8ab7037ee78746de2c30079b3e0832537fb62f7.

M  +1    -1    kpythonpluginfactory/CMakeLists.txt

http://commits.kde.org/pykde4/9f70d3e320a56c5096f7dee0cb42edb5d4461190
Comment 10 Luca Beltrame 2013-01-07 19:36:24 UTC
Git commit bdab774f1f0874d7f0a6e14d7885d73c8101b3e9 by Luca Beltrame.
Committed on 07/01/2013 at 20:34.
Pushed by lbeltrame into branch 'KDE/4.10'.

Fix unresolved symbols appearing in PyKDE4.

Apparently the CMake policy responsible for this is getting set back
somewhere in the build system.

Reporter, please close the bug if the issue is no longer applicable. I
can't reproduce it.

M  +1    -1    kpythonpluginfactory/CMakeLists.txt

http://commits.kde.org/pykde4/bdab774f1f0874d7f0a6e14d7885d73c8101b3e9