vsergeev / lua-periphery

A Lua library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
MIT License
186 stars 39 forks source link

Compile error on Raspbian #17

Closed develephant closed 6 years ago

develephant commented 6 years ago

Hi,

I'm getting the following error when compiling on a Raspberry PI 2 with Raspbian.

In file included from src/i2c.c:21:0: /usr/include/linux/i2c-dev.h:37:8: error: redefinition of ‘struct i2c_msg’ struct i2c_msg { ^~~ In file included from src/i2c.c:20:0: /usr/include/linux/i2c.h:68:8: note: originally defined here struct i2c_msg { ^~~ In file included from src/i2c.c:21:0: /usr/include/linux/i2c-dev.h:89:7: error: redefinition of ‘union i2c_smbus_data’ union i2c_smbus_data { ^~~~~~ In file included from src/i2c.c:20:0: /usr/include/linux/i2c.h:131:7: note: originally defined here union i2c_smbus_data {

It happens with both Luarocks, and via source compilation. Any ideas?

Thanks in advance.

-dev

develephant commented 6 years ago

Seems like it worked once I removed the ic2-dev lib.

-dev