Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1693641 - python-psycopg2 FTBFS with Python 3.8: dereferencing pointer to incomplete type ‘PyInterpreterState’
Summary: python-psycopg2 FTBFS with Python 3.8: dereferencing pointer to incomplete ty...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-psycopg2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-03-28 11:53 UTC by Miro Hrončok
Modified: 2019-06-03 16:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-30 20:29:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (213.48 KB, text/plain)
2019-03-28 11:53 UTC, Miro Hrončok
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github psycopg psycopg2 issues 854 0 None None None 2019-03-28 11:55:20 UTC
Github psycopg psycopg2 issues 858 0 None None None 2019-03-28 11:55:20 UTC

Description Miro Hrončok 2019-03-28 11:53:35 UTC
Created attachment 1548985 [details]
Full log from Copr

python-psycopg2-2.7.7-1.fc31 FTBFS with Python 3.8:

running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.7 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110002 -DHAVE_LO64=1 -I/usr/include/python3.8m -I. -I/usr/include -I/usr/include/pgsql/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
  689 |     while (interp->next)
      |                  ^~

Full log attached.

PyInterpreterState is now private now that https://github.com/python/cpython/pull/11731 has been merged, see https://bugs.python.org/issue35886 and https://mail.python.org/pipermail/python-dev/2019-February/156344.html for details.

Comment 2 Miro Hrončok 2019-03-28 12:00:16 UTC
Note: That patch applies cleanly on python-psycopg2-2.7.7-1, but to a different file: psycopg/psycopgmodule.c

Comment 3 Miro Hrončok 2019-05-08 12:45:15 UTC
Note that after 3.8.0a4 the package build also fails with:

File not found: /builddir/build/BUILDROOT/python-psycopg2-2.7.7-1.fc31.x86_64/usr/lib64/python3.8/site-packages/psycopg2/_psycopg.cpython-3?m*.so

The "m" is not there any more. See https://bugs.python.org/issue36707

Please relax the glob.

Comment 4 Miro Hrončok 2019-05-15 10:36:20 UTC
Could you plese prioritize this?

Comment 5 Honza Horak 2019-05-30 20:29:46 UTC
Patch applied and built in rawhide, although I didn't test it with python 3.8, because I don't really know how. Maybe creating my own copr and using "python/python3.8" copr as a dependency would work. What I'm also not absolutely sure is whether this is all what was expected from this component. Hope it is, so closing.

Comment 6 Miro Hrončok 2019-05-30 22:19:04 UTC
Thanks Honza. Indeed, the package builds fine: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/build/918261/

Comment 7 Victor Stinner 2019-06-03 16:44:12 UTC
> Fixed upstream at https://github.com/psycopg/psycopg2/commit/c929f200484f5a2355edf769aaaee1e036129fd8

FYI the issue was known since March 1:
https://github.com/psycopg/psycopg2/issues/854


Note You need to log in before you can comment on or make changes to this bug.