Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: vitalik2 on June 20, 2017, 09:03:45 AM

Title: python-smbus
Post by: vitalik2 on June 20, 2017, 09:03:45 AM
I would like to integrate a display via i2c and use with python. Unfortunately I can not find a python-smbus package. How can I create such a packet? (Or could someone create that?)
Title: Re: python-smbus
Post by: Juanito on June 20, 2017, 09:38:09 AM
Take a look at the extension making section of the wiki
Title: Re: python-smbus
Post by: vitalik2 on June 20, 2017, 03:25:22 PM
I try to compile python-smbus and get always this message:

Code: [Select]
root@box:/mnt/mmcblk0p2/i2c-tools/i2c-tools-3.1.2/py-smbus# python setup.py build
running build
running build_ext
building 'smbus' extension
gcc -pthread -fno-strict-aliasing -O3 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include /python2.7 -c smbusmodule.c -o build/temp.linux-armv6l-2.7/smbusmodule.o
gcc: error trying to exec 'as': execvp: No such file or directory
In file included from /tmp/tcloop/gcc/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.1.0/include-fixed/limits.h:194:0,
                 from /tmp/tcloop/gcc/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.1.0/include-fixed/syslimits.h:7,
                 from /tmp/tcloop/gcc/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.1.0/include-fixed/limits.h:34,
                 from /usr/local/include/python2.7/Python.h:19,
                 from smbusmodule.c:19:
/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.1.0/include-fixed/limits.h:194:15: fatal error: limits.h: No such file or directory
 #include_next <limits.h>  /* recurse down to the real one */
               ^~~~~~~~~~
compilation terminated.

Can it be that the gcc.tcz in armv6 repo contains the wrong version of gcc?
because of: /usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.1.0/include-fixed/limits.h:194:15

I do not know what to do with the error
Title: Re: python-smbus
Post by: Rich on June 20, 2017, 05:11:58 PM
Hi vitalik2
Did you install  compiletc.tcz?  I think you might also need  i2c-tools-dev.tcz.