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

libpq.lib error in Python 11 RC2 Windows-Only (MacOS and Linux install okay) #1499

Closed
2 of 4 tasks
ross-spencer opened this issue Sep 26, 2022 · 8 comments
Closed
2 of 4 tasks

Comments

@ross-spencer
Copy link

This is a bug tracker
If you have a question, such has "how do you do X with Python/PostgreSQL/psycopg2" please write to the mailing list or open a question instead.

Before opening this ticket, please confirm that:

Please complete the following information:

  • OS: windows-latest
  • Psycopg version: 2.9.3
  • Python version: 3.11-rc2
  • PostgreSQL version: Unknown (error at install)
  • pip version: 22.2.2

In Github actions running Windows-latest and Python 3.11-rc.2 the build process is failing as follows:

  "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\a\arweave-api\arweave-api\.tox\py311\libs /LIBPATH:C:\hostedtoolcache\windows\Python\3.11.0-rc.2\x64\libs /LIBPATH:C:\hostedtoolcache\windows\Python\3.11.0-rc.2\x64 /LIBPATH:D:\a\arweave-api\arweave-api\.tox\py311\PCbuild\amd64 /LIBPATH:C:/STRAWB~1/c/lib /LIBPATH:/z/extlib/_2019Q2__/lib "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64" ws2_32.lib advapi32.lib secur32.lib libpq.lib shfolder.lib build\temp.win-amd64-cpython-311\Release\psycopg\adapter_asis.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_binary.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_datetime.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_list.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_pboolean.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_pdecimal.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_pfloat.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_pint.obj build\temp.win-amd64-cpython-311\Release\psycopg\adapter_qstring.obj build\temp.win-amd64-cpython-311\Release\psycopg\aix_support.obj build\temp.win-amd64-cpython-311\Release\psycopg\bytes_format.obj build\temp.win-amd64-cpython-311\Release\psycopg\column_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\connection_int.obj build\temp.win-amd64-cpython-311\Release\psycopg\connection_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\conninfo_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\cursor_int.obj build\temp.win-amd64-cpython-311\Release\psycopg\cursor_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\diagnostics_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\error_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\green.obj build\temp.win-amd64-cpython-311\Release\psycopg\libpq_support.obj build\temp.win-amd64-cpython-311\Release\psycopg\lobject_int.obj build\temp.win-amd64-cpython-311\Release\psycopg\lobject_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\microprotocols.obj build\temp.win-amd64-cpython-311\Release\psycopg\microprotocols_proto.obj build\temp.win-amd64-cpython-311\Release\psycopg\notify_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\pqpath.obj build\temp.win-amd64-cpython-311\Release\psycopg\psycopgmodule.obj build\temp.win-amd64-cpython-311\Release\psycopg\replication_connection_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\replication_cursor_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\replication_message_type.obj build\temp.win-amd64-cpython-311\Release\psycopg\solaris_support.obj build\temp.win-amd64-cpython-311\Release\psycopg\typecast.obj build\temp.win-amd64-cpython-311\Release\psycopg\utils.obj build\temp.win-amd64-cpython-311\Release\psycopg\win32_support.obj build\temp.win-amd64-cpython-311\Release\psycopg\xid_type.obj /OUT:build\lib.win-amd64-cpython-311\psycopg2\_psycopg.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\psycopg\_psycopg.cp311-win_amd64.lib
  LINK : fatal error LNK1181: cannot open input file 'libpq.lib'
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181
  [end of output]

Picking MacOS out of that and Linux (both work) pscyopg2 installs just fine:

py311 installed: anyio==3.6.1,arrow==1.2.3,arweave-python-client==1.0.18,astroid==2.11.7,attrs==22.1.0,bagit==1.8.1,black==22.8.0,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,click==8.1.3,cryptography==38.0.1,dill==0.3.5.1,distlib==0.3.6,ecdsa==0.18.0,fastapi==0.79.0,filelock==3.8.0,flake8==4.0.1,h11==0.14.0,idna==3.4,iniconfig==1.1.1,isort==5.10.1,lazy-object-proxy==1.7.1,mccabe==0.6.1,multidict==6.0.2,mypy-extensions==0.4.3,packaging==21.3,pathspec==0.10.1,platformdirs==2.5.2,pluggy==1.0.0,psutil==5.9.2,psycopg2-binary==2.9.3,py==1.11.0,pyasn1==0.4.8,pycodestyle==2.8.0,pycparser==2.21,pycryptodome==3.15.0,pydantic==1.10.2,pyflakes==2.4.0,pylint==2.14.5,PyNaCl==1.5.0,pyparsing==3.0.9,pytest==7.1.2,python-dateutil==2.8.2,python-jose==3.3.0,python-multipart==0.0.5,PyYAML==6.0,requests==2.28.1,rsa==4.9,six==1.16.0,sniffio==1.3.0,starlette==0.19.1,tomli==2.0.1,tomlkit==0.11.4,tox==3.26.0,typing_extensions==4.3.0,ulid-py==1.1.0,urllib3==1.26.12,uvicorn==0.18.2,vcrpy==4.2.0,virtualenv==20.16.5,wrapt==1.14.1,yarl==1.8.1

It maybe this is still a roadmap task for Python 11, but I wanted to share in-case others face the same issue.

@dvarrazzo
Copy link
Member

Yes compatibility with python 3.11 should be already there, so building from source works ok, but Windows only uses binary packages, and we will only release them after the official Python 3.11 release.

@ross-spencer
Copy link
Author

Cool, thanks @dvarrazzo.

@libexpand
Copy link

libexpand commented Oct 25, 2022

Python 3.11 has been officially released:
Stable Releases: Python 3.11.0 - Oct. 24, 2022

@dvarrazzo
Copy link
Member

Windows packages will be released only when appveyor supports Python 3.11.

@cwegener
Copy link

Looks like there is some sort of existing issue logged with the appveyor team ... appveyor/ci#3844

@dvarrazzo
Copy link
Member

@cwegener yes, that's it. Thank you for digging it up 👍

@dvarrazzo
Copy link
Member

Status of packages release in #1514

@dvarrazzo
Copy link
Member

Released.

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

4 participants