Re: Running tests in a development environment

On Thu, Apr 5, 2012 at 14:59, Matthew Booth <mbooth redhat com> wrote:
> I'm currently developing GObject bindings for libguestfs, and have been
> having some problems running tests from my local development environment.
> Specifically I get:
> gi._glib.GError: Could not locate guestfs_session_new:
> libguestfs-gobject-1.0.soso: cannot open shared object file: No such file or
> directory
> Note the .soso. I have no idea where this duplicated suffix comes from, and
> it obviously doesn't exist.

First I would try to find what is causing that error. PyGObject
doesn't open the typelibs nor the .so themselves, but does it through

In order to find out what is calling dlopen, put a breakpoint there
with gdb and check out the backtrace.

I believe you want to do something similar to what libsecrets does, so
you may want to check out its sources or ask Stef Walters.



> If I create it, however, I get:
> gi._glib.GError: Could not locate guestfs_session_new:
> /home/mbooth/src/libguestfs/gobject/.libs/libguestfs-gobject-1.0.soso:
> undefined symbol: g_free
> Suspecting that I perhaps needed some more environment variables set (we
> currently set LD_LIBRARY_PATH and GI_TYPELIB_PATH), We currently run gjs
> tests just fine with this environment, so it has been sanity-checked. I
> checked out pygobject to see how its tests are run. It turns out they don't
> run for me either. Running make check ends in:
> /usr/bin/dbus-launch  /usr/bin/python -Wd -Werror::PendingDeprecationWarning
> -Werror::DeprecationWarning ./
> Traceback (most recent call last):
>  File "./", line 44, in <module>
>    suite = loader.loadTestsFromNames(names)
>  File "/usr/lib64/python2.7/unittest/", line 128, in
> loadTestsFromNames
>    suites = [self.loadTestsFromName(name, module) for name in names]
>  File "/usr/lib64/python2.7/unittest/", line 91, in
> loadTestsFromName
>    module = __import__('.'.join(parts_copy))
>  File "/home/mbooth/src/pygobject/tests/", line 9, in
> <module>
>    from gi.repository import Gdk
>  File "../gi/", line 23, in <module>
>    from ._gi import _API, Repository
> ImportError: ../gi/ undefined symbol: g_callable_info_invoke
> I suspect a common cause with my undefined symbol in libguestfs. Any ideas?
> Thanks,
> Matt
> --
> Matthew Booth, RHCA, RHCSS
> Red Hat Engineering, Virtualisation Team
> GPG ID:  D33C3490
> GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]