I wanted to control my Raspberry Pi 4 GPIO using a Python library given by the raspberry-gpio-python project over at sourceforge.
After looking around I found an AUR package python-raspberry-gpio which had that exact upstream.
After running yay -S python-raspberry-gpio I noticed it used pacman to perform the download and install instead of yay, as the package was in the official repos.
The problem is when trying to import the python package named RPi.GPIO I get:
$ python
Python 3.8.5 (default, Sep 5 2020, 17:18:53)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'RPi'
The reason why this happens is quite simple, when installing the package python-raspberry-gpio from the official repos I noticed that the package is installed over at /lib/python3.7/site-packages instead of being installed in /lib/python3.8/site-packages where it’s actually reachable by packages using Python on my system.
As a workaround I tried copying the files from /lib/python3.7/site-packages to /lib/python3.8/site-packages but it didn’t work.
As a second workaround I tried downloading the AUR package by running yay --aur python-raspberry-gpio to ignore the offical repos, but I’m running into the following compiling issue:
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
==> ERROR: A failure occurred in package().
Aborting...
error making: python-raspberry-gpio
Obviously I would prefer to use the official repos rather than using the AUR, so if this package could be updated from Python 3.7 to Python 3.8, which I suspect is easy as there’s barely any difference between the two, that would be great.
Because I’m a new user I can’t paste links, which kind of sucks, so here’s a full log of the error because I can’t use pastebin:
$ yay --aur python-raspberry-gpio
1 aur/python-raspberry-gpio 0.7.0-1 (+13 0.00)
Python library for GPIO access on a Raspberry Pi
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 1
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] python-raspberry-gpio-0.7.0-1
:: Downloaded PKGBUILD (1/1): python-raspberry-gpio
1 python-raspberry-gpio (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> N
:: (1/1) Parsing SRCINFO: python-raspberry-gpio
==> Making package: python-raspberry-gpio 0.7.0-1 (Fri 11 Sep 2020 11:58:33 AM WEST)
==> Retrieving sources...
-> Downloading RPi.GPIO-0.7.0.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 30845 100 30845 0 0 117k 0 --:--:-- --:--:-- --:--:-- 117k
==> Validating source files with sha1sums...
RPi.GPIO-0.7.0.tar.gz ... Passed
==> Making package: python-raspberry-gpio 0.7.0-1 (Fri 11 Sep 2020 11:58:38 AM WEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found RPi.GPIO-0.7.0.tar.gz
==> Validating source files with sha1sums...
RPi.GPIO-0.7.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting RPi.GPIO-0.7.0.tar.gz with bsdtar
==> Sources are ready.
==> Making package: python-raspberry-gpio 0.7.0-1 (Fri 11 Sep 2020 11:58:48 AM WEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Entering fakeroot environment...
==> Starting package()...
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/RPi
copying RPi/__init__.py -> build/lib.linux-aarch64-3.8/RPi
creating build/lib.linux-aarch64-3.8/RPi/GPIO
copying RPi/GPIO/__init__.py -> build/lib.linux-aarch64-3.8/RPi/GPIO
running build_ext
building 'RPi._GPIO' extension
creating build/temp.linux-aarch64-3.8
creating build/temp.linux-aarch64-3.8/source
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/py_gpio.c -o build/temp.linux-aarch64-3.8/source/py_gpio.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/c_gpio.c -o build/temp.linux-aarch64-3.8/source/c_gpio.o
source/c_gpio.c: In function ‘setup’:
source/c_gpio.c:130:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
130 | if ((uint32_t)gpio_mem % PAGE_SIZE)
| ^
source/c_gpio.c:131:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
131 | gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
| ^
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/cpuinfo.c -o build/temp.linux-aarch64-3.8/source/cpuinfo.o
source/cpuinfo.c: In function ‘get_rpi_info’:
source/cpuinfo.c:139:28: warning: format ‘%llx’ expects argument of type ‘long long unsigned int *’, but argument 3 has type ‘uint64_t *’ {aka ‘long unsigned int *’} [-Wformat=]
139 | sscanf(revision, "%llx", &rev);
| ~~~^ ~~~~
| | |
| | uint64_t * {aka long unsigned int *}
| long long unsigned int *
| %lx
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/event_gpio.c -o build/temp.linux-aarch64-3.8/source/event_gpio.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/soft_pwm.c -o build/temp.linux-aarch64-3.8/source/soft_pwm.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/py_pwm.c -o build/temp.linux-aarch64-3.8/source/py_pwm.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/common.c -o build/temp.linux-aarch64-3.8/source/common.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=armv8-a -O3 -pipe -fno-plt -fno-semantic-interposition -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O3 -pipe -fno-plt -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c source/constants.c -o build/temp.linux-aarch64-3.8/source/constants.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.8/source/py_gpio.o build/temp.linux-aarch64-3.8/source/c_gpio.o build/temp.linux-aarch64-3.8/source/cpuinfo.o build/temp.linux-aarch64-3.8/source/event_gpio.o build/temp.linux-aarch64-3.8/source/soft_pwm.o build/temp.linux-aarch64-3.8/source/py_pwm.o build/temp.linux-aarch64-3.8/source/common.o build/temp.linux-aarch64-3.8/source/constants.o -L/usr/lib -o build/lib.linux-aarch64-3.8/RPi/_GPIO.cpython-38-aarch64-linux-gnu.so
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/soft_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-aarch64-3.8/source/event_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/event_gpio.c:60: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:38: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/py_pwm.h:23: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:41: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:40: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:39: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:37: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:36: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:35: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:34: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/py_pwm.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:33: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:40: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:41: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:33: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:37: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:39: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:38: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:36: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:35: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/common.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:34: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:26: multiple definition of `high'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:26: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:27: multiple definition of `low'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:27: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:29: multiple definition of `output'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:29: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:28: multiple definition of `input'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:28: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:30: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:31: multiple definition of `serial'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:31: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:32: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:33: multiple definition of `spi'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:33: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:34: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:35: multiple definition of `board'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:35: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:36: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:37: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:38: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:39: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:40: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:41: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/constants.h:42: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:41: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:40: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:39: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/pytho
n-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:38: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:37: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:36: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:35: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:34: first defined here
/usr/bin/ld: build/temp.linux-aarch64-3.8/source/constants.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-aarch64-3.8/source/py_gpio.o:/home/undercover/.cache/yay/python-raspberry-gpio/src/RPi.GPIO-0.7.0/source/common.h:33: first defined here
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
==> ERROR: A failure occurred in package().
Aborting...
error making: python-raspberry-gpio
Thanks for the help, I’ll close this and accept it as a solution, however I would like to package from the official repos to be updated to avoid this confusion, it’s better to use it rather than the AUR.
So in the future if I were to install python-raspberry-gpio from the official repos, it would be the same as having python-raspberry-gpio from the AUR?
Because the python-raspberry-gpio from the official repos still installs the package under /lib/python3.7, is that something that will be fixed?
Yes. The one in the repo was built using the older version of python. Every once in a while we add packages from AUR if the one in AUR is out of date like this one.
I have built and pushed the upgraded python-raspberry-gpio-0.7.0-2 package to all branches. It may take a few hours for the mirrors to sync for it to be there. Do a -Syu every so often and check for it. When it shows up install and test it. It will have a -2 at the end of the package name instead of -1.