[SOLVED]: GPIO pyA20-0.2.0 installation problem

Started by micgm, September 05, 2014, 10:14:59 PM

Previous topic - Next topic

micgm

I experience a problem when trying to install the new pyA20-0.2.0 package on my board.
I have already installed python-dev and it doesn't solve the problem.

Also pyA20-0.1.6 installed without any problem.

Is there something to do?

This is the output:

olimex@a20-OLinuXino:~/pyA20-0.2.0$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/pyA20
copying pyA20/__init__.py -> build/lib.linux-armv7l-2.7/pyA20
creating build/lib.linux-armv7l-2.7/pyA20/gpio
copying pyA20/gpio/__init__.py -> build/lib.linux-armv7l-2.7/pyA20/gpio
running build_ext
Detected processor:  sun7i (Probably Allwinner A20)
building 'pyA20.gpio.gpio' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/pyA20
creating build/temp.linux-armv7l-2.7/pyA20/gpio
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio_lib.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio_lib.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv7l-2.7/pyA20/gpio/gpio_lib.o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio.o -o build/lib.linux-armv7l-2.7/pyA20/gpio/gpio.so
building 'pyA20.i2c' extension
creating build/temp.linux-armv7l-2.7/pyA20/i2c
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pyA20/i2c/i2c_lib.c -o build/temp.linux-armv7l-2.7/pyA20/i2c/i2c_lib.o
In file included from pyA20/i2c/i2c_lib.c:34:0:
/usr/include/linux/i2c-dev.h:38:8: error: redefinition of βstruct i2c_msgβ
/usr/include/linux/i2c.h:67:8: note: originally defined here
/usr/include/linux/i2c-dev.h:90:7: error: redefinition of βunion i2c_smbus_dataβ
/usr/include/linux/i2c.h:125:7: note: originally defined here
error: command 'gcc' failed with exit status 1     

micgm

The following sequence solved my problem:

apt-get remove libi2c-dev

Then run:
python setup.py clean
python setup.py install