Menu

#187 Compilation error on gcc-10

Fixed
None
Critical
Defect
2021-01-10
2020-08-12
No

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

Discussion

  • Ben Croston

    Ben Croston - 2020-08-12
    • status: New --> Accepted
    • assigned_to: Ben Croston
     
  • Ben Croston

    Ben Croston - 2020-08-15

    Have reproduced the problem using Raspbian Buster and gcc-10.1.0.

     
  • seeeker

    seeeker - 2020-09-04

    Worked around it as suggested by setting fcommon as follows

    sudo CFLAGS="-fcommon" pip install rpi.gpio
    # or
    CFLAGS="-fcommon" pip install rpi.gpio
    

    RPi 2b running current ArchlinuxARM with gcc (GCC) 10.2.0

     
  • Emmanuel ANDRE

    Emmanuel ANDRE - 2020-10-25

    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... :-(

     
  • Gérard Vidal

    Gérard Vidal - 2020-11-11

    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

     
  • Ben Croston

    Ben Croston - 2021-01-10

    Fixed in 0.7.1a2. To install and test:
    $ pip3 install --upgrade --pre RPi.GPIO

     
  • Ben Croston

    Ben Croston - 2021-01-10
    • status: Accepted --> Fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.