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

Can't pip install on MacOS M1 chip #54

Open
mhoangvslev opened this issue Feb 4, 2022 · 5 comments
Open

Can't pip install on MacOS M1 chip #54

mhoangvslev opened this issue Feb 4, 2022 · 5 comments

Comments

@mhoangvslev
Copy link

The log reports a missing file as follows:

./src/postgres/include/port/atomics.h:63:10: fatal error: 'port/atomics/arch-arm.h' file not found
  #include "port/atomics/arch-arm.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  make: *** [src/pg_query_json_plpgsql.o] Error 1
  
  An error occurred during extension building.
  Make sure you have bison and flex installed on your system.
  ----------------------------------------
  ERROR: Failed building wheel for psqlparse
@zied-loreal
Copy link

zied-loreal commented Mar 9, 2022

I got the same error on M1 chip

@alculquicondor
Copy link
Owner

I'm not maintaining this package anymore. If you find a solution, I'm happy to review a PR.

@steve-graft
Copy link

I got the same error on M1 chip

I'm seeing the same error, I'm wondering if you have found a solution. Appreciate it!

@steve-graft
Copy link

The log reports a missing file as follows:

./src/postgres/include/port/atomics.h:63:10: fatal error: 'port/atomics/arch-arm.h' file not found
  #include "port/atomics/arch-arm.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  make: *** [src/pg_query_json_plpgsql.o] Error 1
  
  An error occurred during extension building.
  Make sure you have bison and flex installed on your system.
  ----------------------------------------
  ERROR: Failed building wheel for psqlparse

I'm seeing the same error, I'm wondering if you have found a solution. Appreciate it!

@AhlamHani
Copy link

AhlamHani commented Aug 13, 2024

Collecting psqlparse
  Using cached psqlparse-0.2.5.tar.gz (23 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: six in /Users/xxx/workspace/venv/lib/python3.12/site-packages (from psqlparse) (1.16.0)
Building wheels for collected packages: psqlparse
  Building wheel for psqlparse (pyproject.toml): started
  Building wheel for psqlparse (pyproject.toml): finished with status 'error'
Failed to build psqlparse

  error: subprocess-exited-with-error
  
  × Building wheel for psqlparse (pyproject.toml) did not run successfully.
  │ exit code: 2
  ╰─> [446 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.0-arm64-cpython-312
      creating build/lib.macosx-14.0-arm64-cpython-312/psqlparse
      copying psqlparse/__init__.py -> build/lib.macosx-14.0-arm64-cpython-312/psqlparse
      copying psqlparse/exceptions.py -> build/lib.macosx-14.0-arm64-cpython-312/psqlparse
      copying psqlparse/nodes.py -> build/lib.macosx-14.0-arm64-cpython-312/psqlparse
      running build_ext
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      
      100 78293    0 78293    0     0  58558      0 --:--:--  0:00:01 --:--:-- 58558
      100 1507k    0 1507k    0     0   681k      0 --:--:--  0:00:02 --:--:-- 1633k
      Archive:  libpg_query-9.5-latest.zip
      7565d2bc35ebc6032fa4c4d619196a8af8943880
         creating: libpg_query-9.5-latest/
        inflating: libpg_query-9.5-latest/.gitignore
        inflating: libpg_query-9.5-latest/.travis.yml
        inflating: libpg_query-9.5-latest/CHANGELOG.md
        inflating: libpg_query-9.5-latest/LICENSE
        inflating: libpg_query-9.5-latest/Makefile
        inflating: libpg_query-9.5-latest/README.md
         creating: libpg_query-9.5-latest/examples/
        inflating: libpg_query-9.5-latest/examples/normalize.c
...
        inflating: libpg_query-9.5-latest/test/plpgsql_samples.expected.json
        inflating: libpg_query-9.5-latest/test/plpgsql_samples.sql
         creating: libpg_query-9.5-latest/testdata/
        inflating: libpg_query-9.5-latest/testdata/fingerprint.json
         creating: libpg_query-9.5-latest/tmp/
       extracting: libpg_query-9.5-latest/tmp/.gitkeep
      compiling src/pg_query.c
      compiling src/pg_query_fingerprint.c
      compiling src/pg_query_json.c
      compiling src/pg_query_json_plpgsql.c
      In file included from src/pg_query_json_plpgsql.c:2:
      In file included from src/pg_query_json_plpgsql.h:4:
      In file included from ./src/postgres/include/plpgsql.h:22:
      In file included from ./src/postgres/include/commands/event_trigger.h:16:
      In file included from ./src/postgres/include/catalog/dependency.h:17:
      In file included from ./src/postgres/include/catalog/objectaddress.h:17:
      In file included from ./src/postgres/include/storage/lock.h:18:
      In file included from ./src/postgres/include/storage/lwlock.h:19:
      ./src/postgres/include/port/atomics.h:63:10: fatal error: 'port/atomics/arch-arm.h' file not found
      #include "port/atomics/arch-arm.h"
               ^~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      make: *** [src/pg_query_json_plpgsql.o] Error 1
      
      An error occurred during extension building.
      Make sure you have bison and flex installed on your system.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psqlparse
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psqlparse)

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

No branches or pull requests

6 participants
@alculquicondor @mhoangvslev @AhlamHani @zied-loreal @steve-graft and others