Compilation error on gcc-10
A Python module to control the GPIO on a Raspberry Pi
Brought to you by:
croston
When trying to compile/install this module on a modern system with gcc version 10, it fails with lots of messages about "multiple definition of" several symbols.
See: https://www.raspberrypi.org/forums/viewtopic.php?p=1665230#p1665230
Have reproduced the problem using Raspbian Buster and gcc-10.1.0.
Worked around it as suggested by setting fcommon as follows
RPi 2b running current ArchlinuxARM with gcc (GCC) 10.2.0
I have the same problem with manjaro 2020.10 (64bits & gcc 10.2.0)
The workaround shown by @seeeker works but it forces us to get into that code when we just want to install a program that requires RPi.GPIO... :-(
Thanks @sweeker your workaround works, the origin of the problem being on the evolution of gcc rules (more strict) we need to have some changes in the code to make it stable.
The problem seems to occur between common.h and other programs as fas I have seen . Maybe just declare some variables/functions as extern (it worked for me on eclipse/mra
Fixed in 0.7.1a2. To install and test:
$ pip3 install --upgrade --pre RPi.GPIO