emxsys / callattendant

A python-based automated call attendant, call blocker, and voice messaging system running on a Raspberry Pi. Screens callers and block robocalls and scams with a low-cost Raspberry Pi and modem.
https://emxsys.github.io/callattendant/
MIT License
115 stars 37 forks source link

virtual build failing #159

Open mikejrh opened 2 years ago

mikejrh commented 2 years ago

I get the following error message when trying to install callattendant in the virtual environment

Building wheels for collected packages: RPi.GPIO Building wheel for RPi.GPIO (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/pi/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-svnjf43h/rpi-gpio_50fc5284668e4483af35739ed49ea1a5/setup.py'"'"'; file='"'"'/tmp/pip-install-svnjf43h/rpi-gpio_50fc5284668e4483af35739ed49ea1a5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdistwheel -d /tmp/pip-wheel-489lebh cwd: /tmp/pip-install-svnjf43h/rpi-gpio_50fc5284668e4483af35739ed49ea1a5/

Peter-Gitman commented 2 years ago

I also got the same error message. Not sure where to turn from here.

tagatac commented 2 years ago

It seems like RPi.GPIO does not follow modern linking conventions, so gcc complains. I was able to install by telling gcc that this is legacy code like this:

CFLAGS=-fcommon pip install RPi.GPIO

References:

  1. https://askubuntu.com/a/1330210/267107
  2. https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html