GCC error in OpenWrt while building RPi.GPIO

Hi,

I'm trying to build RPi.GPIO for the BPI-R2 board using BPI's version of RPi.GPIO from https://github.com/BPI-SINOVOIP/RPi.GPIO

I'm using OpenWrt as the build system with the following packages installed on OpenWrt v. 21:

  • OpenWrt GCC 7.4.0
  • Python 3.9.5
  • python3-setuptools

I'm getting the following error while running the command: python3 setup.py install

root@OpenWrt:/usr/pycode/RPi.GPIO# ls
CHANGELOG.txt                    RPi
INSTALL.txt                      build
LICENCE.txt                      create_gpio_user_permissions.py
PKG-INFO                         setup.py
README.md                        source
README.txt                       test

root@OpenWrt:/usr/pycode/RPi.GPIO# python3 setup.py install
running install
running build
running build_py
running build_ext
building 'RPi._GPIO' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.5=Python-3.9.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.5=Python-3.9.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.5=Python-3.9.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-8.4.0_musl_eabi/include -fPIC -I/usr/include/python3.9 -c source/c_gpio.c -o build/temp.linux-armv7l-3.9/source/c_gpio.o
gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.5=Python-3.9.5'
gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.5=Python-3.9.5'
gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.5=Python-3.9.5'
error: command '/usr/bin/gcc' failed with exit code 1
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.