On Aug 3, 2012 5:22 PM, "Lex Berezhny" <eukr...@gmail.com> wrote:
>
> lex@D830:~/projects/giweb/pyjs/examples/helloworld$ sudo ldconfig -v |
> grep webkit
> libwebkitgtk-3.0.so.0 -> libwebkitgtk-3.0.so.0.13.2
> libwebkitgtk-python-1.0.so.0 -> libwebkitgtk-python-1.0.so.0.2.0
> libwebkitgtk-1.0.so.0 -> libwebkitgtk-1.0.so.0.13.1
> libwebkitgtk-3.0.so.0 -> libwebkitgtk-3.0.so.0.13.1
>
>
> On Fri, Aug 3, 2012 at 6:15 PM, Lex Berezhny <eukr...@gmail.com> wrote:
> > Hmm, I added the LD_LIBRARY_PATH but it doesn't seem to be used:
> >
> >
> > lex@D830:~/projects/giweb/pyjs/examples/helloworld$ ls $LD_LIBRARY_PATH
> > girepository-1.0 libjavascriptcoregtk-3.0.so.0
> > libwebkitgtk-3.0.so libwebkitgtk-3.0.so.0.13.2
> > libjavascriptcoregtk-3.0.so libjavascriptcoregtk-3.0.so.0.13.2
> > libwebkitgtk-3.0.so.0 pkgconfig
> >
> > lex@D830:~/projects/giweb/pyjs/examples/helloworld$ ../../bin/pyjd Hello.py
> >
> > ** (Hello.py:28941): WARNING **: Failed to load shared library
> > 'libwebkitgtk-3.0.so.0' referenced by the typelib:
> > libwebkitgtk-3.0.soso: cannot open shared object file: No such file or
> > directory
> >
> > ** (Hello.py:28941): WARNING **: Failed to load shared library
> > 'libjavascriptcoregtk-3.0.so.0' referenced by the typelib:
> > libjavascriptcoregtk-3.0.soso: cannot open shared object file: No such
> > file or directory
> > Traceback (most recent call last):
> > File "Hello.py", line 1, in <module>
> > import pyjd # this is dummy in pyjs.
> > File "/home/lex/projects/giweb/pyjs/pyjd/__init__.py", line 37, in <module>
> > from giwebkit import *
> > File "/home/lex/projects/giweb/pyjs/pyjd/giwebkit.py", line 125, in <module>
> > WebKit = WebKit()
> > File "/home/lex/projects/giweb/pyjs/pyjd/giwebkit.py", line 44, in WebKit
> > tlc = (WebKit.DOMDocument, WebKit.DOMHTMLElement,
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 243, in __getattr__
> > return getattr(self._introspection_module, name)
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 153, in __getattr__
> > parent = get_parent_for_object(info)
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 73, in
> > get_parent_for_object
> > return getattr(module, name)
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 243, in __getattr__
> > return getattr(self._introspection_module, name)
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 154, in __getattr__
> > interfaces = tuple(interface for interface in
> > get_interfaces_for_object(info)
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 83, in
> > get_interfaces_for_object
> > interfaces.append(getattr(module, name))
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 243, in __getattr__
> > return getattr(self._introspection_module, name)
> > File "/usr/lib/python2.7/dist-packages/gi/module.py", line 180, in __getattr__
> > wrapper = metaclass(name, bases, dict_)
> > File "/usr/lib/python2.7/dist-packages/gi/types.py", line 232, in __init__
> > register_interface_info(cls.__info__.get_g_type())
> > TypeError: must be an interface
This won't use ldconfig or any cache, the LD_* is meant to override the that and allow you to use the local copy.
Make sure you have libwebkit3 (gtk3). You're also missing the GI_TYPELIB_PATH is seems?
Does the script I linked work?
What does `ldd path/to/libwebkit.so` output?
I'm on road ATM (passenger ;-) so a bit hard to diagnose but I try.
--
C Anthony
On Aug 3, 2012 6:53 PM, "C Anthony Risinger" <ant...@xtfx.me> wrote:
>
> Does the script I linked work?
>
> What does `ldd path/to/libwebkit.so` output?
File not found errors related to linker are usually signs of missing libraries -- `ldd` will show these missing libs, just make sure to export everything in the script.
--
C Anthony
On Aug 3, 2012 7:03 PM, "Lex Berezhny" <eukreign@gmail.com> wrote:
>
> lex@D830:~$ ldd projects/giweb/usr/lib/
Damn ... I'm actually sort of surprised all the libs matched up so nicely ... neat :-)
You are missing a depend:
> libicui18n.so.49 => not found
> libicuuc.so.49 => not found
> libicudata.so.49 => not found
... but this exact prob has happened to me before and should be a very easy fix. I'm still not at comp but the GOOG suggests installing:
icu
... will fix it. If already installed, but lower soname (.48 or lower) you'll need to rebuild that library and LD_LIBRARY_PATH load it (ie. like we are doing with WebKit) or LD_PRELOAD it ... should be fast/small and much easier than WebKit rebuild, but you likely can't install it systemwide because I think that package is actually Unicode support (or related/similar), and many packages will depend in current version.
So you'll probably need to rebuild it and pre load, or maybe pull a newer Ubuntu package and extract from there.
--
C Anthony
Weird ... I had a similar issue ... I think it was done kind of Arch bug. Check the permissions on your py/pyc files and I think you'll find some are owned by the wrong user/group and or have wrong permissions, such as 600 read-only to root.
Manually chmod/chown or reinstall python to fix. I did the latter.
> When i try to import (not start only import) my real world application
> (which uses json rpc, timer etc), the backtrace ends with:
>
> File "/usr/lib/python2.7/site-packages/pyjd/imputil.py", line 329, in
> _process_result exec code in module.__dict__
> File
> "/home/rene/Local/python/pyjs/pyjs/library/pyjamas/ui/Calendar.py",
> line 397, in <module> class DateField(Composite): File
> "/home/rene/Local/python/pyjs/pyjs/library/pyjamas/ui/Calendar.py",
> line 399, in DateField img_base = pygwt.getImageBaseURL(True) File
> "/home/rene/Local/python/pyjs/pyjs/library/pygwt.py", line 44, in
> getImageBaseURL return getModuleBaseURL() + "images/" File
> "/home/rene/Local/python/pyjs/pyjs/library/pygwt.py", line 28, in
> getModuleBaseURL s = get_main_frame().getUri() AttributeError:
> 'NoneType' object has no attribute 'getUri'
Did you import pyjd, very _first_ thing?
I'll check this out in AM right away. I'll have JSONRPC working tomorrow I think but probably not timers ... I have 2-3 implementations in mind but haven't had time to confirm one yet.
Thanks Rene!
--
C Anthony