Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with I2C extension during installation #11

Open
mtanwr opened this issue Jun 7, 2017 · 0 comments
Open

Conflict with I2C extension during installation #11

mtanwr opened this issue Jun 7, 2017 · 0 comments

Comments

@mtanwr
Copy link

mtanwr commented Jun 7, 2017

Hi, I am trying to install in Orange Pi Zero. I know there are other forks that updates the pin mapping, but I am ignoring that for now.

Installation aborts and shows the following:

root@orangepizero:~/orangepi_PC_gpio_pyH3# 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: sun8i (Probably Allwinner H3)
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
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio_lib.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio_lib.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c pyA20/gpio/gpio.c -o build/temp.linux-armv7l-2.7/pyA20/gpio/gpio.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security 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
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -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:37:8: error: redefinition of 'struct i2c_msg'
struct i2c_msg {
^
In file included from pyA20/i2c/i2c_lib.c:33:0:
/usr/include/linux/i2c.h:68:8: note: originally defined here
struct i2c_msg {
^
In file included from pyA20/i2c/i2c_lib.c:34:0:
/usr/include/linux/i2c-dev.h:89:7: error: redefinition of 'union i2c_smbus_data'
union i2c_smbus_data {
^
In file included from pyA20/i2c/i2c_lib.c:33:0:
/usr/include/linux/i2c.h:128:7: note: originally defined here
union i2c_smbus_data {
^
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

I have python-smbus and i2c-dev tools installed. Could it be a conflict with those?

I went ahead with the installation by commenting out the I2C Extension section in setup.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant