"python3 setup.py develop" fails if including OrangePi.GPIO module

I'm trying to modify the GPIO Control plugin to be able to work on an Orange Pi. I changed the plugin_requires variable in setup.py to OrangePi.GPIO and changed the corresponding import command in __init__.py.

But when I run python3 setup.py develop it exits with this error:

~/devel/OctoPrint-GpioControl$ python3 setup.py develop
Found packages: {'octoprint_gpiocontrol'}
running develop
running egg_info
writing OctoPrint_GpioControl.egg-info/PKG-INFO
writing dependency_links to OctoPrint_GpioControl.egg-info/dependency_links.txt
writing entry points to OctoPrint_GpioControl.egg-info/entry_points.txt
writing requirements to OctoPrint_GpioControl.egg-info/requires.txt
writing top-level names to OctoPrint_GpioControl.egg-info/top_level.txt
reading manifest file 'OctoPrint_GpioControl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'octoprint_gpiocontrol/translations'
writing manifest file 'OctoPrint_GpioControl.egg-info/SOURCES.txt'
running build_ext
Creating /home/pi/oprint/lib/python3.9/site-packages/OctoPrint-GpioControl.egg-link (link to .)
OctoPrint-GpioControl 1.0.8 is already the active version in easy-install.pth

Installed /home/pi/devel/OctoPrint-GpioControl
Processing dependencies for OctoPrint-GpioControl==1.0.8
Searching for OrangePi.GPIO
Reading https://pypi.org/simple/OrangePi.GPIO/
Downloading https://files.pythonhosted.org/packages/04/b1/c9589b308e2ee52e6f6710b7f0dc1fc07061b70ebd2fe28ec2308b556138/OrangePi.GPIO-0.6.3.tar.gz#sha256=89cfaf1114ea926c2a8e9b822511709bedab780310a927ce6ee5140d2dbecf51
Best match: OrangePi.GPIO 0.6.3
Processing OrangePi.GPIO-0.6.3.tar.gz
Writing /tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/setup.cfg
Running OrangePi.GPIO-0.6.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/egg-dist-tmp-dioixcx4
source/c_gpio.c: In function ‘readl’:
source/c_gpio.c:39:63: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘volatile uint32_t *’ {aka ‘volatile unsigned int *’} [-Wformat=]
   39 | printf("mmap_base = 0x%x\t mmap_seek = 0x%x\t gpio_map = 0x%x\t total = 0x%x\n",mmap_base,mmap_seek,gpio_map,(gpio_map + mmap_seek));
      |                                                            ~^                                       ~~~~~~~~
      |                                                             |                                       |
      |                                                             unsigned int                            volatile uint32_t * {aka volatile unsigned int *}
      |                                                            %ls
source/c_gpio.c:39:78: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘volatile uint32_t *’ {aka ‘volatile unsigned int *’} [-Wformat=]
   39 | se = 0x%x\t mmap_seek = 0x%x\t gpio_map = 0x%x\t total = 0x%x\n",mmap_base,mmap_seek,gpio_map,(gpio_map + mmap_seek));
      |                                                            ~^                                 ~~~~~~~~~~~~~~~~~~~~~~
      |                                                             |                                           |
      |                                                             unsigned int                                volatile uint32_t * {aka volatile unsigned int *}
      |                                                            %ls
source/c_gpio.c: In function ‘setup’:
source/c_gpio.c:64:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   64 |  if ((uint32_t)gpio_mem % PAGE_SIZE)
      |      ^
source/c_gpio.c:65:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   65 |   gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
      |                            ^
source/c_gpio.c:70:25: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint8_t *’ {aka ‘unsigned char *’} [-Wformat=]
   70 |   printf("gpio_mem = 0x%x\t gpio_map = 0x%x\n",gpio_mem,gpio_map);
      |                        ~^                      ~~~~~~~~
      |                         |                      |
      |                         unsigned int           uint8_t * {aka unsigned char *}
      |                        %hhn
source/c_gpio.c:70:43: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘volatile uint32_t *’ {aka ‘volatile unsigned int *’} [-Wformat=]
   70 |   printf("gpio_mem = 0x%x\t gpio_map = 0x%x\n",gpio_mem,gpio_map);
      |                                          ~^             ~~~~~~~~
      |                                           |             |
      |                                           unsigned int  volatile uint32_t * {aka volatile unsigned int *}
      |                                          %ls
source/c_gpio.c:72:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   72 |  if ((uint32_t)gpio_map < 0)
      |      ^
source/event_gpio.c: In function ‘event_cleanup’:
source/event_gpio.c:444:15: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  444 |     if ((gpio == -666) || (gpio_list->gpio == gpio))
      |               ^~
source/py_gpio.c: In function ‘py_gpio_function_string’:
source/py_gpio.c:354:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  354 |   str = FUNCTIONS[fn];
      |       ^
source/py_gpio.c: In function ‘PyInit_GPIO’:
source/py_gpio.c:730:3: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
  730 |   if (!PyEval_ThreadsInitialized())
      |   ^~
In file included from /usr/include/python3.9/Python.h:145,
                 from source/py_gpio.c:23:
/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:731:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
  731 |     PyEval_InitThreads();
      |     ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.9/Python.h:145,
                 from source/py_gpio.c:23:
/usr/include/python3.9/ceval.h:130:37: note: declared here
  130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
      |                                     ^~~~~~~~~~~~~~~~~~
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: multiple definition of `board_type'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:29: multiple definition of `FUNCTIONS'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:29: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:27: multiple definition of `pin_to_gpio_prime'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:27: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:26: multiple definition of `pin_to_gpio_pc2'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:26: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:25: multiple definition of `pin_to_gpio_pc'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:25: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:24: multiple definition of `pin_to_gpio_zero2'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:24: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/common.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:23: multiple definition of `pin_to_gpio_zero'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:23: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: multiple definition of `board_type'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: multiple definition of `board_type'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: multiple definition of `board_type'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:25: multiple definition of `pin_to_gpio_pc'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:25: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:24: multiple definition of `pin_to_gpio_zero2'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:24: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:27: multiple definition of `pin_to_gpio_prime'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:27: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:23: multiple definition of `pin_to_gpio_zero'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:23: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:26: multiple definition of `pin_to_gpio_pc2'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:26: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:29: multiple definition of `FUNCTIONS'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/boards.h:29: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:47: multiple definition of `bprime'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:46: multiple definition of `bpc2'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:46: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:45: multiple definition of `bpc'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:44: multiple definition of `bzeroplus3'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:43: multiple definition of `bzeroh5'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:43: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:42: multiple definition of `bzeroh2'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:42: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:41: multiple definition of `bunknown'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:41: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:40: multiple definition of `version'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:40: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:39: multiple definition of `soc'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:39: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:38: multiple definition of `bcm'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:38: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:37: multiple definition of `board'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:37: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:36: multiple definition of `unknown'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:36: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:35: multiple definition of `both_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:35: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:34: multiple definition of `falling_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:34: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:33: multiple definition of `rising_edge'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:33: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:32: multiple definition of `pud_down'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:32: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:31: multiple definition of `pud_up'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:31: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:30: multiple definition of `pud_off'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:30: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:29: multiple definition of `output'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:29: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:28: multiple definition of `input'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:28: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:27: multiple definition of `low'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:27: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:26: multiple definition of `high'; build/temp.linux-aarch64-3.9/source/constants.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/constants.h:26: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-aarch64-3.9/source/py_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/py_pwm.h:23: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/py_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: multiple definition of `board_type'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/soft_pwm.c:29: multiple definition of `threads'; build/temp.linux-aarch64-3.9/source/event_gpio.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/event_gpio.c:58: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: multiple definition of `module_setup'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:49: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: multiple definition of `setup_error'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:48: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:47: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:45: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:44: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.9/source/soft_pwm.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: multiple definition of `board_type'; build/temp.linux-aarch64-3.9/source/boards.o:/tmp/easy_install-zv3e7_4g/OrangePi.GPIO-0.6.3/source/common.h:43: first defined here
collect2: error: ld returned 1 exit status
error: Setup script exited with error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1

It doesn't really give me much to go on for what caused the error. The same thing happens on the Orange Pi and on a virtual environment on Ubuntu 22.04. As a test, I changed the plugin_requires variable to a random module (scrape) and the setup finished without an error. Does anyone know how to fix this error?

octoprint-systeminfo-20221213170102.zip (23.7 KB)

Probably will have to look through the orangepi.gpio github repo. basically looks like a compile error to me.

Is there a way to compile the module and get details on the exact error?

It looks like the package was archived, so it may just be broken as it has not been updated to work on a modern system.

Perhaps you could try Python Periphery? I don't know exactly if it works but it might be worth a try.

I'll give it a shot, thanks!

periphery is a good suggestion. that's what PSU Control migrated to and should be universal.

Well, I got python-periphery to install. Unfortunately, I haven't been able to get it to work with GPIO. It says Exporting GPIO: Device or resource busy.

I also found out there's another module called OPi.GPIO as well as a plugin addon for PSU Control that uses that module. But trying to use the plugin or just the module directly in python gives me another error:

2022-12-13 17:57:43,131 - octoprint.plugins.psucontrol_opigpio - ERROR - Exception while writing GPIO line
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_psucontrol_opigpio/__init__.py", line 190, in turn_psu_on
    GPIO.output(self._gpio_get_pin(self.config['onoffGPIOPin']), o)
  File "/home/pi/oprint/lib/python3.9/site-packages/OPi.GPIO-0.5.2-py3.9.egg/OPi/GPIO.py", line 524, in output
    _check_configured(channel, direction=OUT)
  File "/home/pi/oprint/lib/python3.9/site-packages/OPi.GPIO-0.5.2-py3.9.egg/OPi/GPIO.py", line 374, in _check_configured
    raise RuntimeError("Channel {0} is not configured".format(channel))
RuntimeError: Channel 14 is not configured

I've tried tracing back through the source code to figure it out, but my Python knowledge isn't up to it yet.

I did get GPIO working in general through the terminal by installing wiringOP from the package manager. I see they have a python module version too, so I'll try that and see if it works.

Edit: I see wiringOP-Python isn't installable with pip though, so that would probably make it hard to distribute a plugin that uses it.