Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWS Graviton2] graviton gcc flags break pip install #2090

Open
liquidcarbon opened this issue Mar 29, 2022 · 5 comments
Open

[AWS Graviton2] graviton gcc flags break pip install #2090

liquidcarbon opened this issue Mar 29, 2022 · 5 comments

Comments

@liquidcarbon
Copy link

liquidcarbon commented Mar 29, 2022

Summary

  • OS: Amazon Linux
  • Architecture: ARM
  • Psutil version: 5.9.0
  • Python version: 3.9
  • Type: installation

Description

I'm having trouble installing psutil and packages that depend on it. It seems like it was meaning to run gcc -march=armv8.2-a+fp16+rcpc+dotprod+crypto _some_target_, but instead an extra space sneaked in and the whole .2-a+fp16+rcpc... part fell off. Anyone knows how to get around this?

  Command ['/home/ec2-user/.cache/pypoetry/virtualenvs/env-FCAoHQDC-py3.9/bin/pip', 'install', '--no-deps', 'file:///home/ec2-user/.cache/pypoetry/artifacts/b1/56/ea/8f76ac8e3267dcd0b251a107803fa457585315936bb70ef39c1775c7d1/psutil-5.9.0.tar.gz'] errored with the following return code 1, and output:
  Processing /home/ec2-user/.cache/pypoetry/artifacts/b1/56/ea/8f76ac8e3267dcd0b251a107803fa457585315936bb70ef39c1775c7d1/psutil-5.9.0.tar.gz
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'done'
  Building wheels for collected packages: psutil
    Building wheel for psutil (setup.py): started
    Building wheel for psutil (setup.py): finished with status 'error'
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [10 lines of output]
        running bdist_wheel
        running build
        running build_py
        running build_ext
        building 'psutil._psutil_linux' extension
        gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
        gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
        gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
        gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
        error: command '/usr/bin/gcc' failed with exit code 1
        [end of output]

also filed here aws/aws-graviton-getting-started#208

@github-actions github-actions bot added the linux label Mar 29, 2022
@liquidcarbon liquidcarbon changed the title [AWS Graviton2] https://github.com/aws/aws-graviton-getting-started/issues/208 [AWS Graviton2] graviton gcc flags break pip install Mar 29, 2022
@liquidcarbon
Copy link
Author

More detailed error

 building 'psutil._psutil_linux' extension
  creating build/temp.linux-aarch64-3.9
  creating build/temp.linux-aarch64-3.9/psutil
  gcc -pthread -B /a/mc39/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /a/mc39/include -I/a/mc39/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /a/mc39/include -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_LINUX=1 -I/a/mc39/include/python3.9 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-3.9/psutil/_psutil_common.o
  gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
  gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
  gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
  gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil

@eleflea
Copy link

eleflea commented Apr 2, 2022

same error here. 😭

@ddelange
Copy link

ddelange commented Apr 5, 2022

Should be fixed after #1972

georgemarshall pushed a commit to georgemarshall/psutil that referenced this issue Apr 6, 2022
Change the build.yml to add aarch64/arm64 builds

Closes giampaolo#1782, closes giampaolo#1945, closes giampaolo#1954, closes giampaolo#1966, closes giampaolo#1972,
closes giampaolo#2090

Signed-off-by: George Marshall <george@getsling.com>
@ddelange
Copy link

ddelange commented May 24, 2022

Anyone knows how to get around this?

For now you can get the wheels from my fork (based on #2103)

@ben9923
Copy link
Contributor

ben9923 commented Aug 12, 2023

Are you using miniconda (does mc39 stand for miniconda39)? Seems like a bug with old 3.9 releases, try the latest one.
See #2293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants