Skip to content

Conversation

ruyrocha
Copy link

@ruyrocha ruyrocha commented Oct 5, 2025

It fails to install the package on main branch:

      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall "-DPSYCOPG_VERSION=2.9.9 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=170006 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/Users/ruyr/GitHub/vuln-bank/venv/include -I/Users/ruyr/Homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I. -I/Users/ruyr/Homebrew/opt/libpq/include -I/Users/ruyr/Homebrew/opt/libpq/include/postgresql/server -I/Users/ruyr/Homebrew/Cellar/icu4c@77/77.1/include -c psycopg/typecast.c -o build/temp.macosx-26.0-arm64-cpython-313/psycopg/typecast.o
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall "-DPSYCOPG_VERSION=2.9.9 (dt dec pq3 ext lo64)" -DPSYCOPG_DEBUG=1 -DPG_VERSION_NUM=170006 -DHAVE_LO64=1 -DPSYCOPG_DEBUG=1 -I/Users/ruyr/GitHub/vuln-bank/venv/include -I/Users/ruyr/Homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13 -I. -I/Users/ruyr/Homebrew/opt/libpq/include -I/Users/ruyr/Homebrew/opt/libpq/include/postgresql/server -I/Users/ruyr/Homebrew/Cellar/icu4c@77/77.1/include -c psycopg/utils.c -o build/temp.macosx-26.0-arm64-cpython-313/psycopg/utils.o
      psycopg/utils.c:397:12: error: call to undeclared function '_PyInterpreterState_Get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        397 |     return _PyInterpreterState_Get() == PyInterpreterState_Main();
            |            ^
      psycopg/utils.c:397:12: note: did you mean 'PyInterpreterState_Get'?
      /Users/ruyr/Homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/pystate.h:26:34: note: 'PyInterpreterState_Get' declared here
         26 | PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_Get(void);
            |                                  ^
      psycopg/utils.c:397:38: warning: comparison between pointer and integer ('int' and 'PyInterpreterState *' (aka 'struct _is *')) [-Wpointer-integer-compare]
        397 |     return _PyInterpreterState_Get() == PyInterpreterState_Main();
            |            ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psycopg2-binary
Failed to build psycopg2-binary
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> psycopg2-binary

And it works on this branch:

(venv)  ~/G/vuln-bank (bump/psycopg2-binary)> pip install -r requirements.txt
Collecting flask==2.0.1 (from -r requirements.txt (line 1))
  Using cached Flask-2.0.1-py3-none-any.whl.metadata (3.8 kB)
Collecting werkzeug==2.0.1 (from -r requirements.txt (line 2))
  Using cached Werkzeug-2.0.1-py3-none-any.whl.metadata (4.4 kB)
Collecting pyjwt==2.4.0 (from -r requirements.txt (line 3))
  Using cached PyJWT-2.4.0-py3-none-any.whl.metadata (4.1 kB)
Collecting flask-swagger-ui==4.11.1 (from -r requirements.txt (line 4))
  Using cached flask_swagger_ui-4.11.1-py3-none-any.whl.metadata (2.4 kB)
Collecting flask-cors==4.0.0 (from -r requirements.txt (line 5))
  Using cached Flask_Cors-4.0.0-py2.py3-none-any.whl.metadata (5.4 kB)
Collecting psycopg2-binary==2.9.10 (from -r requirements.txt (line 6))
  Using cached psycopg2_binary-2.9.10-cp313-cp313-macosx_14_0_arm64.whl.metadata (4.9 kB)
Collecting python-dotenv==1.0.0 (from -r requirements.txt (line 7))
  Using cached python_dotenv-1.0.0-py3-none-any.whl.metadata (21 kB)
Collecting requests==2.31.0 (from -r requirements.txt (line 8))
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting Jinja2>=3.0 (from flask==2.0.1->-r requirements.txt (line 1))
  Using cached jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)
Collecting itsdangerous>=2.0 (from flask==2.0.1->-r requirements.txt (line 1))
  Using cached itsdangerous-2.2.0-py3-none-any.whl.metadata (1.9 kB)
Collecting click>=7.1.2 (from flask==2.0.1->-r requirements.txt (line 1))
  Using cached click-8.3.0-py3-none-any.whl.metadata (2.6 kB)
Collecting charset-normalizer<4,>=2 (from requests==2.31.0->-r requirements.txt (line 8))
  Using cached charset_normalizer-3.4.3-cp313-cp313-macosx_10_13_universal2.whl.metadata (36 kB)
Collecting idna<4,>=2.5 (from requests==2.31.0->-r requirements.txt (line 8))
  Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests==2.31.0->-r requirements.txt (line 8))
  Using cached urllib3-2.5.0-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests==2.31.0->-r requirements.txt (line 8))
  Using cached certifi-2025.10.5-py3-none-any.whl.metadata (2.5 kB)
Collecting MarkupSafe>=2.0 (from Jinja2>=3.0->flask==2.0.1->-r requirements.txt (line 1))
  Using cached markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl.metadata (2.7 kB)
Using cached Flask-2.0.1-py3-none-any.whl (94 kB)
Using cached Werkzeug-2.0.1-py3-none-any.whl (288 kB)
Using cached PyJWT-2.4.0-py3-none-any.whl (18 kB)
Using cached flask_swagger_ui-4.11.1-py3-none-any.whl (1.4 MB)
Using cached Flask_Cors-4.0.0-py2.py3-none-any.whl (14 kB)
Using cached psycopg2_binary-2.9.10-cp313-cp313-macosx_14_0_arm64.whl (3.3 MB)
Using cached python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached charset_normalizer-3.4.3-cp313-cp313-macosx_10_13_universal2.whl (205 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Using cached urllib3-2.5.0-py3-none-any.whl (129 kB)
Using cached certifi-2025.10.5-py3-none-any.whl (163 kB)
Using cached click-8.3.0-py3-none-any.whl (107 kB)
Using cached itsdangerous-2.2.0-py3-none-any.whl (16 kB)
Using cached jinja2-3.1.6-py3-none-any.whl (134 kB)
Using cached markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl (12 kB)
Installing collected packages: werkzeug, urllib3, python-dotenv, pyjwt, psycopg2-binary, MarkupSafe, itsdangerous, idna, click, charset-normalizer, certifi, requests, Jinja2, flask, flask-swagger-ui, flask-cors
Successfully installed Jinja2-3.1.6 MarkupSafe-3.0.3 certifi-2025.10.5 charset-normalizer-3.4.3 click-8.3.0 flask-2.0.1 flask-cors-4.0.0 flask-swagger-ui-4.11.1 idna-3.10 itsdangerous-2.2.0 psycopg2-binary-2.9.10 pyjwt-2.4.0 python-dotenv-1.0.0 requests-2.31.0 urllib3-2.5.0 werkzeug-2.0.1
(venv)  ~/G/vuln-bank (bump/psycopg2-binary)>

I'm using Python 3.13.7.

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

Successfully merging this pull request may close these issues.

2 participants