Closed simeonfelis closed 10 years ago
The same happens with
pip2 install git+https://github.com/bivab/smbus-cffi.git
This happened with libffi version 3.0.13. I downgraded libffi version to 3.0.10 (the same as debian wheezy) and the same happend again.
Hi, thanks for the report. It seems you are missing some definitions in the i2c-dev header file that is included in the cffi module, causing it to fail installing the extension.
According to https://metacpan.org/pod/Device::SMBus you need to install the packages bellow to get required dependencies: pacman -S base-devel pacman -S i2c-tools
can you check this and report back?
Thanks
I ran into just the same error on Archlinux on Raspberry Pi getting lots of the same compile-errors from gcc.
base-devel and i2c-tools installed... Using python2-pycparser 2.10-4
Hoping you can fix this. My C-knowledge is absolute minimal, and was just getting my toes wet on this i2c bus stuff.
Kind regards,
Martin
Hi @Radiognome1971, @simeonfelis smbus-cffi uses a header file from the i2c-tools project. Upon further investigation, it turns out that according to https://github.com/archlinuxarm/PKGBUILDs/issues/355 i2c-dev.h is not provided by the i2c-tools package on Arch Linux ARM and there seems to be no other package that provides this file.
While I'm evaluating a solution, here is a workaround that allows to install smbus-cffi Arch Linux ARM
C_INCLUDE_PATH=<ABSOLUTE path to the linux folder containing i2c-dev.h> pip install git+https://github.com/bivab/smbus-cffi.git
C_INCLUDE_PATH=/tmp/include/ pip install git+https://github.com/bivab/smbus-cffi.git
Thanks a lot for a workaround. Helps me a lot, also to understand things (my reason to by a Pi and put Arch on it). Will try this next weekend.
Kind regards,
Martin
Martin Koch Duistereweg 8 3911 AK Rhenen
e-mail: mail@martinkoch.org
Op 31 mrt. 2014, om 21:25 heeft David Schneider notifications@github.com het volgende geschreven:
Hi @Radiognome1971, @simeonfelis smbus-cffi uses a header file from the i2c-tools project. Upon further investigation, it turns out that according to archlinuxarm/PKGBUILDs#355 i2c-dev.h is not provided by the i2c-tools package on Arch Linux ARM and there seems to be no other package that provides this file.
While I'm evaluating a solution, here is a workaround that allows to install smbus-cffi Arch Linux ARM
Workaround
Get i2c-dev.h and store it in a folder named linux/ (source: http://lm-sensors.org/svn/i2c-tools/tags/V3-1-1/include/linux/i2c-dev.h) Install smbus-cffi calling C_INCLUDE_PATH=
pip install git+https://github.com/bivab/smbus-cffi.git Assuming i2c-dev.h is in /tmp/include/linux C_INCLUDE_PATH=/tmp/include/ pip install git+https://github.com/bivab/smbus-cffi.git — Reply to this email directly or view it on GitHub.
I'm in the same situation as Radiognome1971. I downloaded the header and included the directory the file was in and it still did not compile.
Same outcome as macsj200 ... the workaround failed for me, too. I have base-devel and i2c-tools installed and followed the workaround instructions exactly. Any other options to get smbus running under Arch Linux?
Testing on arch linux, the issue should be fixed with rev: e25395729510453c830d05fb423542864cc0f59d Please reopen if there are still problems
I had the issue in run time. The pip install smbus-cffi
was OK, but I had the issue when trying to import smbus
.
I could solve the issue by installing libi2c-dev on Ubuntu 14.04 (Beagle Bone).
sudo apt install libi2c-dev
I do::