You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run into the following issue when trying to compile in linux.
One workaround is to remove libi2c-dev, but it seems the issue is the way it includes i2c-dev.h and i2c.h.
switchtec-user# make
CC lib/platform/linux-i2c.c
In file included from lib/platform/linux-i2c.c:46:0:
/usr/include/linux/i2c-dev.h:37:8: error: redefinition of 'struct i2c_msg'
struct i2c_msg {
^
In file included from lib/platform/linux-i2c.c:45:0:
/usr/include/linux/i2c.h:68:8: note: originally defined here
struct i2c_msg {
^
In file included from lib/platform/linux-i2c.c:46:0:
/usr/include/linux/i2c-dev.h:90:7: error: redefinition of 'union i2c_smbus_data'
union i2c_smbus_data {
^
In file included from lib/platform/linux-i2c.c:45:0:
/usr/include/linux/i2c.h:129:7: note: originally defined here
union i2c_smbus_data {
^
lib/platform/linux-i2c.c: In function 'i2c_msg_pec':
lib/platform/linux-i2c.c:87:14: warning: pointer targets in passing argument 1 of 'crc8' differ in signedness [-Wpointer-sign]
return crc8(msg->buf, byte_count, pec, false);
^
In file included from lib/platform/linux-i2c.c:28:0:
lib/platform/../crc.h:34:9: note: expected 'uint8_t * {aka unsigned char *}' but argument is of type 'char *'
uint8_t crc8(uint8_t *msg_ptr, uint32_t byte_cnt, uint32_t oldchksum,
^
lib/platform/linux-i2c.c: In function 'i2c_gas_cap_get':
lib/platform/linux-i2c.c:224:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msgs[0].buf = &command_code;
^
lib/platform/linux-i2c.c:228:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msgs[1].buf = rx_buf;
^
lib/platform/linux-i2c.c: In function 'i2c_gas_data_write':
lib/platform/linux-i2c.c:303:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msg.buf = (uint8_t *)i2c_data;
^
lib/platform/linux-i2c.c: In function 'i2c_gas_write_status_get':
lib/platform/linux-i2c.c:340:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msgs[0].buf = &command_code;
^
lib/platform/linux-i2c.c:344:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msgs[1].buf = rx_buf;
^
lib/platform/linux-i2c.c: In function 'i2c_gas_data_read':
lib/platform/linux-i2c.c:470:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msgs[0].buf = (uint8_t *)read_command;
^
lib/platform/linux-i2c.c:475:14: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
msgs[1].buf = (uint8_t *)read_response;
^
lib/platform/linux-i2c.c: At top level:
cc1: warning: unrecognized command line option '-Wno-initializer-overrides'
Makefile:114: recipe for target 'build/lib/platform/linux-i2c.o' failed
make: *** [build/lib/platform/linux-i2c.o] Error 1
The text was updated successfully, but these errors were encountered:
We run into the following issue when trying to compile in linux.
One workaround is to remove libi2c-dev, but it seems the issue is the way it includes i2c-dev.h and i2c.h.
The text was updated successfully, but these errors were encountered: