Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation / linker error on Arch Linux (running on Pi) #3

Open
nb-programmer opened this issue Jan 3, 2021 · 0 comments
Open

Compilation / linker error on Arch Linux (running on Pi) #3

nb-programmer opened this issue Jan 3, 2021 · 0 comments

Comments

@nb-programmer
Copy link

Due to a change in gcc, a flag needs to be added while compiling the code (see https://www.raspberrypi.org/forums/viewtopic.php?t=244375):
CFLAGS=-fcommon

otherwise, the install fails with a linking error:

/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-req-build-q65ingrr/source/common.h:41: multiple definition of module_setup'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-req-build-q65ingrr/source/common.h:41: first defined here /usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/pip-req-build-q65ingrr/source/common.h:40: multiple definition of setup_error'; build/temp.linux-aarch64-3.9/source/common.o:/tmp/pip-req-build-q65ingrr/source/common.h:40: first defined here
[snip]

So to install the package, the command would be:
CFLAGS=-fcommon pip install git+https://github.com/TheNextLVL/RPi.GPIO.64.git

Or even better, add extra command line args to the Extension in setup.py:
ext_modules = [Extension('RPi._GPIO', ..., extra_compile_args = ['-fcommon'])]

ConnorDY added a commit to ConnorDY/RPi.GPIO.64 that referenced this issue Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant