[libhid-discuss] Installing Python wrappers from SVN

Sarah Mount s.mount at wlv.ac.uk
Sun Nov 16 21:42:39 UTC 2008


Hi all,

I'm trying to compile and install libhid from the latest SVN source
(in response to the other thread on SWIG!). I'm using Ubuntu Ibex and
I notice that by default the "prefix" used by configure/make is
/usr/local/ which causes a problem with installing the Python SWIG
wrappers on Ibex.

Running configure with '--prefix=/usr/' helps but the following files:

_hid.a          _hid.la  _hid.so        hidwrap.pyc   __init__.pyo
hid_ctypes.py   hid.py   _hid.so.0      hidwrap.pyo
hid_ctypes.pyc  hid.pyc  _hid.so.0.0.0  __init__.py
hid_ctypes.pyo  hid.pyo  hidwrap.py     __init__.pyc

get installed in /usr/lib/python2.5/site-packages/libhid/. Now,
/usr/lib/python2.5/site-packages/ is on the PYTHONPATH, so that's
great, but now the top level hid.py and hidwrap.py are in the
.../libhid/ directory, meaning that they can't be imported directly
(checking this Python indeed raises an ImportError).

Importing libhid.hid looks like it ought to work but actually gives
the following error:

>>> import libhid.hid
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr//lib/python2.5/site-packages/libhid/__init__.py", line
11, in <module>
    import _hid
ImportError: /usr/lib/python2.5/site-packages/libhid/_hid.so:
undefined symbol: assert
>>>

I would guess that this only needs a small change in the way I'm using
the autoconf/make tools to fix, but I can't figure out which variable
needs changing. Any help gratefully received!

Many thanks,

Sarah

-- 
Sarah Mount, Senior Lecturer, University of Wolverhampton
Web:  http://www.wlv.ac.uk/~in0316/
Book: http://www.pythonforrookies.org/
Blog: http://varspool.blogspot.com/
Photos: http://flickr.com/photos/sarahmount/

This email, together with any attachment, is for the exclusive and
confidential use of the addressee(s) and may contain legally
privileged information.  Any use, disclosure or reproduction without
the sender's explicit consent is unauthorised and may be unlawful.

Any e-mail including its content and any attachments may be monitored
and used by The University of Wolverhampton for reasons of security
and for monitoring internal compliance with the University's policy on
internet use. E-mail blocking software may also be used.  The
University cannot guarantee that this message or any attachment is
virus free or has not been intercepted and amended.

If you believe you have received this message in error please notify
the sender by email, telephone or fax and destroy the message and any
copies.



More information about the libhid-discuss mailing list