explicitly use QLibrary to load libpython

Review Request #126549 - Created Dec. 28, 2015 and updated

Information
Rex Dieter
kig
master
335965
Reviewers
narvaez

Explicitly use QLibrary to load libpython, like pykde, to avoid missing symbols (among other things).

This fix has been deployed and tested in fedora (and maybe opensuse too).

Issues

  • 1
  • 0
  • 0
  • 1
Description From Last Updated
Don't you want to check whether the library is actually loading successfully? The load could fail. Boudhayan Gupta Boudhayan Gupta
Boudhayan Gupta

+1 from me. It seems a bunch of people online have posted having to dlopen() libPython to load the math symbols, so while this is an ugly hack it's a valid ugly hack at that.

My reservation is about this doing something bad on systems that don't build Python with shared math symbols, but if that's not a problem, I don't see anything wrong with this patch.

scripting/python_scripter.cc (Diff revision 1)
 
 

Don't you want to check whether the library is actually loading successfully? The load could fail.

David Narváez

This hack is not going into Kig. It belongs at the package level in Fedora, OpenSuse and other distros that compile with --enable-shared. My bug report to Python is at http://bugs.python.org/issue24783.

  1. So... you're saying it's not a downstream distro problem, but an upstream (python) one? I guess that's fine, but it also seems to imply you're ok with kig being broken for any distro using python's --enable-shared configuration. Is that accurate?

Loading...