0

trying to get my 0.91 oled v1.0 geekpi expansion board hat to run in general/autorun when powered on, the OLED and the Leds, however im having tis pp up everytime i get to the OLED , any help is greatly appreciated.

below the error code i will upload the code provided as well. im sure im breking some posting rule, but still i need the help.

what was entered:

sudo apt-get update
sudo apt-get install build-essential python3-dev python3-pip -y
sudo pip3 install Adafruit_BBIO

outcome:


note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for Adafruit_BBIO
  Running setup.py clean for Adafruit_BBIO
Failed to build Adafruit_BBIO
Installing collected packages: Adafruit_BBIO
  Running setup.py install for Adafruit_BBIO ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for Adafruit_BBIO did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      running install
      /usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-armv7l-cpython-39
      copying Adafruit_I2C.py -> build/lib.linux-armv7l-cpython-39
      creating build/lib.linux-armv7l-cpython-39/Adafruit_BBIO
      copying Adafruit_BBIO/sysfs.py -> build/lib.linux-armv7l-cpython-39/Adafruit_BBIO
      copying Adafruit_BBIO/__init__.py -> build/lib.linux-armv7l-cpython-39/Adafruit_BBIO
      copying Adafruit_BBIO/Encoder.py -> build/lib.linux-armv7l-cpython-39/Adafruit_BBIO
      creating build/lib.linux-armv7l-cpython-39/overlays
      copying overlays/builder.py -> build/lib.linux-armv7l-cpython-39/overlays
      copying overlays/__init__.py -> build/lib.linux-armv7l-cpython-39/overlays
      running build_ext
      building 'Adafruit_BBIO.GPIO' extension
      creating build/temp.linux-armv7l-cpython-39
      creating build/temp.linux-armv7l-cpython-39/source
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/c_pinmux.c -o build/temp.linux-armv7l-cpython-39/source/c_pinmux.o -Wall
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv7l-cpython-39/source/common.o -Wall
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv7l-cpython-39/source/constants.o -Wall
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv7l-cpython-39/source/event_gpio.o -Wall
      arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DBBBVERSION41 -Isource/include/ -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv7l-cpython-39/source/py_gpio.o -Wall
      source/py_gpio.c: In function ‘PyInit_GPIO’:
      source/py_gpio.c:602:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
        602 |    if (!PyEval_ThreadsInitialized())
            |    ^~
      In file included from /usr/include/python3.9/Python.h:145,
                       from source/py_gpio.c:31:
      /usr/include/python3.9/ceval.h:129:36: note: declared here
        129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
            |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
      source/py_gpio.c:603:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
        603 |       PyEval_InitThreads();
            |       ^~~~~~~~~~~~~~~~~~
      In file included from /usr/include/python3.9/Python.h:145,
                       from source/py_gpio.c:31:
      /usr/include/python3.9/ceval.h:130:37: note: declared here
        130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
            |                                     ^~~~~~~~~~~~~~~~~~
      arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 build/temp.linux-armv7l-cpython-39/source/c_pinmux.o build/temp.linux-armv7l-cpython-39/source/common.o build/temp.linux-armv7l-cpython-39/source/constants.o build/temp.linux-armv7l-cpython-39/source/event_gpio.o build/temp.linux-armv7l-cpython-39/source/py_gpio.o -L/usr/lib -o build/lib.linux-armv7l-cpython-39/Adafruit_BBIO/GPIO.cpython-39-arm-linux-gnueabihf.so
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:15: multiple definition of `version'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:15: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:14: multiple definition of `both_edge'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:14: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:13: multiple definition of `falling_edge'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:13: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:12: multiple definition of `rising_edge'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:12: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:11: multiple definition of `pud_down'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:11: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:10: multiple definition of `pud_up'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:10: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:9: multiple definition of `pud_off'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:9: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:8: multiple definition of `alt0'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:8: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:7: multiple definition of `output'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:7: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:6: multiple definition of `input'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:6: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:5: multiple definition of `low'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:5: first defined here
      /usr/bin/ld: build/temp.linux-armv7l-cpython-39/source/py_gpio.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:4: multiple definition of `high'; build/temp.linux-armv7l-cpython-39/source/constants.o:/tmp/pip-install-uqo_ejwb/adafruit-bbio_1f73563c496c463e8beddc0488b7594c/source/constants.h:4: first defined here
      collect2: error: ld returned 1 exit status
      error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> Adafruit_BBIO

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
2
  • 1
    2 These warnings are common with python3.9 - indicating that the code has not been updated or tested. Contact the maintainer. Alternately use the Legacy OS.
    – Milliways
    Commented Apr 22, 2022 at 22:14
  • I have the same issue. I checked the source code. Some variables are defined in constants.h. Every time constants.h file is included into c source file, memory area is assigned for those variables with names and linker finds that there are a lot of variables with the same name. And THIS IS NOT ALLOWED in C, which is the error you see.
    – KyleShim
    Commented Sep 10, 2023 at 10:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.