Python3/pip3 aarch64 help

@pilovis could use a little info / help...

Installed most of the stuff here: Pip install RPIO, RPi.GPIO ... error

You think this is a 64bit / python3 only issue? Some pip stuff works...

#NOTE0: wheel error but pip install wheel says it's installed...
#NOTE1: --ffile error below... also download skipped .egg unrecogised formats...

    gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.5'
somelogstuffthatmightmakesensetoyou
    creating build/temp.linux-aarch64-3.8
    creating build/temp.linux-aarch64-3.8/source
    creating build/temp.linux-aarch64-3.8/source/c_gpio
    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 -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.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 -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.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 -ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.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/target-aarch64_cortex-a72_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/usr/include -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/include/fortify -I/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a72_gcc-8.4.0_musl/include -fPIC -I/usr/include/python3.8 -c source/c_gpio/py_gpio.c -o build/temp.linux-aarch64-3.8/source/c_gpio/py_gpio.o
    gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.5'
    gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.5'
    gcc: error: unrecognized command line option '-ffile-prefix-map=/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.5'
    error: command 'gcc' failed with exit status 1
    Running setup.py install for RPIO ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e6l61tj6/rpio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e6l61tj6/rpio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-zusdt36l/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/RPIO Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 838, in install
    success = install_legacy(
  File "/usr/lib/python3.8/site-packages/pip/_internal/operations/install/legacy.py", line 86, in install
    raise LegacyInstallFailure
pip._internal.operations.install.legacy.LegacyInstallFailure

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 397, in run
    installed = install_given_reqs(

Is /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a72_musl/Python-3.8.5=Python-3.8.5 a valid hard-path? That is what it seems to be having issues with.

1 Like

thanks for the fast response grommish... ( and congrats on getting you pr pushed :men_wrestling: )

probably for the buildbot it is... on-device tho' no idea where it picks this value up from...

fgrep /usr/lib/pythonX/configX shows .a files ( i.e. compile time preferences ).... thats all...

so perhaps... pip rip's this value from the python3 binary headers??? and it's a buildbot issue?/quirk? then again, there is the pre-cluded statement re: unrecognised option... so it's a gcc... limitation / quirk? i'm aware on device gcc is limited... just trying to pin down what's going on/where :slight_smile:

( suspect ssl libs + pip may be an outside contender )

actually, probably good for me to test bcm270x/32...

Check gcc version (gcc --version). Probably it is 7.4. This version doesn't recognize option -ffile-prefix-map (https://gcc.gnu.org/onlinedocs/gcc-7.4.0/gcc/Option-Summary.html#Option-Summary), it is supported from version 8.4 (https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/Option-Summary.html#Option-Summary).
OpenWrt is shipped with python 3.8.5 which is requireing gcc in version 8.4 at least. So there is incopability between gcc and python versions provided by opkg.

2 Likes

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