callattendant icon indicating copy to clipboard operation
callattendant copied to clipboard

virtual build failing

Open mikejrh opened this issue 3 years ago • 2 comments

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'"'"'))' bdist_wheel -d /tmp/pip-wheel-489lebh_ cwd: /tmp/pip-install-svnjf43h/rpi-gpio_50fc5284668e4483af35739ed49ea1a5/

mikejrh avatar Dec 18 '21 17:12 mikejrh

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

Peter-Gitman avatar Jan 18 '22 17:01 Peter-Gitman

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

tagatac avatar Jan 25 '22 18:01 tagatac