Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 688286 - =dev-python/pygresql-5.1 - pgconn.c: In function ‘conn_getattr’: /usr/include/python2.7/object.h:769:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
Summary: =dev-python/pygresql-5.1 - pgconn.c: In function ‘conn_getattr’: /usr/include...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: werror
  Show dependency tree
 
Reported: 2019-06-18 10:24 UTC by Jeroen Roovers (RETIRED)
Modified: 2020-12-13 18:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
688286-pygresql-5.1.patch (688286-pygresql-5.1.patch,1.60 KB, patch)
2019-11-04 09:43 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2019-06-18 10:24:27 UTC
>>> Compiling source in /var/tmp/portage/dev-python/pygresql-5.1/work/PyGreSQL-5.1 ...
 * python2_7: running distutils-r1_run_phase distutils-r1_python_compile
python2.7 setup.py build
running build
running build_py
copying pg.py -> /var/tmp/portage/dev-python/pygresql-5.1/work/PyGreSQL-5.1-python2_7/lib
copying pgdb.py -> /var/tmp/portage/dev-python/pygresql-5.1/work/PyGreSQL-5.1-python2_7/lib
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building '_pg' extension
creating /var/tmp/portage/dev-python/pygresql-5.1/work/PyGreSQL-5.1-python2_7/temp.linux-parisc64-2.7
hppa2.0-unknown-linux-gnu-gcc -mschedule=8000 -march=2.0 -ggdb -Wall -O2 -pipe -Wno-comment -fPIC -DPYGRESQL_VERSION=5.1 -DDIRECT_ACCESS -DLARGE_OBJECTS -DDEFA
ULT_VARS -DESCAPING_FUNCS -DSSL_INFO -I/usr/include/python2.7 -I/usr/include/postgresql-11 -I/usr/include/python2.7 -c pgmodule.c -o /var/tmp/portage/dev-pytho
n/pygresql-5.1/work/PyGreSQL-5.1-python2_7/temp.linux-parisc64-2.7/pgmodule.o -O2 -funsigned-char -Werror
In file included from /usr/include/python2.7/Python.h:83,
                 from pgmodule.c:16:
pgconn.c: In function ‘conn_getattr’:
/usr/include/python2.7/object.h:769:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
     ((PyObject*)(op))->ob_refcnt++)
     ~^~~~~~~~~~~~~~~~
pgconn.c:102:13: note: in expansion of macro ‘Py_INCREF’
             Py_INCREF(Py_True); return Py_True;
             ^~~~~~~~~
/usr/include/python2.7/object.h:769:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
     ((PyObject*)(op))->ob_refcnt++)
     ~^~~~~~~~~~~~~~~~
pgconn.c:105:13: note: in expansion of macro ‘Py_INCREF’
             Py_INCREF(Py_False); return Py_False;
             ^~~~~~~~~
cc1: all warnings being treated as errors
error: command 'hppa2.0-unknown-linux-gnu-gcc' failed with exit status 1
 * ERROR: dev-python/pygresql-5.1::gentoo failed (compile phase):
 *   (no error message)
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-11-04 09:43:39 UTC
Created attachment 594994 [details, diff]
688286-pygresql-5.1.patch
Comment 2 Larry the Git Cow gentoo-dev 2020-08-01 03:45:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32fe2e0afd4604e906226748ab41b9f3202188c3

commit 32fe2e0afd4604e906226748ab41b9f3202188c3
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2020-08-01 03:45:24 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2020-08-01 03:45:28 +0000

    dev-python/pygresql: Bump to 5.2
    
    Add patch to remove excess CFLAGS. Thanks, Jeroen Roovers.
    
    Bug: https://bugs.gentoo.org/688286
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>

 dev-python/pygresql/Manifest                       |  1 +
 .../pygresql/files/pygresql-5.1-CFLAGS.patch       | 11 ++++++++
 .../pygresql/files/pygresql-5.2-CFLAGS.patch       | 11 ++++++++
 dev-python/pygresql/pygresql-5.2.ebuild            | 33 ++++++++++++++++++++++
 4 files changed, 56 insertions(+)
Comment 3 crabbed halo ablution 2020-12-13 17:46:34 UTC
The patch referenced in commit 32fe2e0afd4604e906226748ab41b9f3202188c3 should fix this, 5.2 was stabilized in bug 739960. I think this bug is resolved?
Comment 4 Aaron W. Swenson gentoo-dev 2020-12-13 18:18:09 UTC
(In reply to crabbed halo ablution from comment #3)
> The patch referenced in commit 32fe2e0afd4604e906226748ab41b9f3202188c3
> should fix this, 5.2 was stabilized in bug 739960. I think this bug is
> resolved?

Should be.