Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

lms-suite fails to build with libi2c-dev installed #18

Open
idealdelay opened this issue May 2, 2015 · 1 comment
Open

lms-suite fails to build with libi2c-dev installed #18

idealdelay opened this issue May 2, 2015 · 1 comment

Comments

@idealdelay
Copy link

Failed to build while compiling driver/host

Work around is to remove libi2c-dev and then compiling
$sudo apt-get remove libi2c-dev


[ 4%] Building CXX object CMakeFiles/NovenaRF.dir/home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp.o
In file included from /home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp:26:0:
/usr/include/linux/i2c-dev.h:37:8: error: redefinition of ‘struct i2c_msg’
struct i2c_msg {
^
In file included from /home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp:25:0:
/usr/include/linux/i2c.h:68:8: error: previous definition of ‘struct i2c_msg’
struct i2c_msg {
^
In file included from /home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp:26:0:
/usr/include/linux/i2c-dev.h:89:7: error: redefinition of ‘union i2c_smbus_data’
union i2c_smbus_data {
^
In file included from /home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp:25:0:
/usr/include/linux/i2c.h:128:7: error: previous definition of ‘union i2c_smbus_data’
union i2c_smbus_data {
^
CMakeFiles/NovenaRF.dir/build.make:399: recipe for target 'CMakeFiles/NovenaRF.dir/home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp.o' failed
make[2]: *** [CMakeFiles/NovenaRF.dir/home/ret/Novena-RF/lms-suite/lms-suite/src/src/ConnectionSPI.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/NovenaRF.dir/all' failed
make[1]: *** [CMakeFiles/NovenaRF.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@guruofquality
Copy link
Member

I think I saw this during development. It might just be a version mismatch between the kernel and the libi2c package. Anyway, the package removal seems to do the trick:

sudo apt-get remove libi2c-dev
Removing 'diversion of /usr/include/linux/i2c-dev.h to /usr/include/linux/i2c-dev.h.kernel by libi2c-dev'

I also added a note in the readme.

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

No branches or pull requests

2 participants