Description of problem: python scripts in kig cannot use mathematical functions Version-Release number of selected component (if applicable): kig-15.04.0-1.fc22.i686 How reproducible: Create a python script that uses a mathematical function (e.g. sin) Steps to Reproduce: 1. open kig 3. Objects->Other->Python Script 4. click on "Next" 5. enter e.g. <TAB>return DoubleObject( 4*atan(1.0) ) Actual results: Error in script: ... NameError: global name 'atan' is not defined ... Expected results: The string "3.1315" should appear near the origin Additional info: This happens even with the latest Git code, so I "reopened" the bug upstream: https://bugs.kde.org/show_bug.cgi?id=335965 However soon after that the bug was closed as "RESOLVED DOWNSTREAM". Does that mean "Fedora" for me? A workaround is to open kig with: $ LD_PRELOAD=/usr/lib/libpython2.7.so.1.0 kig (or "lib64")
Basically same issue as f21's kig bug #1101626 We're seeing runtime error/warning: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: /usr/lib64/python2.7/lib-dynload/math.so: undefined symbol: PyFloat_Type
Per my upstream comment https://bugs.kde.org/show_bug.cgi?id=335965#c22 this would appear to be an upstream bug fixed by my proposed patch there, but upstream developer is arguing this is a fedora/downstream issue, that (apparently?) /usr/lib64/python2.7/lib-dynload/math.so should link libpython itself. Can you please clarify for me if that's expected or not?
Hi, I've commented on the upstream bug. Basically, I believe Fedora's configuration is fine, even if different distros may use the upstream default of linking Python modules statically.
Thanks, let's bounce this back to kig.
As an aside, you mentioned that python by default links modules statically, it seems in the "shared" case... it's not linked with libpython *at all*? If true, why not?
No, it's not linked to libpython. It's not a generic shared library usable with any C program that wants it. It is meant to be loaded by Python's import machinery, from the specific version of Python for which it was configured and built. The comments on the upstream bug tracker indicate that a Py_Initialize() was called while libpython wasn't loaded, which is looks extremely strange to me, since Py_Initialize is provided by libpython. FWIW, I just checked that with upstream Python te module is linked this way, when configured as mentioned in the upstream bug and built from source.
kig-15.04.3-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/kig-15.04.3-1.fc22
(In reply to Fedora Update System from comment #7) > kig-15.04.3-1.fc22 has been submitted as an update for Fedora 22. > https://admin.fedoraproject.org/updates/kig-15.04.3-1.fc22 The proposed update works fine for me! Thank you for tracking the problem down... I couldn't understand the discussion (both downstream and upstream), I hope nobody got hurt in the process :-)
Package kig-15.04.3-1.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing kig-15.04.3-1.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-11142/kig-15.04.3-1.fc22 then log in and leave karma (feedback).
kig-15.04.3-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1529346 has been marked as a duplicate of this bug. ***