Bug 1101626 - python scripting support is missing
Summary: python scripting support is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kig
Version: 21
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1102667
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-27 16:03 UTC by Maurizio Paolini
Modified: 2015-07-18 02:07 UTC (History)
6 users (show)

Fixed In Version: kig-4.14.3-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-18 02:07:01 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
KDE Software Compilation 335965 NOR REOPENED mathematical functions like sin, exp,... unusable in python scripts 2020-04-02 13:58:38 UTC

Description Maurizio Paolini 2014-05-27 16:03:43 UTC
Description of problem:

After some recent update python scripting support disappeared

Version-Release number of selected component (if applicable):

kig-4.12.5-1.fc20.i686

How reproducible:

Start kig and try to create a python script

Steps to Reproduce:
1. start kig
2. open "objects" menu
3. enter "Other" submenu
4. the entry for a python script is missing

Additional info:

Trying to compile from git source also seems to have problems to include python support, even if apparently all required packages are present

Comment 1 Rex Dieter 2014-05-27 16:40:25 UTC
May be a boost-python issue, libboost-python is not linked to libpython and has missing symbols on my box.

ldd -r /usr/lib64/libboost_python.so

that said, kig explicitly links python too, so that shouldnt be an issue.

Comment 2 Maurizio Paolini 2014-05-27 17:39:50 UTC
Both my laptop and my workstation use kernel-PAE.  The libboost_python.so lib
seems fine:

# ldd /usr/lib/libboost_python.so
        linux-gate.so.1 =>  (0xb7751000)
        libutil.so.1 => /lib/libutil.so.1 (0x45417000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x41a93000)
        libdl.so.2 => /lib/libdl.so.2 (0x41a8c000)
        librt.so.1 => /lib/librt.so.1 (0x41b5c000)
        libstdc++.so.6 => /lib/libstdc++.so.6 (0x41e97000)
        libm.so.6 => /lib/libm.so.6 (0x41ab0000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41b12000)
        libc.so.6 => /lib/libc.so.6 (0x418cc000)
        /lib/ld-linux.so.2 (0x418a8000)

as of libpython, I have
# ls -l /usr/lib/libpython*
lrwxrwxrwx 1 root root      19 Feb 25 15:27 /usr/lib/libpython2.7.so -> libpython2.7.so.1.0
-r-xr-xr-x 1 root root 1661236 Feb 19 14:48 /usr/lib/libpython2.7.so.1.0
-rwxr-xr-x 1 root root 2300496 Mar  5 09:23 /usr/lib/libpython3.3m.so.1.0
-rwxr-xr-x 1 root root    6068 Mar  5 09:23 /usr/lib/libpython3.so

Anyway, can you reproduce the problem?  I am pretty sure that kig *had* python
support with Fedora 20 until some recent update...

Comment 3 Rex Dieter 2014-05-27 18:02:45 UTC
Try ldd  with -r option:

       -r --function-relocs
              Perform relocations for both data objects and functions, and report any missing objects or functions (ELF only).

Comment 4 Rex Dieter 2014-05-27 18:04:21 UTC
how recent?

Comment 5 Rex Dieter 2014-05-27 18:10:06 UTC
I'm wondering if this may be related,
https://bugs.kde.org/show_bug.cgi?id=320807

that's the only relatively recent commit in kig I see touching the boost/python stuff.

Comment 6 Maurizio Paolini 2014-05-27 18:56:36 UTC
Ooops: actually it seems that *there is* python scripting support!  Strangely
I cannot find the menu entry to create a new script!



Anyway, when compiling from the git sources some saved files with
python scripting do not work and generate the error:

$ kig heptagonal_tessellation.kig 
kig(4431)/kdeui (kdelibs): Attempt to use QAction "edit_undo" with KXMLGUIFactory! 
kig(4431)/kdeui (kdelibs): Attempt to use QAction "edit_redo" with KXMLGUIFactory! 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /usr/lib/python2.7/lib-dynload/math.so: undefined symbol: PyFloat_Type

This seems related to you previous post.  Indeed
here is the ldd output... it seems there are *many* undefined symbols,
how can I fix that? However: the "missing python icon" suggests that the
problem is actually at the packaging level, is that so?

# ldd -r /usr/lib/libboost_python.so
        linux-gate.so.1 =>  (0xb77f1000)
        libutil.so.1 => /lib/libutil.so.1 (0x45417000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x41a93000)
        libdl.so.2 => /lib/libdl.so.2 (0x41a8c000)
        librt.so.1 => /lib/librt.so.1 (0x41b5c000)
        libstdc++.so.6 => /lib/libstdc++.so.6 (0x41e97000)
        libm.so.6 => /lib/libm.so.6 (0x41ab0000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41b12000)
        libc.so.6 => /lib/libc.so.6 (0x418cc000)
        /lib/ld-linux.so.2 (0x418a8000)
undefined symbol: PyList_Insert (/usr/lib/libboost_python.so)
undefined symbol: PyString_InternFromString     (/usr/lib/libboost_python.so)
undefined symbol: PyString_AsString     (/usr/lib/libboost_python.so)
undefined symbol: PyUnicodeUCS4_FromEncodedObject       (/usr/lib/libboost_python.so)
undefined symbol: PyImport_Import       (/usr/lib/libboost_python.so)
undefined symbol: PyNumber_InPlaceRshift        (/usr/lib/libboost_python.so)
undefined symbol: PyObject_CallMethod   (/usr/lib/libboost_python.so)
undefined symbol: PyIter_Next   (/usr/lib/libboost_python.so)
undefined symbol: PyNumber_Remainder    (/usr/lib/libboost_python.so)
undefined symbol: PyType_Ready  (/usr/lib/libboost_python.so)
undefined symbol: _PyEval_SliceIndex    (/usr/lib/libboost_python.so)
undefined symbol: PyFile_AsFile (/usr/lib/libboost_python.so)
undefined symbol: PyLong_FromUnsignedLong       (/usr/lib/libboost_python.so)
undefined symbol: PyMem_Free    (/usr/lib/libboost_python.so)
[...]

Comment 7 Maurizio Paolini 2014-05-29 11:46:30 UTC
Still, there is the problem that in no way I am able to access the panel for creating a new Python Script... The corresponding action seems to have vanished.

Comment 8 Rex Dieter 2014-05-29 12:01:54 UTC
Mind filing a bug upstream @ bugs.kde.org ?

Comment 9 Rex Dieter 2014-05-29 12:03:00 UTC
(and I'll look into the odd libboost_python linking issue in fedora)

Comment 10 Maurizio Paolini 2014-06-08 09:23:50 UTC
I filed a bug report as you suggestes: 
https://bugs.kde.org/show_bug.cgi?id=335550
and now the problem has been fixed in the latest git master, and perhaps
in branch KDE/4.13.

I still have problems when trying to use math functions (sin, exp, ecc), when
using the source-compiled kig.

(In reply to Rex Dieter from comment #8)
> Mind filing a bug upstream @ bugs.kde.org ?

Comment 11 Maurizio Paolini 2014-06-09 17:44:00 UTC
(In reply to Rex Dieter from comment #9)
> (and I'll look into the odd libboost_python linking issue in fedora)

I opened a new bug report in bugs.kde.org https://bugs.kde.org/show_bug.cgi?id=335965 about the mathematical functions that are unusable in python scripts.

The problem could not be reproduced by the maintainer (Gentoo distribution)
and the feeling is that this is a problem specific to Fedora.
What is the best way to deal with the problem?

Comment 12 Maurizio Paolini 2014-09-01 10:21:08 UTC
Using mathematical functions is still impossible under Fedora.  Are there any
news on the subject?
The error given by kig concerns PyFloat_Type (undefined).  Indeed I have:

$ ldd -r /usr/lib/libboost_python.so 2>&1 | grep -i PyFloat_Type
undefined symbol: PyFloat_Type  (/usr/lib/libboost_python.so)

So there seems to be some library missing, but I have no idea what should
be installed. I have installed:

python-* (many of them)
python-devel
boost
boost-devel
boost-python

Comment 13 Rex Dieter 2014-09-02 14:32:34 UTC
Still debating if this is a kig or boost bug (ie, who needs to link python libraries), see also bug #1102667

Comment 14 Maurizio Paolini 2014-09-02 15:18:40 UTC
(In reply to Rex Dieter from comment #13)
> Still debating if this is a kig or boost bug (ie, who needs to link python
> libraries), see also bug #1102667

Thank you for investigating the issue!  Is there any workaround while waiting for a clean resolution?

Comment 15 Rex Dieter 2014-09-02 15:30:49 UTC
I'm aware of no workaround yet, sorry.

Comment 16 Maurizio Paolini 2015-03-15 11:53:31 UTC
We are now at Fedora 21, with python 2.7.8-7.fc21, boost 1.55.0-8.fc21,
kig 4.14.3-1.fc21.

The problem is still there: I am not able to access mathematical functions
from a python script.

This is *very* unfortunate! Any news?

I am not able at the moment to post in the
upstream bug report https://bugs.kde.org/show_bug.cgi?id=335965
However it is marked as "RESOLVED DOWNSTREAM"

Comment 17 Rex Dieter 2015-03-16 00:59:49 UTC
upstream bug is now re-opened

Comment 18 Fedora Update System 2015-07-01 19:32:01 UTC
kig-4.14.3-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/kig-4.14.3-3.fc21

Comment 19 Fedora Update System 2015-07-03 18:37:21 UTC
Package kig-4.14.3-3.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kig-4.14.3-3.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11045/kig-4.14.3-3.fc21
then log in and leave karma (feedback).

Comment 20 Fedora Update System 2015-07-18 02:07:01 UTC
kig-4.14.3-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.