Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dev-python/pywebkitgtk is not properly linked. [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Korhul
n00b
n00b


Joined: 09 May 2005
Posts: 74
Location: Czech Republic

PostPosted: Tue Sep 06, 2016 7:11 pm    Post subject: dev-python/pywebkitgtk is not properly linked. [solved] Reply with quote

I hacked together this ebuild for zfo_editor app:

Code:

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

PYTHON_COMPAT=( "python2_7" )

DESCRIPTION="ZFO editor allows working with ZFO forms on systems which are not officially
or at all supported by SW602 602XML Filler."

SLOT=0

inherit distutils-r1 xdg-utils

HOMEPAGE="https://labs.nic.cz/cs/zfo-editor.html"
SRC_URI="https://www.nic.cz/files/labs/zfo_editor/${PN}-${PV}.tar.gz"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"

RDEPEND="${PYTHON_DEPS}
         dev-python/pywebkitgtk[${PYTHON_USEDEP}]
         dev-python/lxml[${PYTHON_USEDEP}]"

DEPEND="${RDEPEND}"

pkg_postinst() {
    xdg_desktop_database_update
    xdg_mimeinfo_database_update
}


It installs without error, however when i run the program it fails:

Code:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/zfo_editor", line 2, in <module>
    import zfoeditor.zfo_gui as zg
  File "/usr/lib64/python2.7/site-packages/zfoeditor/zfo_gui.py", line 33, in <module>
    from webgui import start_gtk_thread
  File "/usr/lib64/python2.7/site-packages/zfoeditor/webgui.py", line 48, in <module>
    raise Exception('Failed to load webkit modules')
Exception: Failed to load webkit modules


I am not sure whether this is due to the error in the ebuild or if this is actually something that needs to be fixed with patch to the source. I have studied documentation on Gentoo Python Project wiki, but got no clues from it.

Can anyone help to get this going or point to the right doc?

EDIT: fixed wrong traceback from local user installation


Last edited by Korhul on Thu Sep 08, 2016 7:00 pm; edited 2 times in total
Back to top
View user's profile Send private message
Korhul
n00b
n00b


Joined: 09 May 2005
Posts: 74
Location: Czech Republic

PostPosted: Tue Sep 06, 2016 8:09 pm    Post subject: Reply with quote

Upon further investigation, I have found that it is webkit python module which fails with error while being imported.

Code:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/zfo_editor", line 2, in <module>
    import zfoeditor.zfo_gui as zg
  File "/usr/lib64/python2.7/site-packages/zfoeditor/zfo_gui.py", line 33, in <module>
    from webgui import start_gtk_thread
  File "/usr/lib64/python2.7/site-packages/zfoeditor/webgui.py", line 48, in <module>
    raise Exception('Failed to load webkit modules')
Exception: Failed to load webkit modules
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21677
Location: here

PostPosted: Tue Sep 06, 2016 9:11 pm    Post subject: Reply with quote

I tried to install/run package and work.
The reported error I can reproduce when I uninstall pywebkitgtk.
You are sure that the package has not been removed?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Korhul
n00b
n00b


Joined: 09 May 2005
Posts: 74
Location: Czech Republic

PostPosted: Wed Sep 07, 2016 4:15 pm    Post subject: Reply with quote

Strange. I have pywebkitgtk totaly installed (reemerged right now), but program does not work.

I have created sample script test.py

Code:

import webkit

print "Webkit"


And it fails with:

Code:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import webkit
  File "/usr/lib64/python2.7/site-packages/webkit/__init__.py", line 21, in <module>
    import webkit
ImportError: /usr/lib64/python2.7/site-packages/webkit/webkit.so: undefined symbol: pywebkit_functions
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21677
Location: here

PostPosted: Wed Sep 07, 2016 6:49 pm    Post subject: Reply with quote

Sorry, I tried to reproduce the error without success.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Korhul
n00b
n00b


Joined: 09 May 2005
Posts: 74
Location: Czech Republic

PostPosted: Wed Sep 07, 2016 11:21 pm    Post subject: Reply with quote

No problem.

For further debugging:

Code:

thuban tmp # ls -al /usr/lib64/python2.7/site-packages/webkit/
celkem 44
drwxr-xr-x   2 root root  4096  7. zář 18.19 .
drwxr-xr-x 152 root root 20480  7. zář 18.20 ..
-rw-r--r--   1 root root   897  7. zář 18.18 __init__.py
-rw-r--r--   1 root root   246  7. zář 18.19 __init__.pyc
-rwxr-xr-x   1 root root 10216  7. zář 18.18 webkit.so


Can you please post output of:

Code:

thuban tmp # ldd /usr/lib64/python2.7/site-packages/webkit/webkit.so
        linux-vdso.so.1 (0x00007ffc8b3c4000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe6fe94e000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fe6fe5ad000)
        /lib64/ld-linux-x86-64.so.2 (0x00005587ceb42000)


Maybe my pywebkitgtk is not properly linked on my system...
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21677
Location: here

PostPosted: Thu Sep 08, 2016 6:13 am    Post subject: Reply with quote

My ldd on webkit.so
Code:
$ ldd /usr/lib64/python2.7/site-packages/webkit/webkit.so
        linux-vdso.so.1 (0x00007ffef4fec000)
        libwebkitgtk-1.0.so.0 => /usr/lib64/libwebkitgtk-1.0.so.0 (0x00007fbcc9cd6000)
        libgtk-x11-2.0.so.0 => /usr/lib64/libgtk-x11-2.0.so.0 (0x00007fbcc968f000)
        libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007fbcc943c000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbcc9220000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fbcc8e83000)
        libjavascriptcoregtk-1.0.so.0 => /usr/lib64/libjavascriptcoregtk-1.0.so.0 (0x00007fbcc856a000)
        libenchant.so.1 => /usr/lib64/libenchant.so.1 (0x00007fbcc835e000)
        libharfbuzz-icu.so.0 => /usr/lib64/libharfbuzz-icu.so.0 (0x00007fbcc815b000)
        libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007fbcc7ed8000)
        libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007fbcc7cd4000)
        libgstapp-1.0.so.0 => /usr/lib64/libgstapp-1.0.so.0 (0x00007fbcc7ac7000)
        libgstaudio-1.0.so.0 => /usr/lib64/libgstaudio-1.0.so.0 (0x00007fbcc7874000)
        libgstfft-1.0.so.0 => /usr/lib64/libgstfft-1.0.so.0 (0x00007fbcc766a000)
        libgstpbutils-1.0.so.0 => /usr/lib64/libgstpbutils-1.0.so.0 (0x00007fbcc743f000)
        libgstvideo-1.0.so.0 => /usr/lib64/libgstvideo-1.0.so.0 (0x00007fbcc71b9000)
        libgstbase-1.0.so.0 => /usr/lib64/libgstbase-1.0.so.0 (0x00007fbcc6f56000)
        libgstreamer-1.0.so.0 => /usr/lib64/libgstreamer-1.0.so.0 (0x00007fbcc6c34000)
        libgdk-x11-2.0.so.0 => /usr/lib64/libgdk-x11-2.0.so.0 (0x00007fbcc697d000)
        libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007fbcc6757000)
        libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007fbcc642a000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib64/libgdk_pixbuf-2.0.so.0 (0x00007fbcc6207000)
        libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fbcc5f9c000)
        libsoup-2.4.so.1 => /usr/lib64/libsoup-2.4.so.1 (0x00007fbcc5cc2000)
        libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007fbcc593f000)
        libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007fbcc5703000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007fbcc539b000)
        libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1 (0x00007fbcc510b000)
        libEGL.so.1 => /usr/lib64/opengl/nvidia/lib/libEGL.so.1 (0x00007fbcc4f06000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fbcc4d02000)
        libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007fbcc4ab6000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fbcc477d000)                                                                                             
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fbcc453f000)                                                                                         
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fbcc428c000)                                                                                             
        libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fbcc4057000)                                                                                                 
        libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007fbcc3d51000)                                                                                               
        libicui18n.so.57 => /usr/lib64/libicui18n.so.57 (0x00007fbcc38d7000)                                                                                             
        libicuuc.so.57 => /usr/lib64/libicuuc.so.57 (0x00007fbcc3531000)                                                                                                 
        libwebp.so.5 => /usr/lib64/libwebp.so.5 (0x00007fbcc32d5000)
        libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007fbcc30d1000)
        libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007fbcc2ece000)
        libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007fbcc2cc4000)
        libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007fbcc2a5a000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fbcc2717000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fbcc2501000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6 (0x00007fbcc21a9000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fbcc1eab000)
        /lib64/ld-linux-x86-64.so.2 (0x000055a214429000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 (0x00007fbcc1c94000)
        libpangocairo-1.0.so.0 => /usr/lib64/libpangocairo-1.0.so.0 (0x00007fbcc1a86000)
        libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007fbcc1880000)
        libpangoft2-1.0.so.0 => /usr/lib64/libpangoft2-1.0.so.0 (0x00007fbcc1669000)
        libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007fbcc1460000)
        libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007fbcc1231000)
        libgsttag-1.0.so.0 => /usr/lib64/libgsttag-1.0.so.0 (0x00007fbcc0ff7000)
        liborc-0.4.so.0 => /usr/lib64/liborc-0.4.so.0 (0x00007fbcc0d71000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fbcc0b68000)
        libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007fbcc0965000)
        libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007fbcc0753000)
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007fbcc0548000)
        libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007fbcc033d000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fbcc012a000)
        libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007fbcbfe7d000)
        libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007fbcbfc78000)
        libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007fbcbfa6e000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fbcbf84b000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fbcbf633000)
        libGLX.so.0 => /usr/lib64/opengl/nvidia/lib/libGLX.so.0 (0x00007fbcbf401000)
        libGLdispatch.so.0 => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0 (0x00007fbcbf118000)
        libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007fbcbeeee000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fbcbecdd000)
        libicudata.so.57 => /usr/lib64/libicudata.so.57 (0x00007fbcbd260000)
        libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007fbcbd057000)
        libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007fbcbce3a000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fbcbcc35000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fbcbca2f000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fbcbc829000)

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Korhul
n00b
n00b


Joined: 09 May 2005
Posts: 74
Location: Czech Republic

PostPosted: Thu Sep 08, 2016 6:59 pm    Post subject: Reply with quote

Finaly I have found the culprit!

In build log of dev-python/pywebkitgtk I have discovered this error:

Code:

/usr/bin/pygobject-codegen-2.0: no supported Python implementation variant found!


So reemerging dev-python/pygobject:2 fixed the problem. This package version has not been update for two years on my computer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum