esl / erlang_ale

Erlang Actor Library for Embedded -- An embedded framework from Erlang Solutions
Apache License 2.0
207 stars 65 forks source link

Compile fails i2c_msg & i2c_smbus_data redefined in pi_i2c.c #15

Open DougieLawson opened 9 years ago

DougieLawson commented 9 years ago

I'm trying to install this on a Raspbian Jessie system, RPi B. gcc version 4.9.1 (Raspbian 4.9.1-19)

gcc -I/usr/local/include -I/usr/lib/erlang/lib/erl_interface-3.7.9/include -I/usr/lib/erlang/usr/include/ -Ideps/erlang_portutil -Ideps/pihwm/lib -c -o priv/pi_i2c.o deps/pihwm/lib/pi_i2c.c
In file included from deps/pihwm/lib/pi_i2c.c:29:0:
/usr/include/linux/i2c-dev.h:37:8: error: redefinition of ‘struct i2c_msg’
 struct i2c_msg {
        ^
In file included from deps/pihwm/lib/pi_i2c.c:28:0:
/usr/include/linux/i2c.h:68:8: note: originally defined here
 struct i2c_msg {
        ^
In file included from deps/pihwm/lib/pi_i2c.c:29:0:
/usr/include/linux/i2c-dev.h:89:7: error: redefinition of ‘union i2c_smbus_data’
 union i2c_smbus_data {
       ^
In file included from deps/pihwm/lib/pi_i2c.c:28:0:
/usr/include/linux/i2c.h:128:7: note: originally defined here
 union i2c_smbus_data {
       ^
Makefile:40: recipe for target 'pihwm' failed
make: *** [pihwm] Error 1
DougieLawson commented 9 years ago

It works OK on Raspbian wheezy with gcc version 4.6.3 (Debian 4.6.3-14+rpi1)