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

doesn't build on armbian debian 11 bullseye #3

Open
holla2040 opened this issue Apr 27, 2022 · 2 comments
Open

doesn't build on armbian debian 11 bullseye #3

holla2040 opened this issue Apr 27, 2022 · 2 comments

Comments

@holla2040
Copy link

debian 11 bullseye
Python 3.9.2

sudo python3 setup.py install

linker throws about 50 multiple definition errors

/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/home/holla/OPI.GPIO/source/constants.h:30: multiple definition of `pud_off'; build/temp.linux-aarch64-3.9/source/constants.o:/home/holla/OPI.GPIO/source/constants.h:30: first defined here

@KingValmond
Copy link

To fix it

  1. mark all declared variables in .h files as 'external' (just add 'external ' (without quotes) before any variable declaration in the .h files when you had an error)

  2. declare all the PyObject pointers in the constants.c file (also declare them external in the .h)

  3. In soft_pwm.c declare the pthreads_t threads :
    static pthreads_t threads;

and that did it for me.

Cheers & HTH

@holla2040
Copy link
Author

Thanks!

NadavK added a commit to NadavK/OPI.GPIO that referenced this issue Oct 31, 2022
Implemented changes for Python 3.10 - per eutim#3
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

2 participants