@Keiner,
I'm having a similar problem than you seemed to solve. The i2c-tools project builds (and installs) without complaints, but I'm getting an error while importing smbus on python:
root@clanton:~/i2c-tools# python Python 2.7.3 (default, May 23 2014, 23:51:57) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.>>> import smbus /usr/bin/python2.7: symbol 'i2c_smbus_access': can't resolve symbol in lib '/usr/lib/python2.7/site-packages/smbus.so'.
The smbus.so library is placed in the right directory:
root@clanton:/usr/local/lib# ls -la /usr/lib/python2.7/site-packages total 1460 drwxr-sr-x 4 root root 1024 Sep 15 04:16 . drwxr-sr-x 27 root root 9216 Sep 15 02:03 .. -rw-r--r-- 1 root root 119 May 23 21:52 README -rw-r--r-- 1 root root 21 Apr 11 10:15 cv.py -rwxr-xr-x 1 root root 1412532 Jul 6 13:01 cv2.so drwxr-sr-x 5 root root 1024 May 23 23:49 nose-1.2.1-py2.7.egg drwxr-sr-x 18 root root 1024 May 23 23:49 numpy -rw-r--r-- 1 root root 1630 May 23 22:23 numpy-1.7.0-py2.7.egg-info -rw-r--r-- 1 root root 2362 May 23 22:51 site.py -rw-r--r-- 1 root root 1937 May 23 22:51 site.pyo -rw-r--r-- 1 root root 263 Sep 15 04:16 smbus-1.1-py2.7.egg-info -rwxr-xr-x 1 root root 50299 Sep 15 02:58 smbus.so
But the problem seems much bigger, though:
root@clanton:~/i2c-tools# i2cdetect -y -f 0 /usr/local/sbin/i2cdetect: can't load library 'libi2c.so.0'
If I just copy the libi2c.so.0 library into /usr/lib then i2cdetect works fine, but not python smbus.
To build i2c-tools I used AlexT's image and installed several tools:
opkg install make gcc-dev gcc-symlinks cpp cpp-symlinks g++ g++-symlinks uclibc-dev uclibc-utils binutils-dev binutils-symlinks python-dev coreutils-dev
And the libraries' permissions seem to be correct, I even included '/usr/local/lib' into my PATH to try to make things work:
root@clanton:~/i2c-tools# ls -la /usr/local/lib/ total 16 drwxr-sr-x 2 root root 1024 Sep 15 03:37 . drwxr-sr-x 7 root root 1024 Sep 15 02:12 .. -rw-r--r-- 1 root root 4076 Sep 15 03:37 libi2c.a lrwxrwxrwx 1 root root 11 Sep 15 03:37 libi2c.so -> libi2c.so.0 lrwxrwxrwx 1 root root 15 Sep 15 03:37 libi2c.so.0 -> libi2c.so.0.1.0 -rwxr-xr-x 1 root root 9496 Sep 15 03:37 libi2c.so.0.1.0 root@clanton:~/i2c-tools# echo $PATH /usr/local/lib:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin root@clanton:/usr/local/lib# echo $LD_LIBRARY_PATH /usr/local/lib:/usr/lib/python2.7/site-packages
Any help would be greatly appreciated. Thanks in advance!