Hi all,
I’m having trouble installing Cwiid on my beaglebone black running Angstrom. Ideally I’d like to install cwiid-python with opkg but can’t seem to find the right repo. I’ve found debian packages for cwiid-python, but no angstrom ones. I’ve found cwiid-dbg in the angstrom debug repo, but that just seems to be the C library. If I try to import cwiid into python I get this error:
ImportError: No module named cwiid.
I tried compiling from source but get this error:
configure: error: flex missing yypop_buffer_state - upgrade to version 2.5.33 or later
I’m also reading that cwiid would have to be cross-compiled for Arm, and I don’t know how to do that. Does anyone know where I can get Cwiid precompiled for angstrom?
Thanks–
I took me several days but I was able to figure this out:
in cwiid/wminput/Makefile:
I had to add the path to python in the cflags:
CFLAGS += -I/usr/include/python2.7/ -I…/libcwiid \
include it in the LDLIBS:
LDLIBS += -lpython -lcwiid -lbluetooth -ldl -lpthread
add it to the LDLIBS:
LDFLAGS += -L/usr/include/python2.7/ -L…/libcwiid -rdynamic
And comment these lines out in ifdef PYTHON section:
CFLAGS += -I/usr/include/python^[[?1034h2.7
LDLIBS += -lpython^[[?1034h2.7
if I try and import cwiid from python, I get this error:
ImportError: libcwiid.so.1: cannot open shared object file: No such file or directory
But if I run
LD_PRELOAD=/usr/local/lib/libcwiid.so python wiimotetest.py
then it works. I’ve tried running ldconfig, I’m not sure how I can get the library properly installed, but this works as a workaround.
Oh yeah and I had to compile an earlier version of flex that supported yypop_buffer_state and replace it in /usr/bin.